{"title":"Cursor での MCP","slug":"cursor","category":"mcp","summary":"Synapse を Cursor IDE に接続してコーディングセッションをまたぐ永続的プロジェクトメモリを実現。","audience":["human"],"tags":["mcp","cursor","ide","coding"],"difficulty":"intermediate","updated":"2026-06-27","word_count":178,"read_minutes":1,"lang":"ja","translated":true,"requested_lang":"ja","content_markdown":"\n# Cursor での MCP\n\nCursor は VS Code ベースの AI 駆動 IDE です。Synapse MCP により、Cursor はセッションをまたぐ永続的メモリを得ます — プロジェクトの決定、コードベースのパターン、過去のデバッグセッションを記憶します。\n\n## 前提条件\n\n- Cursor IDE がインストール済み（<https://cursor.com>）\n- Node.js 18+\n- Synapse Mind Key\n\n## セットアップ\n\n### ステップ 1：Cursor 設定を開く\n\nCursor で：\n\n1. 設定を開く（macOS では Cmd+,、Windows/Linux では Ctrl+,）\n2. 「MCP」を検索するか、`Cursor Settings → MCP Servers` に移動\n\n### ステップ 2：Synapse MCP サーバーを追加\n\n「Add MCP Server」をクリックして設定します：\n\n| フィールド | 値 |\n|-------|-------|\n| 名前 | `synapse` |\n| タイプ | `stdio` |\n| コマンド | `npx -y synapse-mcp-api@latest` |\n| 環境変数 | `SYNAPSE_MIND_KEY=mk_YOUR_KEY, SYNAPSE_URL=https://synapse.schaefer.zone` |\n\n### ステップ 3：config.json を直接編集（代替）\n\nCursor は MCP 設定を `~/.cursor/config.json` に保存します：\n\n```json\n{\n  \"mcpServers\": {\n    \"synapse\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"synapse-mcp-api@latest\"],\n      \"env\": {\n        \"SYNAPSE_MIND_KEY\": \"mk_YOUR_MIND_KEY_HERE\",\n        \"SYNAPSE_URL\": \"https://synapse.schaefer.zone\"\n      }\n    }\n  }\n}\n```\n\n### ステップ 4：Cursor を再起動\n\nCursor を完全に再起動します（macOS では Cmd+Q して再度開く）。\n\n## 動作確認\n\nCursor のチャットパネル（Cmd+L）で：\n\n```\nrecall all my memories\n```\n\nCursor は `memory_recall` を呼び出し、保存されたメモリで応答するはずです。\n\n## よくあるパターン\n\n### プロジェクトのオンボーディング\n\n新しいプロジェクトを開くとき：\n\n```\nrecalling project context — what do I know about this codebase?\n```\n\nCursor は `memory_recall` を呼び出し、前回中断した箇所から作業を続けます。\n\n### アーキテクチャの決定\n\n```\nstore this decision: \"Using Fastify instead of Express for this project\nbecause of schema validation. Date: 2026-06-27.\"\n```\n\nCursor は `high` 優先度の `project` メモリとして保存します。\n\n### デバッグ履歴\n\n```\nwhat bugs have I hit in this codebase?\n```\n\nCursor は `mistake` メモリを検索し、過去の修正を思い出させます。\n\n### セッションをまたぐコードパターン\n\n```\nsearch memories: \"authentication pattern\"\n```\n\nCursor は以前行った認証実装に関するメモリを見つけます。\n\n## トラブルシューティング\n\n### MCP サーバーが接続しない\n\n1. Node.js を確認：`node --version`（≥ 18）\n2. MCP サーバーをテスト：`npx -y synapse-mcp-api@latest`（エラーなしで起動するはず）\n3. Cursor の MCP ログを確認（View → Output → MCP）\n4. Cursor を完全に再起動\n\n### ツールが表示されない\n\n- `~/.cursor/config.json` が有効な JSON か確認\n- `SYNAPSE_MIND_KEY` 環境変数が設定されているか確認\n- Cursor が MCP をサポートするバージョンか確認（≥ 0.42）\n\n### Mind Key が無効\n\n```bash\n# Test your Mind Key directly\ncurl -H \"Authorization: Bearer mk_YOUR_KEY\" \\\n     https://synapse.schaefer.zone/memory/recall\n```\n\n## 次のステップ\n\n- [Claude Desktop Setup](/docs/mcp/claude-desktop)\n- [Continue.dev Setup](/docs/mcp/continue)\n- [Persistent LLM Agent Guide](/docs/guides/persistent-llm-agent)\n","content_html":"<h1>Cursor での MCP</h1>\n<p>Cursor は VS Code ベースの AI 駆動 IDE です。Synapse MCP により、Cursor はセッションをまたぐ永続的メモリを得ます — プロジェクトの決定、コードベースのパターン、過去のデバッグセッションを記憶します。</p>\n<h2>前提条件</h2>\n<ul>\n<li>Cursor IDE がインストール済み（<a href=\"https://cursor.com\">https://cursor.com</a>）</li>\n<li>Node.js 18+</li>\n<li>Synapse Mind Key</li>\n</ul>\n<h2>セットアップ</h2>\n<h3>ステップ 1：Cursor 設定を開く</h3>\n<p>Cursor で：</p>\n<ol>\n<li>設定を開く（macOS では Cmd+,、Windows/Linux では Ctrl+,）</li>\n<li>「MCP」を検索するか、<code>Cursor Settings → MCP Servers</code> に移動</li>\n</ol>\n<h3>ステップ 2：Synapse MCP サーバーを追加</h3>\n<p>「Add MCP Server」をクリックして設定します：</p>\n<table>\n<thead>\n<tr>\n<th>フィールド</th>\n<th>値</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>名前</td>\n<td><code>synapse</code></td>\n</tr>\n<tr>\n<td>タイプ</td>\n<td><code>stdio</code></td>\n</tr>\n<tr>\n<td>コマンド</td>\n<td><code>npx -y synapse-mcp-api@latest</code></td>\n</tr>\n<tr>\n<td>環境変数</td>\n<td><code>SYNAPSE_MIND_KEY=mk_YOUR_KEY, SYNAPSE_URL=https://synapse.schaefer.zone</code></td>\n</tr>\n</tbody></table>\n<h3>ステップ 3：config.json を直接編集（代替）</h3>\n<p>Cursor は MCP 設定を <code>~/.cursor/config.json</code> に保存します：</p>\n<pre><code class=\"hljs language-json\"><span class=\"hljs-punctuation\">{</span>\n  <span class=\"hljs-attr\">&quot;mcpServers&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-punctuation\">{</span>\n    <span class=\"hljs-attr\">&quot;synapse&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-punctuation\">{</span>\n      <span class=\"hljs-attr\">&quot;command&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;npx&quot;</span><span class=\"hljs-punctuation\">,</span>\n      <span class=\"hljs-attr\">&quot;args&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-punctuation\">[</span><span class=\"hljs-string\">&quot;-y&quot;</span><span class=\"hljs-punctuation\">,</span> <span class=\"hljs-string\">&quot;synapse-mcp-api@latest&quot;</span><span class=\"hljs-punctuation\">]</span><span class=\"hljs-punctuation\">,</span>\n      <span class=\"hljs-attr\">&quot;env&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-punctuation\">{</span>\n        <span class=\"hljs-attr\">&quot;SYNAPSE_MIND_KEY&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;mk_YOUR_MIND_KEY_HERE&quot;</span><span class=\"hljs-punctuation\">,</span>\n        <span class=\"hljs-attr\">&quot;SYNAPSE_URL&quot;</span><span class=\"hljs-punctuation\">:</span> <span class=\"hljs-string\">&quot;https://synapse.schaefer.zone&quot;</span>\n      <span class=\"hljs-punctuation\">}</span>\n    <span class=\"hljs-punctuation\">}</span>\n  <span class=\"hljs-punctuation\">}</span>\n<span class=\"hljs-punctuation\">}</span></code></pre><h3>ステップ 4：Cursor を再起動</h3>\n<p>Cursor を完全に再起動します（macOS では Cmd+Q して再度開く）。</p>\n<h2>動作確認</h2>\n<p>Cursor のチャットパネル（Cmd+L）で：</p>\n<pre><code class=\"hljs language-plaintext\">recall all my memories</code></pre><p>Cursor は <code>memory_recall</code> を呼び出し、保存されたメモリで応答するはずです。</p>\n<h2>よくあるパターン</h2>\n<h3>プロジェクトのオンボーディング</h3>\n<p>新しいプロジェクトを開くとき：</p>\n<pre><code class=\"hljs language-plaintext\">recalling project context — what do I know about this codebase?</code></pre><p>Cursor は <code>memory_recall</code> を呼び出し、前回中断した箇所から作業を続けます。</p>\n<h3>アーキテクチャの決定</h3>\n<pre><code class=\"hljs language-plaintext\">store this decision: &quot;Using Fastify instead of Express for this project\nbecause of schema validation. Date: 2026-06-27.&quot;</code></pre><p>Cursor は <code>high</code> 優先度の <code>project</code> メモリとして保存します。</p>\n<h3>デバッグ履歴</h3>\n<pre><code class=\"hljs language-plaintext\">what bugs have I hit in this codebase?</code></pre><p>Cursor は <code>mistake</code> メモリを検索し、過去の修正を思い出させます。</p>\n<h3>セッションをまたぐコードパターン</h3>\n<pre><code class=\"hljs language-plaintext\">search memories: &quot;authentication pattern&quot;</code></pre><p>Cursor は以前行った認証実装に関するメモリを見つけます。</p>\n<h2>トラブルシューティング</h2>\n<h3>MCP サーバーが接続しない</h3>\n<ol>\n<li>Node.js を確認：<code>node --version</code>（≥ 18）</li>\n<li>MCP サーバーをテスト：<code>npx -y synapse-mcp-api@latest</code>（エラーなしで起動するはず）</li>\n<li>Cursor の MCP ログを確認（View → Output → MCP）</li>\n<li>Cursor を完全に再起動</li>\n</ol>\n<h3>ツールが表示されない</h3>\n<ul>\n<li><code>~/.cursor/config.json</code> が有効な JSON か確認</li>\n<li><code>SYNAPSE_MIND_KEY</code> 環境変数が設定されているか確認</li>\n<li>Cursor が MCP をサポートするバージョンか確認（≥ 0.42）</li>\n</ul>\n<h3>Mind Key が無効</h3>\n<pre><code class=\"hljs language-bash\"><span class=\"hljs-comment\"># Test your Mind Key directly</span>\ncurl -H <span class=\"hljs-string\">&quot;Authorization: Bearer mk_YOUR_KEY&quot;</span> \\\n     https://synapse.schaefer.zone/memory/recall</code></pre><h2>次のステップ</h2>\n<ul>\n<li><a href=\"/docs/mcp/claude-desktop\">Claude Desktop Setup</a></li>\n<li><a href=\"/docs/mcp/continue\">Continue.dev Setup</a></li>\n<li><a href=\"/docs/guides/persistent-llm-agent\">Persistent LLM Agent Guide</a></li>\n</ul>\n","urls":{"html":"/docs/mcp/cursor","text":"/docs/mcp/cursor?format=text","json":"/docs/mcp/cursor?format=json","llm":"/docs/mcp/cursor?format=llm"},"translations_available":["en","zh","hi","es","fr","ar","pt","ru","ja","de","it","ko","nl","pl","tr","sv","vi","th","id","uk"]}