mcp-manager
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMCP Manager Skill
MCP Manager Skill
Overview
概述
Natural language interface to MCP Manager CLI tool for managing Model Context Protocol server configurations. Users interact conversationally: "enable the filesystem MCP", "add a database server", "show me all my MCPs".
这是用于管理Model Context Protocol(MCP)服务器配置的MCP Manager CLI工具的自然语言界面。用户可以通过对话方式交互,例如:“启用文件系统MCP”、“添加数据库服务器”、“显示我所有的MCP”。
Activation
激活
Activates on MCP keywords within 3-message window or explicit invocation:
/mcp-manager当在3条消息窗口内出现MCP关键词,或通过显式调用时触发。
/mcp-managerCommands
命令
1. List MCPs
1. 列出MCP
Display all configured MCP servers with status.
- "List all my MCPs" / "Show me my MCP servers"
- CLI:
python3 -m mcp-manager.cli list
显示所有已配置的MCP服务器及其状态。
- 示例语句:“列出我所有的MCP” / “显示我的MCP服务器”
- CLI命令:
python3 -m mcp-manager.cli list
2. Enable MCP
2. 启用MCP
Activate a disabled MCP server.
- "Enable the filesystem MCP" / "Turn on puppeteer"
- CLI:
python3 -m mcp-manager.cli enable <server-name>
激活已禁用的MCP服务器。
- 示例语句:“启用文件系统MCP” / “开启puppeteer”
- CLI命令:
python3 -m mcp-manager.cli enable <server-name>
3. Disable MCP
3. 禁用MCP
Deactivate an MCP server without removing it. Requires confirmation.
- "Disable the puppeteer MCP" / "Turn off github"
- CLI:
python3 -m mcp-manager.cli disable <server-name>
停用MCP服务器但不删除其配置。需要确认操作。
- 示例语句:“禁用puppeteer MCP” / “关闭github”
- CLI命令:
python3 -m mcp-manager.cli disable <server-name>
4. Add MCP
4. 添加MCP
Add new MCP server interactively (collects name, command, args, env vars).
- "Add a new MCP server" / "Configure a database MCP"
- CLI:
python3 -m mcp-manager.cli add <name> <command> [args...] --env KEY=VALUE
以交互式方式添加新的MCP服务器(收集名称、命令、参数、环境变量)。
- 示例语句:“添加新的MCP服务器” / “配置数据库MCP”
- CLI命令:
python3 -m mcp-manager.cli add <name> <command> [args...] --env KEY=VALUE
5. Remove MCP
5. 删除MCP
Delete MCP server configuration completely. Requires confirmation with warning.
- "Remove the puppeteer MCP" / "Delete the old-server"
- CLI:
python3 -m mcp-manager.cli remove <server-name>
彻底删除MCP服务器配置。需要确认并给出警告。
- 示例语句:“删除puppeteer MCP” / “移除old-server”
- CLI命令:
python3 -m mcp-manager.cli remove <server-name>
6. Show MCP
6. 查看MCP详情
Display detailed information for specific MCP server.
- "Show me the filesystem MCP" / "Details for github server"
- CLI:
python3 -m mcp-manager.cli show <server-name>
显示特定MCP服务器的详细信息。
- 示例语句:“显示文件系统MCP的详情” / “查看github服务器的信息”
- CLI命令:
python3 -m mcp-manager.cli show <server-name>
7. Validate MCPs
7. 验证MCP配置
Check all MCP configurations for errors.
- "Validate my MCP configuration" / "Check for MCP errors"
- CLI:
python3 -m mcp-manager.cli validate
检查所有MCP配置是否存在错误。
- 示例语句:“验证我的MCP配置” / “检查MCP是否有错误”
- CLI命令:
python3 -m mcp-manager.cli validate
8. Export MCPs
8. 导出MCP配置
Export configurations to JSON file for backup.
- "Export my MCP configuration" / "Back up my MCPs"
- CLI:
python3 -m mcp-manager.cli export [output-file]
将配置导出到JSON文件以进行备份。
- 示例语句:“导出我的MCP配置” / “备份我的MCP”
- CLI命令:
python3 -m mcp-manager.cli export [output-file]
9. Import MCPs
9. 导入MCP配置
Import configurations from JSON file.
- "Import MCPs from backup.json" / "Restore my MCPs"
- CLI:
python3 -m mcp-manager.cli import <input-file> [--merge]
从JSON文件导入配置。
- 示例语句:“从backup.json导入MCP配置” / “恢复我的MCP配置”
- CLI命令:
python3 -m mcp-manager.cli import <input-file> [--merge]
Usage Examples
使用示例
Example 1: List and Enable
示例1:列出并启用MCP
User: "List all my MCPs"
[Executes: ]
cd .claude/scenarios && python3 -m mcp-manager.cli listResponse:
"You have 3 MCP servers configured:
✓ filesystem (enabled) - Local filesystem access
✓ github (enabled) - GitHub API integration
✗ puppeteer (disabled) - Browser automation"
Follow-up: "Turn on puppeteer"
[Executes: ]
python3 -m mcp-manager.cli enable puppeteer"✓ Successfully enabled 'puppeteer' MCP server."
用户:“列出我所有的MCP”
[执行命令:]
cd .claude/scenarios && python3 -m mcp-manager.cli list响应:
"你已配置了3个MCP服务器:
✓ filesystem(已启用)- 本地文件系统访问
✓ github(已启用)- GitHub API集成
✗ puppeteer(已禁用)- 浏览器自动化"
后续请求:“开启puppeteer”
[执行命令:]
python3 -m mcp-manager.cli enable puppeteer"✓ 成功启用'puppeteer' MCP服务器。"
Example 2: Add New Server
示例2:添加新服务器
User: "Add a new MCP for database access"
Interactive Collection:
- Name: "postgres-local"
- Command: "node /opt/mcp-servers/postgres/index.js"
- Args: "--port 5432 --host localhost"
- Env: "DATABASE_URL=postgresql://localhost:5432/mydb"
[Executes: ]
python3 -m mcp-manager.cli add postgres-local "node /opt/mcp-servers/postgres/index.js" --port 5432 --host localhost --env "DATABASE_URL=postgresql://localhost:5432/mydb""✓ Successfully added 'postgres-local' MCP server.
Server is currently disabled. Enable with: 'enable postgres-local'"
用户:“添加用于数据库访问的新MCP”
交互式信息收集:
- 名称:"postgres-local"
- 命令:"node /opt/mcp-servers/postgres/index.js"
- 参数:"--port 5432 --host localhost"
- 环境变量:"DATABASE_URL=postgresql://localhost:5432/mydb"
[执行命令:]
python3 -m mcp-manager.cli add postgres-local "node /opt/mcp-servers/postgres/index.js" --port 5432 --host localhost --env "DATABASE_URL=postgresql://localhost:5432/mydb""✓ 成功添加'postgres-local' MCP服务器。
当前服务器处于禁用状态。可通过指令启用:'enable postgres-local'"
Example 3: Remove Server
示例3:删除服务器
User: "Remove the puppeteer MCP"
Confirmation:
"⚠️ WARNING: You're about to remove 'puppeteer' MCP server. This will delete the configuration completely. This action cannot be undone. Are you sure? (yes/no)"
[User confirms: "yes"]
[Executes: ]
python3 -m mcp-manager.cli remove puppeteer"✓ Successfully removed 'puppeteer' MCP server."
用户:“删除puppeteer MCP”
确认提示:
"⚠️ 警告:你即将删除'puppeteer' MCP服务器。此操作将彻底删除其配置,且无法撤销。确定要继续吗?(是/否)"
[用户确认:“是”]
[执行命令:]
python3 -m mcp-manager.cli remove puppeteer"✓ 成功删除'puppeteer' MCP服务器。"
Tool Invocation
工具调用方式
All commands execute from directory:
~/.amplihack/.claude/scenarios/bash
cd .claude/scenarios && python3 -m mcp-manager.cli <command> [args]Key Commands:
- - List all MCPs
list - - Enable server
enable <name> - - Disable server
disable <name> - - Add server
add <name> <cmd> [args...] --env KEY=VAL - - Remove server
remove <name> - - Show details
show <name> - - Validate all configurations
validate - - Export to JSON
export [file] - - Import from JSON
import <file> [--merge]
Output Handling:
- Success: Exit code 0, stdout with ✓ prefix
- Error: Non-zero exit code, stderr with ❌ prefix
- Redact sensitive info (tokens, passwords) in responses
所有命令均从目录执行:
~/.amplihack/.claude/scenarios/bash
cd .claude/scenarios && python3 -m mcp-manager.cli <command> [args]核心命令:
- - 列出所有MCP
list - - 启用服务器
enable <name> - - 禁用服务器
disable <name> - - 添加服务器
add <name> <cmd> [args...] --env KEY=VAL - - 删除服务器
remove <name> - - 查看详情
show <name> - - 验证所有配置
validate - - 导出为JSON
export [file] - - 从JSON导入
import <file> [--merge]
输出处理:
- 成功:退出码0,标准输出以✓开头
- 错误:非零退出码,标准错误输出以❌开头
- 在响应中自动脱敏敏感信息(令牌、密码等)
Error Handling
错误处理
Common Errors:
- CLI Not Found: Offer installation instructions (see README)
- Server Not Found: List available servers, suggest alternatives
- Server Already Exists: Suggest show/remove/rename
- Permission Denied: Check file/directory permissions
- Malformed settings.json: Validate JSON, offer backup restore
- Invalid Command: Show common command patterns
For detailed error scenarios and troubleshooting, see
~/.amplihack/.claude/scenarios/mcp-manager/README.md常见错误:
- CLI未找到:提供安装说明(参见README)
- 服务器不存在:列出可用服务器,提供替代建议
- 服务器已存在:建议查看详情/删除/重命名
- 权限不足:检查文件/目录权限
- settings.json格式错误:验证JSON格式,提供备份恢复建议
- 命令无效:显示常见命令模式
有关详细错误场景和故障排除方法,请参阅
~/.amplihack/.claude/scenarios/mcp-manager/README.mdBest Practices
最佳实践
- Always confirm destructive operations (disable, remove)
- Validate server names before executing
- Redact sensitive information in responses
- Provide clear error messages with actionable next steps
- Show current state before and after changes
- 对于破坏性操作(禁用、删除),始终要求确认
- 执行前验证服务器名称
- 在响应中脱敏敏感信息
- 提供清晰的错误消息及可操作的后续步骤
- 在更改前后显示当前状态
See Also
相关链接
- Full documentation:
~/.amplihack/.claude/scenarios/mcp-manager/README.md - Tool creation guide:
~/.amplihack/.claude/scenarios/mcp-manager/HOW_TO_CREATE_YOUR_OWN.md - MCP Protocol: https://modelcontextprotocol.io/
- Claude Code Settings:
~/.amplihack/.claude/settings.json
Version: 1.0.0 | Updated: 2025-11-24 | Maintainer: amplihack team
- 完整文档:
~/.amplihack/.claude/scenarios/mcp-manager/README.md - 工具创建指南:
~/.amplihack/.claude/scenarios/mcp-manager/HOW_TO_CREATE_YOUR_OWN.md - MCP协议:https://modelcontextprotocol.io/
- Claude Code设置:
~/.amplihack/.claude/settings.json
**版本:**1.0.0 | **更新日期:**2025-11-24 | **维护者:**amplihack团队