{"title":"MCP トラブルシューティング","slug":"troubleshooting","category":"mcp","summary":"よくある MCP 連携の問題を解決 — サーバーが起動しない、ツールが表示されない、認証エラー。","audience":["human","llm"],"tags":["mcp","troubleshooting","errors","debugging"],"difficulty":"intermediate","updated":"2026-06-27","word_count":322,"read_minutes":2,"llm_context":"Common issues:\n1. Node.js < 18 → upgrade to 18+\n2. Mind Key invalid → check format (mk_...), get fresh via POST /minds\n3. npx not found → install Node.js\n4. Tools not appearing → restart client, check config JSON validity\n5. SYNAPSE_URL unreachable → curl /health to verify\n6. MCP server crashes → check logs, run npx manually to see error\nDebug steps: run `npx -y synapse-mcp-api@latest` manually, check stderr\nLogs: Claude Desktop ~/Library/Logs/Claude/mcp.log, Cursor ~/.cursor/logs/\n","lang":"ja","translated":true,"requested_lang":"ja","content_markdown":"\n# MCP トラブルシューティング\n\nSynapse MCP を LLM クライアントに連携する際のよくある問題と解決策。\n\n## クイック診断チェックリスト\n\n1. ✅ Node.js 18+ がインストール済み？（`node --version`）\n2. ✅ Mind Key が `mk_` で始まる？（JWT `eyJ...` ではない）\n3. ✅ Synapse API に到達可能？（`curl https://synapse.schaefer.zone/health`）\n4. ✅ Mind Key が動作する？（`curl -H \"Authorization: Bearer mk_...\" .../memory/recall`）\n5. ✅ 設定ファイルが有効な JSON？（末尾のカンマなし、コメントなし）\n6. ✅ 設定変更後にクライアントを再起動した？\n7. ✅ MCP サーバーが手動で起動する？（`npx -y synapse-mcp-api@latest`）\n\n## 問題：クライアントにツールが表示されない\n\n### 症状\n\n- Claude Desktop / Cursor / Continue が 0 ツールを表示\n- MCP サーバーリストに 🔌 アイコンや「synapse」エントリがない\n\n### 解決策\n\n1. **クライアントを完全に再起動** — macOS では Cmd+Q（ウィンドウを閉じるだけではない）\n2. **設定ファイルの場所を確認**：\n   - Claude Desktop macOS：`~/Library/Application Support/Claude/claude_desktop_config.json`\n   - Claude Desktop Windows：`%APPDATA%\\Claude\\claude_desktop_config.json`\n   - Cursor：`~/.cursor/config.json`\n   - Continue：`~/.continue/config.json`\n3. **JSON を検証** — 設定を <https://jsonlint.com> に貼り付け\n4. **クライアントログを確認** して MCP エラーを探す：\n   - Claude Desktop：`~/Library/Logs/Claude/mcp.log`（macOS）\n   - Cursor：View → Output → MCP\n5. **MCP サーバーを手動で実行** して起動エラーを確認：\n   ```bash\n   SYNAPSE_MIND_KEY=mk_... npx -y synapse-mcp-api@latest\n   ```\n\n## 問題：「Mind Key invalid」エラー\n\n### 症状\n\n- ツールは表示されるが呼び出しが「401 Unauthorized」で失敗\n- エラー：「Mind Key fehlt oder ungültig」\n\n### 解決策\n\n1. **Mind Key フォーマットを確認** — `mk_` で始まる、約 40 文字\n2. **直接テスト**：\n   ```bash\n   curl -H \"Authorization: Bearer mk_YOUR_KEY\" \\\n        https://synapse.schaefer.zone/memory/recall\n   ```\n3. **環境変数が設定されているか確認** — stdio トランスポートの場合、環境変数はシェルではなく MCP サーバー設定にある必要がある\n4. **新しい Mind Key を取得**：\n   ```bash\n   # Login to get JWT\n   curl -X POST .../login -d '{\"email\":\"...\",\"password\":\"...\"}'\n   # Create new mind\n   curl -X POST .../minds -H \"Authorization: Bearer YOUR_JWT\" -d '{\"name\":\"new mind\"}'\n   ```\n\n## 問題：npx が見つからない\n\n### 症状\n\n- エラー：「npx: command not found」\n- MCP サーバーが起動に失敗\n\n### 解決策\n\n1. **Node.js 18+ をインストール**：\n   - macOS：`brew install node` または <https://nodejs.org> からダウンロード\n   - Linux：`curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt install -y nodejs`\n   - Windows：<https://nodejs.org> からダウンロード\n2. インストール後に**ターミナルを再起動**\n3. **確認**：`node --version && npx --version`\n\n## 問題：SYNAPSE_URL に到達できない\n\n### 症状\n\n- MCP サーバーは起動するがツール呼び出しがタイムアウト\n- エラー：「fetch failed」または「ECONNREFUSED」\n\n### 解決策\n\n1. **接続をテスト**：\n   ```bash\n   curl https://synapse.schaefer.zone/health\n   ```\n2. **企業ファイアウォールを確認** — 送信 HTTPS をブロックしている可能性\n3. **代替 URL を試す**：\n   - 本番：`https://synapse.schaefer.zone`\n   - MCP サーバー：`https://synapse-mcp.schaefer.zone`\n4. **セルフホストの場合**：Synapse インスタンスが実行中でアクセス可能であることを確認\n\n## 問題：MCP サーバーがクラッシュする\n\n### 症状\n\n- MCP サーバーが起動直後に終了\n- クライアントログに「MCP server disconnected」と表示\n\n### 解決策\n\n1. **手動で実行してエラーを確認**：\n   ```bash\n   SYNAPSE_MIND_KEY=mk_... SYNAPSE_URL=https://synapse.schaefer.zone \\\n     npx -y synapse-mcp-api@latest\n   ```\n2. **ポート競合を確認** — MCP サーバーはデフォルトでポート 13100 を使用\n3. **npx キャッシュをクリア**：\n   ```bash\n   npx clear-npx-cache\n   # or\n   rm -rf ~/.npm/_npx\n   ```\n4. **最新に更新**：\n   ```bash\n   npx -y synapse-mcp-api@latest --version\n   ```\n\n## 問題：ツール呼び出しが 429 を返す\n\n### 症状\n\n- エラー：「Rate limit exceeded」\n\n### 解決策\n\nMCP では発生しないはずです（ヘッダー認証を使用、レート制限なし）。発生した場合：\n\n1. **どこかで `?key=` を使用していないか確認** — ヘッダー認証に切り替え\n2. **`SYNAPSE_URL` を確認** — 正しいインスタンスを指していることを確認\n3. 問題が続く場合は**サポートに連絡**\n\n## 問題：ツールは表示されるが動作しない\n\n### 症状\n\n- クライアントにツールがリストされる\n- ツールを呼び出すとエラーまたは結果なし\n\n### 解決策\n\n1. **ツール名を確認** — 正確である必要（例：`memory.recall` ではなく `memory_recall`）\n2. **引数を確認** — ツールの入力スキーマを確認\n3. **直接 API でテスト**：\n   ```bash\n   curl -X POST https://synapse.schaefer.zone/memory \\\n     -H \"Authorization: Bearer mk_...\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"category\":\"fact\",\"key\":\"test\",\"content\":\"hello\"}'\n   ```\n4. **Synapse のヘルスを確認**：\n   ```bash\n   curl https://synapse.schaefer.zone/health\n   ```\n\n## ヘルプを得る\n\n上記のいずれも問題を解決しない場合：\n\n1. **既存の Issue を確認**：<https://gitlab.com/schaefer-services/synapse-mcp/-/issues>\n2. 次を含めて**新しい Issue を開く**：\n   - MCP サーバーのバージョン（`npx -y synapse-mcp-api@latest --version`）\n   - クライアント名とバージョン\n   - オペレーティングシステム\n   - 関連ログの抜粋\n   - 再現手順\n\n## 次のステップ\n\n- [Claude Desktop Setup](/docs/mcp/claude-desktop)\n- [Claude Code Setup](/docs/mcp/claude-code)\n- [API Errors](/docs/api/errors)\n","content_html":"<h1>MCP トラブルシューティング</h1>\n<p>Synapse MCP を LLM クライアントに連携する際のよくある問題と解決策。</p>\n<h2>クイック診断チェックリスト</h2>\n<ol>\n<li>✅ Node.js 18+ がインストール済み？（<code>node --version</code>）</li>\n<li>✅ Mind Key が <code>mk_</code> で始まる？（JWT <code>eyJ...</code> ではない）</li>\n<li>✅ Synapse API に到達可能？（<code>curl https://synapse.schaefer.zone/health</code>）</li>\n<li>✅ Mind Key が動作する？（<code>curl -H &quot;Authorization: Bearer mk_...&quot; .../memory/recall</code>）</li>\n<li>✅ 設定ファイルが有効な JSON？（末尾のカンマなし、コメントなし）</li>\n<li>✅ 設定変更後にクライアントを再起動した？</li>\n<li>✅ MCP サーバーが手動で起動する？（<code>npx -y synapse-mcp-api@latest</code>）</li>\n</ol>\n<h2>問題：クライアントにツールが表示されない</h2>\n<h3>症状</h3>\n<ul>\n<li>Claude Desktop / Cursor / Continue が 0 ツールを表示</li>\n<li>MCP サーバーリストに 🔌 アイコンや「synapse」エントリがない</li>\n</ul>\n<h3>解決策</h3>\n<ol>\n<li><strong>クライアントを完全に再起動</strong> — macOS では Cmd+Q（ウィンドウを閉じるだけではない）</li>\n<li><strong>設定ファイルの場所を確認</strong>：<ul>\n<li>Claude Desktop macOS：<code>~/Library/Application Support/Claude/claude_desktop_config.json</code></li>\n<li>Claude Desktop Windows：<code>%APPDATA%\\Claude\\claude_desktop_config.json</code></li>\n<li>Cursor：<code>~/.cursor/config.json</code></li>\n<li>Continue：<code>~/.continue/config.json</code></li>\n</ul>\n</li>\n<li><strong>JSON を検証</strong> — 設定を <a href=\"https://jsonlint.com\">https://jsonlint.com</a> に貼り付け</li>\n<li><strong>クライアントログを確認</strong> して MCP エラーを探す：<ul>\n<li>Claude Desktop：<code>~/Library/Logs/Claude/mcp.log</code>（macOS）</li>\n<li>Cursor：View → Output → MCP</li>\n</ul>\n</li>\n<li><strong>MCP サーバーを手動で実行</strong> して起動エラーを確認：<pre><code class=\"hljs language-bash\">SYNAPSE_MIND_KEY=mk_... npx -y synapse-mcp-api@latest</code></pre></li>\n</ol>\n<h2>問題：「Mind Key invalid」エラー</h2>\n<h3>症状</h3>\n<ul>\n<li>ツールは表示されるが呼び出しが「401 Unauthorized」で失敗</li>\n<li>エラー：「Mind Key fehlt oder ungültig」</li>\n</ul>\n<h3>解決策</h3>\n<ol>\n<li><strong>Mind Key フォーマットを確認</strong> — <code>mk_</code> で始まる、約 40 文字</li>\n<li><strong>直接テスト</strong>：<pre><code class=\"hljs language-bash\">curl -H <span class=\"hljs-string\">&quot;Authorization: Bearer mk_YOUR_KEY&quot;</span> \\\n     https://synapse.schaefer.zone/memory/recall</code></pre></li>\n<li><strong>環境変数が設定されているか確認</strong> — stdio トランスポートの場合、環境変数はシェルではなく MCP サーバー設定にある必要がある</li>\n<li><strong>新しい Mind Key を取得</strong>：<pre><code class=\"hljs language-bash\"><span class=\"hljs-comment\"># Login to get JWT</span>\ncurl -X POST .../login -d <span class=\"hljs-string\">&#x27;{&quot;email&quot;:&quot;...&quot;,&quot;password&quot;:&quot;...&quot;}&#x27;</span>\n<span class=\"hljs-comment\"># Create new mind</span>\ncurl -X POST .../minds -H <span class=\"hljs-string\">&quot;Authorization: Bearer YOUR_JWT&quot;</span> -d <span class=\"hljs-string\">&#x27;{&quot;name&quot;:&quot;new mind&quot;}&#x27;</span></code></pre></li>\n</ol>\n<h2>問題：npx が見つからない</h2>\n<h3>症状</h3>\n<ul>\n<li>エラー：「npx: command not found」</li>\n<li>MCP サーバーが起動に失敗</li>\n</ul>\n<h3>解決策</h3>\n<ol>\n<li><strong>Node.js 18+ をインストール</strong>：<ul>\n<li>macOS：<code>brew install node</code> または <a href=\"https://nodejs.org\">https://nodejs.org</a> からダウンロード</li>\n<li>Linux：<code>curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - &amp;&amp; sudo apt install -y nodejs</code></li>\n<li>Windows：<a href=\"https://nodejs.org\">https://nodejs.org</a> からダウンロード</li>\n</ul>\n</li>\n<li>インストール後に<strong>ターミナルを再起動</strong></li>\n<li><strong>確認</strong>：<code>node --version &amp;&amp; npx --version</code></li>\n</ol>\n<h2>問題：SYNAPSE_URL に到達できない</h2>\n<h3>症状</h3>\n<ul>\n<li>MCP サーバーは起動するがツール呼び出しがタイムアウト</li>\n<li>エラー：「fetch failed」または「ECONNREFUSED」</li>\n</ul>\n<h3>解決策</h3>\n<ol>\n<li><strong>接続をテスト</strong>：<pre><code class=\"hljs language-bash\">curl https://synapse.schaefer.zone/health</code></pre></li>\n<li><strong>企業ファイアウォールを確認</strong> — 送信 HTTPS をブロックしている可能性</li>\n<li><strong>代替 URL を試す</strong>：<ul>\n<li>本番：<code>https://synapse.schaefer.zone</code></li>\n<li>MCP サーバー：<code>https://synapse-mcp.schaefer.zone</code></li>\n</ul>\n</li>\n<li><strong>セルフホストの場合</strong>：Synapse インスタンスが実行中でアクセス可能であることを確認</li>\n</ol>\n<h2>問題：MCP サーバーがクラッシュする</h2>\n<h3>症状</h3>\n<ul>\n<li>MCP サーバーが起動直後に終了</li>\n<li>クライアントログに「MCP server disconnected」と表示</li>\n</ul>\n<h3>解決策</h3>\n<ol>\n<li><strong>手動で実行してエラーを確認</strong>：<pre><code class=\"hljs language-bash\">SYNAPSE_MIND_KEY=mk_... SYNAPSE_URL=https://synapse.schaefer.zone \\\n  npx -y synapse-mcp-api@latest</code></pre></li>\n<li><strong>ポート競合を確認</strong> — MCP サーバーはデフォルトでポート 13100 を使用</li>\n<li><strong>npx キャッシュをクリア</strong>：<pre><code class=\"hljs language-bash\">npx clear-npx-cache\n<span class=\"hljs-comment\"># or</span>\n<span class=\"hljs-built_in\">rm</span> -rf ~/.npm/_npx</code></pre></li>\n<li><strong>最新に更新</strong>：<pre><code class=\"hljs language-bash\">npx -y synapse-mcp-api@latest --version</code></pre></li>\n</ol>\n<h2>問題：ツール呼び出しが 429 を返す</h2>\n<h3>症状</h3>\n<ul>\n<li>エラー：「Rate limit exceeded」</li>\n</ul>\n<h3>解決策</h3>\n<p>MCP では発生しないはずです（ヘッダー認証を使用、レート制限なし）。発生した場合：</p>\n<ol>\n<li><strong>どこかで <code>?key=</code> を使用していないか確認</strong> — ヘッダー認証に切り替え</li>\n<li><strong><code>SYNAPSE_URL</code> を確認</strong> — 正しいインスタンスを指していることを確認</li>\n<li>問題が続く場合は<strong>サポートに連絡</strong></li>\n</ol>\n<h2>問題：ツールは表示されるが動作しない</h2>\n<h3>症状</h3>\n<ul>\n<li>クライアントにツールがリストされる</li>\n<li>ツールを呼び出すとエラーまたは結果なし</li>\n</ul>\n<h3>解決策</h3>\n<ol>\n<li><strong>ツール名を確認</strong> — 正確である必要（例：<code>memory.recall</code> ではなく <code>memory_recall</code>）</li>\n<li><strong>引数を確認</strong> — ツールの入力スキーマを確認</li>\n<li><strong>直接 API でテスト</strong>：<pre><code class=\"hljs language-bash\">curl -X POST https://synapse.schaefer.zone/memory \\\n  -H <span class=\"hljs-string\">&quot;Authorization: Bearer mk_...&quot;</span> \\\n  -H <span class=\"hljs-string\">&quot;Content-Type: application/json&quot;</span> \\\n  -d <span class=\"hljs-string\">&#x27;{&quot;category&quot;:&quot;fact&quot;,&quot;key&quot;:&quot;test&quot;,&quot;content&quot;:&quot;hello&quot;}&#x27;</span></code></pre></li>\n<li><strong>Synapse のヘルスを確認</strong>：<pre><code class=\"hljs language-bash\">curl https://synapse.schaefer.zone/health</code></pre></li>\n</ol>\n<h2>ヘルプを得る</h2>\n<p>上記のいずれも問題を解決しない場合：</p>\n<ol>\n<li><strong>既存の Issue を確認</strong>：<a href=\"https://gitlab.com/schaefer-services/synapse-mcp/-/issues\">https://gitlab.com/schaefer-services/synapse-mcp/-/issues</a></li>\n<li>次を含めて<strong>新しい Issue を開く</strong>：<ul>\n<li>MCP サーバーのバージョン（<code>npx -y synapse-mcp-api@latest --version</code>）</li>\n<li>クライアント名とバージョン</li>\n<li>オペレーティングシステム</li>\n<li>関連ログの抜粋</li>\n<li>再現手順</li>\n</ul>\n</li>\n</ol>\n<h2>次のステップ</h2>\n<ul>\n<li><a href=\"/docs/mcp/claude-desktop\">Claude Desktop Setup</a></li>\n<li><a href=\"/docs/mcp/claude-code\">Claude Code Setup</a></li>\n<li><a href=\"/docs/api/errors\">API Errors</a></li>\n</ul>\n","urls":{"html":"/docs/mcp/troubleshooting","text":"/docs/mcp/troubleshooting?format=text","json":"/docs/mcp/troubleshooting?format=json","llm":"/docs/mcp/troubleshooting?format=llm"},"translations_available":["en","zh","hi","es","fr","ar","pt","ru","ja","de","it","ko","nl","pl","tr","sv","vi","th","id","uk"]}