Intelligently manages MCP (Model Context Protocol) servers, providing automatic detection, intelligent switching, and feature Q&A.
Features
1. Automatic Health Check
- Regularly tests the availability of all MCP servers
- Checks connection status, response time, and feature availability
- Triggers automatic reminders when unavailable
2. Intelligent Switching Management
- Automatically shuts down idle MCPs based on usage frequency
- Automatically starts the corresponding MCP when needed
- Saves switch history and supports manual control
3. User-Friendly Feature Q&A
- Ask about MCP features in natural language
- Tells you what each MCP can and cannot do
- Recommends the most suitable MCP combinations
How to Use
Health Check
# 检查所有 MCP 状态
mcp health check
# 检查特定 MCP
mcp health check github
# 持续监控(每分钟检查一次)
mcp health monitor
Switch Management
# 列出所有 MCP 及状态
mcp list
# 启用 MCP
mcp enable github
# 禁用 MCP
mcp disable chrome-devtools
# 自动优化(关闭闲置 MCP)
mcp optimize
# 查看使用统计
mcp stats
Feature Q&A
# 自然语言询问
"GitHub MCP 能做什么?"
"哪个 MCP 可以处理浏览器操作?"
"帮我总结一下所有 MCP 的功能"
"Chrome DevTools MCP 的局限性是什么?"
MCP Feature Library
chrome-devtools
What it can do:
- 🌐 Automated browser operations (click, type, navigate)
- 📸 Screenshots and snapshots
- 🔍 Network request monitoring
- 🐛 Console log viewing
- ⚡ Performance analysis
What it cannot do:
- ❌ Calls to external services that require an API key
- ❌ Code execution (JavaScript evaluation only)
- ❌ File system access
Use cases: Web testing, data scraping, UI automation
github
What it can do:
- 📂 Search repositories and code
- 🔍 View issues and PRs
- 📊 Get repository statistics
- 🌿 Branch and tag management
- 👥 User and repository information queries
What it cannot do:
- ❌ Modify code (read-only operations)
- ❌ Create/delete repositories
- ❌ Manage Issues (requires additional permissions)
Use cases: Code search, repository analysis, collaboration information queries
context7
What it can do:
- 🧠 Long-term memory storage
- 💾 Save and retrieve context
- 🔗 Cross-session information sharing
- 📚 Knowledge base management
What it cannot do:
- ❌ Real-time data processing
- ❌ Complex numerical calculations
- ❌ Image/video processing
Use cases: Long-term memory, context retention, knowledge management
filesystem
What it can do:
- 📁 Read and write files
- 🔍 Search file contents
- 📋 List directory structure
- 📝 Create and delete files
What it cannot do:
- ❌ Execute system commands
- ❌ Access restricted directories
- ❌ Modify system configuration
Use cases: File operations, code generation, document processing
browser
What it can do:
- 🌐 Navigate to web pages
- 📸 Page screenshots
- 🔍 View page content
- 🖱️ Basic click operations
What it cannot do:
- ❌ Complex form filling
- ❌ Multi-tab management
- ❌ JavaScript execution
Use cases: Simple web access, content scraping
Intelligent suggestion system
Scenario: Web automation
Recommended MCP: chrome-devtools
# 自动启用
mcp enable chrome-devtools
# 其他关闭以节省资源
mcp disable context7
Scenario: Code search and analysis
Recommended MCP: github
mcp enable github
mcp disable chrome-devtools
Scenario: Long-term memory
Recommended MCP: context7
mcp enable context7
Scenario: File operations
Recommended MCP: filesystem
mcp enable filesystem
Health check mechanism
Check metrics
- Connection status: Whether the MCP process is running
- Response time: Invocation response latency
- Function test: Execute a simple operation test
- Error rate: Number of recent failures
Check frequency
- Real-time check: Check before each use
- Periodic check: Once per hour
- Deep check: Once per day (full function test)
Failure alerts
When an MCP is detected as unavailable:
⚠️ MCP Alert: github
状态: 不可用
错误: Connection timeout
建议: 1. 检查网络连接 2. 验证 API token 3. 重启 MCP
[自动禁用] github 已自动禁用
Automatic optimization strategy
Idle detection
- Unused for 30 minutes → Mark as candidate for shutdown
- Unused for 1 hour → Automatically shut down (unless manually enabled)
- Continuous use → Keep enabled
Resource usage priority
High priority (always keep enabled):
- filesystem (file operations)
- MCPs required by the current project
Low priority (can be automatically shut down):
- chrome-devtools (high resource usage)
- context7 (optional feature)
Intelligent prediction
Predict needs based on the user's historical behavior:
用户经常:上午代码搜索 + 下午网页自动化
预测:
- 09:00-12:00: 启用 github
- 14:00-18:00: 启用 chrome-devtools
- 其他时间: 两者都关闭
Usage examples
Example 1: Automatic health monitoring
# 启动监控服务
mcp health monitor
# 输出示例:
🔍 MCP Health Monitor
━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ chrome-devtools: OK (45ms)
✅ github: OK (120ms)
✅ context7: OK (89ms)
[Last check: 2026-01-31 17:50:00]
[Next check: 2026-01-31 17:51:00]
Example 2: Feature Q&A
用户: "chrome-devtools 能做什么?"
助手: 🎯 Chrome DevTools MCP 功能概览
✅ 强项:
• 网页自动化 - 点击、输入、导航
• 截图和快照 - 可视化页面状态
• 网络监控 - 查看请求和响应
• 性能分析 - 页面加载性能
⚠️ 局限:
• 需要 Chrome 浏览器运行
• 无法访问受限网站
• JavaScript 评估受限
💡 适用场景:
• 网页测试自动化
• 数据抓取
• UI 交互测试
需要我帮你启用它吗?
Example 3: Intelligent optimization
mcp optimize
# 输出:
📊 MCP 使用分析
━━━━━━━━━━━━━━━━━━━━━━━━━━━
活跃 MCP (3个):
• github - 使用: 15次/小时 ✅ 保持启用
• filesystem - 使用: 8次/小时 ✅ 保持启用
• chrome-devtools - 使用: 0次 (闲置30分钟)
闲置 MCP (2个):
• context7 - 未使用2小时
• browser - 未使用4小时
🔧 优化建议:
关闭 chrome-devtools (节省 ~200MB 内存)
关闭 context7 (节省 ~50MB 内存)
[应用优化] y/N? y
✅ 已优化,节省 ~250MB 内存
Configuration file
~/.mcp-manager/config.json
{
"healthCheck": {
"interval": 3600,
"timeout": 10,
"retryCount": 3
},
"autoOptimize": {
"enabled": true,
"idleTimeout": 3600,
"saveHistory": true
},
"notifications": {
"enabled": true,
"channels": ["whatsapp", "console"],
"urgency": "high"
},
"preferences": {
"alwaysKeep": ["filesystem"],
"autoClose": ["chrome-devtools", "context7"]
}
}
Command reference
| Command | Description |
|---|---|
mcp list |
List all MCPs |
mcp status [name] |
View MCP status |
mcp enable <name> |
Enable MCP |
mcp disable <name> |
Disable MCP |
mcp health check |
Health check |
mcp health monitor |
Continuous monitoring |
mcp optimize |
Automatic optimization |
mcp stats |
Usage statistics |
mcp help <name> |
MCP feature description |
Best practices
1. Enable on demand
Only enable resource-intensive MCPs (such as chrome-devtools) when needed
2. Optimize regularly
Run daily mcp optimize to clean up idle MCPs
3. Monitor health
Start mcp health monitor for continuous monitoring
4. Features first
When unsure of the requirement, first ask "Which MCP can do X?"
5. Keep required ones
Configure alwaysKeep to ensure core MCPs are always available
Troubleshooting
MCP cannot start
# 查看详细日志
mcp status github --verbose
# 检查配置
cat ~/.claude.json | grep -A 10 github
# 测试连接
mcp health check github --debug
Resource usage too high
# 查看占用
mcp stats
# 优化
mcp optimize --aggressive
# 手动关闭
mcp disable chrome-devtools
Frequent disconnections
# 检查健康检测
mcp health check --full
# 调整超时设置
# 编辑 config.json,增加 timeout 值
# 启用自动重连
mcp config set autoReconnect true
Development plan
v1.0 (current)
- ✅ Basic health check
- ✅ Manual switch management
- ✅ Feature Q&A
v1.1 (planned)
- ⏳ Automatic switching
- ⏳ Intelligent prediction
- ⏳ Usage statistics
v2.0 (future)
- ⏳ MCP performance optimization suggestions
- ⏳ Automatic dependency resolution
- ⏳ MCP update management
Contributing
Issues and PRs are welcome!
Make MCP management simple and intelligent 🚀