Token导航 LogoToken导航TokenDH.com
Urfave CLI MCP logo
开发工具未说明官方级别未说明来源级核验

Urfave CLI MCP

MCP Server

将urfave/cli应用程序快速转换为Model Context Protocol服务器,支持子命令、描述、标志和默认值的暴露。

工具数

0

提示词数

0

GitHub Stars

2

资源数

0
命令行工具开发工具Go

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

thepwagner

提供方

thepwagner

最后核验

2026/5/18 04:06

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

urfave cli mcp

这是一个快速的黑客重用 urfave/cli 应用程序作为模型上下文协议服务器。 它爬行 Command 树提供并公开子命令作为MCP工具。支持描述、标志、默认值和所需标志。 通过分叉当前进程并返回stdout作为结果来调用工具。

我使用它将只查询的CLI重用为一行代码的MCP服务器。 创建新的MCP服务器也可能很有用,因为您可以在向MCP客户端公开之前将工具作为CLI进行迭代。

示例

package main

import (
	"context"
	"fmt"
	"os"

	urfaveclimcp "github.com/thepwagner/urfave-cli-mcp"
	"github.com/urfave/cli/v3"
)

var App = &cli.Command{
	Name:  "hello",
	Usage: "say hello",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:  "name",
			Usage: "the name to say hello to",
			Value: "World",
		},
	},
	Action: func(_ context.Context, c *cli.Command) error {
		fmt.Println("Hello,", c.String("name"))
		return nil
	},
}

func main() {
	// Pass the root command you want to expose, then add the "mcp" command to your App
	App.Commands = append(App.Commands, urfaveclimcp.NewMCPCommand(App))
	App.Run(context.Background(), os.Args)
}

目录标签

目录标签

命令行工具开发工具Godeveloper-toolsgolang-libraryurfave-climodel-context-protocolCLI工具本地部署MCP服务器命令行转换

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP