MCP トラブルシューター [進行中]
⚠️重要:このパッケージは現在開発中であり、まだ本番環境での使用には適していません。現在のバージョンは開発中であり、不完全な機能や互換性に影響する変更が含まれている可能性があります。
MCP 関連の問題を診断して修正できるようにする AI モデルの自己診断フレームワーク。
建築
概要
MCP トラブルシューターは、トラブルシューティングを開発者のみのタスクから AI 自体が活用できる機能へと変換する特殊な MCP サーバーであり、AI モデルで次のことが可能になります。
- MCPログを分析- 一般的なエラーパターンを自動的にスキャンし、洞察力のある診断を提供します
- 構成の検証- サーバーの構成をベストプラクティスと照らし合わせてチェックし、問題を特定します
- テスト接続- ネットワーク接続とサーバーの可用性を確認します
- テンプレートを生成- 迅速なセットアップのために実用的な MCP サーバー構成を作成します
- 一般的な問題を修正- 構成を更新し、ソリューションを直接実装する
インストール
# Install the package globally
npm install -g @devlimelabs/mcp-troubleshooter
# Start the server
mcp-troubleshooter
使用法
Claudeデスクトップの設定
Claude Desktop の構成にこれを追加します:
{
"mcpServers": {
"troubleshooter": {
"command": "mcp-troubleshooter"
}
}
}
ツール
ログ管理ツール
- read-mcp-logs : MCP ログファイルを取得して表示します
- analyze-mcp-logs : パターン認識を使用して一般的なエラーシグネチャを識別します
設定ツール
- read-mcp-config : Claude Desktop の MCP 構成を抽出して検証します。
- update-mcp-config : 適切なバックアップメカニズムを使用して構成を安全に更新します
- validate-mcp-server-config : サーバー構成の詳細な検証を実行します
接続テストツール
- test-port-availability : MCP サーバーに必要なポートが使用可能かどうかを確認します。
- check-mcp-server-process : MCP サーバープロセスが正しく実行されているかどうかを確認します。
実装ツールの修正
- generate-mcp-server-template : さまざまな言語用にカスタマイズされたサーバーテンプレートを作成します。
- generate-claude-desktop-config : Claude Desktop 用に最適化された設定ファイルを構築します。
リソース
- common-mcp-issues : 一般的な MCP の問題とその解決策に関する包括的なガイド
- mcp-config-templates : さまざまな MCP サーバー設定用の構成テンプレート
使用例
壊れたMCPサーバーの診断
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?
MCP構成の検証
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?
プラットフォームサポート
- Windows :
%APPDATA%\Claude\
内のログと構成にアクセスします。 - macOS :
~/Library/Logs/Claude/
のログと~/Library/Application Support/Claude/
の設定にアクセスします。 - Linux :
~/.local/share/Claude/logs/
のログと~/.config/Claude/
の設定にアクセスします。
発達
# 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
ライセンス
マサチューセッツ工科大学