使用说明
MCP Gearbox CLI
Setup high-quality MCP servers faster.
CLI tool to quickly download, configure, and deploy Model Context Protocol (MCP) servers for AI agents — cross-platform support for Windows, macOS, and Linux.
文档
有关详细的使用说明,请访问我们的 文档.
🤔 概述
MCP Gearbox是一个功能强大的Python CLI开发工具包,它提供了一种从官方生态系统中发现、下载和配置模型上下文协议(MCP)服务器的交互式方法。此AI驱动的工具可自动为您首选的AI编码代理配置模型上下文协议服务器,并提供跨平台支持和智能配置管理。
⚡ 安装
使用紫外线(推荐)
uv tool install mcp-gearbox --from git+https://github.com/rohitsoni007/mcp-gearbox-cli
要升级mcp-cli,请运行:
uv tool install mcp-gearbox --force --from git+https://github.com/rohitsoni007/mcp-gearbox-cli
使用uvx(一次性执行)
uvx --from git+https://github.com/rohitsoni007/mcp-gearbox-cli mcp-cli
使用uv和pip
uv tool install mcp-gearbox
使用npm
npm install -g mcp-gearbox
使用pip
pip install mcp-gearbox
开发安装
git clone https://github.com/rohitsoni007/mcp-gearbox-cli
cd mcp-gearbox-cli
uv sync
🤖 支持的AI代理
| 代理 | 支持 | 注意事项 |
|---|---|---|
| GitHub Copilot | ✅ | |
| 继续 | ✅ | |
| 基罗 | ✅ | |
| 光标 | ✅ | |
| 克劳德代码 | ✅ | |
| Gemini CLI | ✅ | |
| Qoder | ⚠️ | Qoder 不支持 项目级MCP配置 |
| Copilot命令行界面 | ✅ | Copilot CLI不支持项目级MCP配置 |
| LM工作室 | ✅ | LM Studio不需要项目级MCP配置 |
| 谷歌反重力 | ✅ | Google Antigravity不支持项目级MCP配置 |
🔧 MCP CLI参考
这 mcp 命令支持以下选项:
命令
| 命令 | 描述 |
|---|---|
init |
初始化MCP配置(支持项目特定配置和全局配置) |
list |
列出已配置的MCP服务器或所有可用服务器 |
rm |
从配置中删除MCP服务器 |
check |
检查您的系统上安装了哪些AI代理 |
mcp init 参数和选项
| 参数/选项 | 类型 | 描述 |
|---|---|---|
<directory> |
参数 | 初始化MCP配置的目录(使用 . 对于当前目录,省略全局配置) |
--servers, -s |
选项 | 要直接添加的MCP服务器名称。使用多次(-s git-s文件系统)或空格分隔(-s“git文件系统”)-可选 |
--agent, -a |
选项 | 要配置的AI代理: copilot, copilot-cli, continue, kiro, cursor, claude, gemini, qoder,或 lmstudio |
--json, -j |
选项 | 以JSON格式输出,不带横幅或UI |
--pretty |
选项 | 漂亮打印JSON输出(默认值:false) |
mcp list 参数和选项
| 参数/选项 | 类型 | 描述 |
|---|---|---|
--agent, -a |
选项 | 列出服务器的AI代理: copilot, copilot-cli, continue, kiro, cursor, claude, gemini, qoder, lmstudio,或 antigravity |
--project, -p |
选项 | 项目路径(当前目录使用“.”,全局配置省略) |
--servers, -s |
选项 | 列出所有可用的MCP服务器,而不是已配置的服务器 |
--json, -j |
选项 | 以JSON格式输出,不带横幅或UI |
--pretty |
选项 | 列出可用服务器时打印JSON输出(默认值:false) |
mcp rm 参数和选项
| 参数/选项 | 类型 | 描述 |
|---|---|---|
<servers> |
参数 | 要删除的MCP服务器名称(例如“git”、“filesystem”)-可选 |
--all, -A |
选项 | 删除所有MCP服务器 |
--agent, -a |
选项 | 要配置的AI代理: copilot, copilot-cli, continue, kiro, cursor, claude, gemini, qoder, lmstudio,或 antigravity |
--project, -p |
选项 | 项目路径(当前目录使用“.”,全局配置省略) |
--force, -f |
选项 | 跳过确认提示 |
--json, -j |
选项 | 以JSON格式输出,不带横幅或UI |
--pretty |
选项 | 漂亮打印JSON输出(默认值:false) |
mcp check 参数和选项
| 参数/选项 | 类型 | 描述 |
|---|---|---|
--agent, -a |
选项 | 要检查的特定代理: copilot, copilot-cli, continue, kiro, cursor, claude, gemini, qoder, lmstudio,或 antigravity |
--json, -j |
选项 | 以JSON格式输出,不带横幅或UI |
--pretty |
选项 | 漂亮打印JSON输出(默认值:false) |
🔧 使用示例
# Check which AI agents are installed on your system
mcp check
# Interactive Model Context Protocol server selection (choose from available AI agents)
# Configure MCP globally
mcp init
# Configure MCP globally for GitHub Copilot AI agent
mcp init -a copilot
# Configure MCP globally for Copilot CLI
mcp init -a copilot-cli
# Configure MCP globally for Continue AI
mcp init -a continue
# Configure MCP globally for Kiro AI agent
mcp init -a kiro
# Configure MCP globally for Cursor AI agent
mcp init -a cursor
# Configure MCP globally for Qoder AI agent
mcp init -a qoder
# Configure MCP globally for Claude Code
mcp init -a claude
# Configure MCP globally for Gemini CLI
mcp init -a gemini
# Configure MCP globally for LM Studio AI agent
mcp init -a lmstudio
# Configure MCP globally for Google Antigravity
mcp init -a antigravity
# Add specific MCP servers directly without interactive selection
# Method 1: Space-separated in quotes
mcp init -a copilot --servers "git filesystem"
# Method 2: Multiple option flags
mcp init -a copilot -s git -s filesystem
# Add specific servers for Continue AI with JSON output (compact)
mcp init -a continue --servers "git filesystem" --json
# Add specific servers for Continue AI with pretty JSON output
mcp init -a continue --servers "git filesystem" --json --pretty
# Add servers to current directory project
mcp init . -a copilot --servers "git filesystem"
# Add servers to new project directory
mcp init my-project -a continue -s git -s filesystem
# Initialize MCP in current directory
mcp init .
# Initialize MCP in a new project directory
mcp init my-project
# Initialize MCP for GitHub Copilot AI agent in new project directory
mcp init my-project -a copilot
# Initialize MCP for Continue AI agent in new project directory
mcp init my-project -a continue
# Initialize MCP for Kiro AI agent in new project directory
mcp init my-project -a kiro
# Initialize MCP for Cursor AI agent in new project directory
mcp init my-project -a cursor
# Initialize MCP for Claude Code in new project directory
mcp init my-project -a claude
# Initialize MCP for Gemini CLI in new project directory
mcp init my-project -a gemini
# Initialize MCP for Google Antigravity in new project directory
mcp init my-project -a antigravity
mcp list 示例
# Interactive MCP server listing (choose from available AI agents)
# List servers from global configuration
mcp list
# List servers for specific agent from global configuration
mcp list -a copilot
mcp list -a copilot-cli
mcp list -a continue
mcp list -a kiro
mcp list -a cursor
mcp list -a claude
mcp list -a gemini
mcp list -a qoder
mcp list -a lmstudio
mcp list -a antigravity
# List servers from current directory configuration
mcp list -p .
# List servers from specific project directory
mcp list -p my-project
# List servers for specific agent from project
mcp list -a copilot -p my-project
# Output in JSON format (useful for scripting and automation)
mcp list -a continue --json
mcp list -a continue -j
# JSON output for project-specific configuration
mcp list -a continue -p my-project --json
mcp list -a continue -p my-project -j
# List all available MCP servers (interactive display)
mcp list --servers
mcp list -s
# List all available MCP servers with JSON output (pretty printed)
mcp list --servers --json
# List all available MCP servers with pretty JSON output
mcp list --servers --json --pretty
mcp list -s -j --pretty
mcp rm 示例
# Interactive MCP server removal (choose from configured servers)
# Remove servers from global configuration
mcp rm
# Interactive removal for specific agent
mcp rm -a copilot
mcp rm -a copilot-cli
# Remove specific MCP servers from global configuration
mcp rm git filesystem
# Remove specific servers for GitHub Copilot AI agent
mcp rm git filesystem -a copilot
# Remove specific servers for Copilot CLI
mcp rm git filesystem -a copilot-cli
# Remove specific servers for Continue AI
mcp rm git filesystem -a continue
# Remove specific servers for Kiro AI agent
mcp rm git filesystem -a kiro
# Remove specific servers for Cursor AI agent
mcp rm git filesystem -a cursor
# Remove specific servers for Claude Code
mcp rm git filesystem -a claude
# Remove specific servers for Gemini CLI
mcp rm git filesystem -a gemini
# Remove specific servers for Google Antigravity
mcp rm git filesystem -a antigravity
# Remove all MCP servers from global configuration
mcp rm --all
# Remove all servers for specific agent
mcp rm --all -a copilot
mcp rm --all -a copilot-cli
# Interactive removal from current directory configuration
mcp rm -p .
# Interactive removal from specific project directory
mcp rm -p my-project
# Remove specific servers from current directory configuration
mcp rm git filesystem -p .
# Remove specific servers from specific project directory
mcp rm git filesystem -p my-project
# Remove all servers from project directory
mcp rm --all -p my-project
# Remove servers with force (skip confirmations)
mcp rm git filesystem --force
# Remove all servers with force
mcp rm --all --force
# Output in JSON format (useful for scripting and automation)
mcp rm git filesystem -a continue --json
mcp rm git filesystem -a continue -j
# Output in pretty JSON format (human-readable)
mcp rm git filesystem -a continue --json --pretty
# Remove all servers with JSON output
mcp rm --all -a continue --json
mcp rm --all -a continue -j
# Remove all servers with pretty JSON output
mcp rm --all -a continue --json --pretty
# Remove servers from project with JSON output
mcp rm git filesystem -p my-project -a continue --json
mcp rm git filesystem -p my-project -a continue -j
mcp check 示例
# Check all AI agents installation status
mcp check
# Check specific agent installation status
mcp check -a copilot
mcp check -a copilot-cli
mcp check -a continue
mcp check -a kiro
mcp check -a cursor
mcp check -a claude
mcp check -a gemini
mcp check -a qoder
mcp check -a lmstudio
mcp check -a antigravity
# Output in JSON format (useful for scripting and automation)
mcp check --json
mcp check -j
# Output in pretty JSON format (human-readable)
mcp check --json --pretty
mcp check -j --pretty
# Check specific agent with JSON output
mcp check -a continue --json
mcp check -a continue -j
# Check specific agent with pretty JSON output
mcp check -a continue --json --pretty
一般示例
# Show version
mcp --version
mcp -v
📚 特性
- 🎯 交互式AI代理选择和配置
- 📋 具有智能过滤功能的交互式MCP服务器选择
- 🔧 自动生成模型上下文协议配置文件
- 🌍 跨平台Python开发工具支持(Windows、Linux、macOS)
- 📁 自动AI代理配置路径检测
- 🔍 全系统AI代理安装检测和状态检查
- 🛠️ 基于CLI的工作流,提供无缝的开发人员体验
🎯 实验目标
- 所有AI代理的通用MCP服务器 -跨不同AI平台的统一配置和管理
- 未来编辑功能 -修改和更新现有MCP配置的计划功能
发展
项目结构
mcp-gearbox-cli/
├── src/mcp_cli/ # Main CLI package
│ ├── __init__.py # Core CLI functionality
├── templates/ # Configuration templates
└── scripts/ # Build and deployment scripts
🔧 需求
- Linux/macOS/Windows
- 紫外线 用于包管理
- Python 3.11+
- Git
如果您遇到代理问题,请打开问题,以便我们改进集成。
👥 维护者
- 索尼 灵魂@罗希森007)
💬 支持
如需支持,请打开 GitHub问题。我们欢迎有关使用MCP CLI的错误报告、功能请求和问题。
🙏 致谢
该项目基于以下数据 模型上下文协议服务器 和 Github MCP注册表.
关键词
MCP model-context-protocol ai cli dev-tools python artificial-intelligence developer-tools command-line automation ai-agents github-copilot continue configuration-management cross-platform
📄 许可证
该项目根据麻省理工学院开源许可证条款获得许可。请参阅 许可证 提交完整条款的文件。
