MCP Troubleshooter
A specialized diagnostic framework that enables AI models to self-diagnose and fix MCP-related issues by analyzing logs, validating configurations, testing connections, and implementing solutions.
Tools
read-mcp-logs
read-mcp-config
analyze-mcp-logs
test-port-availability
update-mcp-config
validate-mcp-server-config
check-mcp-server-process
generate-mcp-server-template
generate-claude-desktop-config
README
MCP Troubleshooter [Work in Progress]
⚠️ IMPORTANT: This package is currently under development and not yet ready for production use. The current version is a work in progress and may contain incomplete features or breaking changes.
A self-diagnostic framework for AI models that enables them to diagnose and fix MCP-related issues.
Architecture
flowchart TB
Client["AI Model\n(e.g., Claude)"]
subgraph "MCP Troubleshooter Server"
LogTools["Log Management"]
ConnTools["Connection Testing"]
ConfigTools["Configuration Analysis"]
FixTools["Fix Implementation"]
subgraph "Log Analysis Engine"
LogReader["Log Reader"]
LogParser["Pattern Recognition"]
ErrorClassifier["Issue Classification"]
end
subgraph "Connection Diagnostics"
ConnTester["Transport Testing"]
PortScanner["Port Availability"]
HandshakeTester["Protocol Validation"]
end
subgraph "Configuration Manager"
ConfigReader["Config Parser"]
ConfigValidator["Schema Validation"]
TemplateLibrary["Template Repository"]
end
end
FileSystem["Host File System\n(Logs & Configs)"]
OtherMCPs["Target MCP Servers"]
Client <--> LogTools
Client <--> ConnTools
Client <--> ConfigTools
Client <--> FixTools
LogTools --> LogAnalysisEngine
ConnTools --> ConnectionDiagnostics
ConfigTools --> ConfigurationManager
LogReader --> FileSystem
ConfigReader --> FileSystem
ConnTester --> OtherMCPs
FixTools --> FileSystem
FixTools --> OtherMCPs
style Client fill:#f9f,stroke:#333,stroke-width:2px
style FileSystem fill:#bbf,stroke:#333,stroke-width:2px
style OtherMCPs fill:#bbf,stroke:#333,stroke-width:2px
style "MCP Troubleshooter Server" fill:#eff,stroke:#333,stroke-width:4px
Overview
MCP Troubleshooter is a specialized MCP server that transforms troubleshooting from a developer-only task into a capability the AI itself can leverage, allowing AI models to:
- Analyze MCP logs - Automatically scan for common error patterns and provide insightful diagnostics
- Validate configurations - Check server configurations against best practices and identify issues
- Test connections - Verify network connectivity and server availability
- Generate templates - Create working MCP server configurations for quick setup
- Fix common issues - Update configurations and implement solutions directly
Installation
# Install the package globally
npm install -g @devlimelabs/mcp-troubleshooter
# Start the server
mcp-troubleshooter
Usage
Configuration for Claude Desktop
Add this to your Claude Desktop configuration:
{
"mcpServers": {
"troubleshooter": {
"command": "mcp-troubleshooter"
}
}
}
Tools
Log Management Tools
- read-mcp-logs: Retrieves and displays MCP log files
- analyze-mcp-logs: Uses pattern recognition to identify common error signatures
Configuration Tools
- read-mcp-config: Extracts and validates Claude Desktop's MCP configuration
- update-mcp-config: Safely updates configurations with proper backup mechanisms
- validate-mcp-server-config: Performs deep validation of server configurations
Connection Testing Tools
- test-port-availability: Checks if required ports are available for MCP servers
- check-mcp-server-process: Verifies if MCP server processes are running correctly
Fix Implementation Tools
- generate-mcp-server-template: Creates customized server templates for different languages
- generate-claude-desktop-config: Builds optimized configuration files for Claude Desktop
Resources
- common-mcp-issues: A comprehensive guide to common MCP problems and their solutions
- mcp-config-templates: Configuration templates for various MCP server setups
Example Use Cases
Diagnosing a Broken MCP Server
User: My MCP server isn't connecting properly to Claude Desktop. Can you help diagnose it?
Claude: I'll help diagnose your MCP server connection issue. First, let me run some diagnostics.
[Uses check-mcp-server-process tool with the command from the user]
I've identified several possible issues with your MCP server:
1. **Connection Timeout**: The server isn't responding within the expected timeframe.
2. **JSON-RPC Format Error**: There seems to be a format issue in the JSON-RPC responses.
3. **Transport Mismatch**: Claude Desktop is expecting stdio transport, but your server might be using SSE.
Let me run a more specific connection test to confirm:
[Uses test-port-availability tool]
The connection test confirms that your server is starting, but it's timing out during the handshake phase. This is likely due to incorrect JSON-RPC message formatting in your server implementation.
Recommended fixes:
1. Ensure your server returns properly formatted JSON-RPC 2.0 responses
2. Check your transport implementation, it should be using proper stdio pipes
3. Verify that your server is correctly handling the initialize method
Would you like me to analyze a specific log file or check your server's code for these issues?
Validating MCP Configuration
User: Can you validate my Claude Desktop MCP configuration?
Claude: I'd be happy to validate your Claude Desktop MCP configuration.
[Uses read-mcp-config tool]
I've analyzed your Claude Desktop configuration file. Here are my findings:
✅ **Valid Configuration Structure**: The overall structure of your configuration is valid.
⚠️ **Path Issues**: 2 servers have invalid paths:
- "code-llm": The file path "/usr/local/bin/code-llm" doesn't exist
- "database-tool": The command "db-tool" is not in the PATH
❌ **Environment Variables**: 1 server has missing required environment variables:
- "firebase-mcp": Missing required FIREBASE_API_KEY
✅ **Transport Configuration**: All servers properly specify transport options
Recommended fixes:
1. Update the path for "code-llm" to the correct location
2. Install "db-tool" or correct its path
3. Add the missing FIREBASE_API_KEY to the "firebase-mcp" server configuration
Would you like me to help you implement any of these fixes?
Platform Support
- Windows: Accesses logs and configs in
%APPDATA%\Claude\ - macOS: Accesses logs in
~/Library/Logs/Claude/and configs in~/Library/Application Support/Claude/ - Linux: Accesses logs in
~/.local/share/Claude/logs/and configs in~/.config/Claude/
Development
# Clone the repository
git clone https://github.com/devlimelabs/master-mcps.git
cd master-mcps
# Install dependencies
pnpm install
# Build the package
pnpm -F @devlimelabs/mcp-troubleshooter build
# Run tests
pnpm -F @devlimelabs/mcp-troubleshooter test
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。