{"title":"MCP คืออะไร?","slug":"what-is-mcp","category":"mcp","summary":"Model Context Protocol ช่วยให้ LLM เรียก external tool Synapse เปิดเผย tool 79 ตัวผ่าน MCP server อย่างเป็นทางการ","audience":["human","llm"],"tags":["mcp","intro","overview"],"difficulty":"beginner","updated":"2026-06-27","word_count":496,"read_minutes":2,"llm_context":"MCP = Model Context Protocol (Anthropic, 2024). Open standard for LLM-tool integration.\nSynapse has official MCP server: synapse-mcp-api (npm package, npx -y synapse-mcp-api@latest)\n79 tools exposed: 22 memory, 7 chat, 8 scheduler, 4 tasks, 5 scripts, 9 computers, 4 push, 5 user, 3 utility\n3 transports: stdio (local), HTTP/SSE (remote), WebSocket (mobile)\nSupported clients: Claude Desktop, Claude Code, Cursor, Continue, Cline, any MCP-compatible client\nTool Profiles (v1.4.0): minimal (8 tools), standard (25), full (119) — controlled via MCP_PROFILE env or Mcp-Tool-Profile header\n","lang":"th","translated":true,"requested_lang":"th","content_markdown":"\n# MCP คืออะไร?\n\n**Model Context Protocol (MCP)** เป็นมาตรฐานเปิดโดย Anthropic (2024) ที่ช่วยให้ LLM เรียก external tool ในรูปแบบที่มีโครงสร้าง แทนที่จะวาง API docs ลงใน prompt คุณลงทะเบียน tool กับ MCP server และ LLM เรียกตามต้องการ — เหมือน function calling แต่เป็นมาตรฐานและไม่ขึ้นกับ client\n\n## Synapse MCP Server\n\nSynapse มี MCP server อย่างเป็นทางการ (`synapse-mcp-api` บน npm) ที่เปิดเผย **79 tool** ครอบคลุมฟีเจอร์ Synapse ทั้งหมด:\n\n| Category | Tool | จำนวน |\n|----------|-------|-------|\n| Memory | recall, list, store, search, semantic-search, update, delete, bulk-delete, stats, unverified, contradictions, audit, related, by-tag, diff, expiring, health, sync, embed-batch, verify, unverify, mind-export | 22 |\n| Chat | poll, reply, status, history, unread, send, upload | 7 |\n| Scheduler | cron_list, cron_create, cron_delete, cron_toggle, var_list, var_get, var_set, var_delete | 8 |\n| Tasks | task_list, task_get, task_create, task_update | 4 |\n| Scripts | script_list, script_get, script_info, script_store, script_delete | 5 |\n| Computers | computer_list, computer_get, install_code, screenshot, command_queue, command_status, commands_list, disable, delete | 9 |\n| Push | vapid_public_key, subscribe, unsubscribe, test | 4 |\n| User/Mind | register, login, minds_list, mind_create, mind_delete | 5 |\n| Utility | time, calc, random | 3 |\n| Visualization | graph, tags, compact | 3 |\n| Sharing | share, list, revoke | 3 |\n| Webhooks | register, list, get, update, delete | 5 |\n| Browser | new, navigate, click, type, screenshot, close | 6 |\n| **รวม** | | **79+** |\n\n## วิธีการทำงาน\n\n```\n┌──────────────────┐    MCP protocol    ┌──────────────────┐    HTTP    ┌──────────┐\n│  LLM Client      │ ◀─────────────────▶│  Synapse MCP     │ ─────────▶ │ Synapse  │\n│ (Claude/Cursor)  │   (stdio/SSE/WS)   │  Server          │            │ API      │\n└──────────────────┘                    └──────────────────┘            └──────────┘\n```\n\n1. คุณกำหนดค่า LLM client (Claude Desktop, Cursor ฯลฯ) ให้ใช้ Synapse MCP server\n2. client เริ่ม MCP server (ผ่าน `npx -y synapse-mcp-api@latest`)\n3. MCP server เชื่อมต่อกับ Synapse API โดยใช้ Mind Key ของคุณ\n4. LLM เห็น tool ทั้ง 79 เป็น native function ที่เรียกได้\n5. เมื่อ LLM ต้องการจดจำสิ่งใด มันเรียก `memory_store` — MCP server แปลสิ่งนี้เป็น `POST /memory` บน Synapse\n\n## Transport\n\nSynapse MCP server รองรับสาม transport:\n\n### stdio (local, แนะนำสำหรับ desktop)\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_...\",\n        \"SYNAPSE_URL\": \"https://synapse.schaefer.zone\"\n      }\n    }\n  }\n}\n```\n\n### HTTP/SSE (remote, multi-tenant)\n\nเชื่อมต่อ MCP client ของคุณกับ:\n\n```\nURL: https://synapse-mcp.schaefer.zone/sse\nHeaders: Authorization: Bearer YOUR_MIND_KEY\n```\n\n### WebSocket (mobile, ปริมาณสูง)\n\n```\nURL: wss://synapse-mcp.schaefer.zone/ws?mind_key=YOUR_MIND_KEY\n```\n\n## Tool Profile (v1.4.0)\n\nเพื่อลด overhead token สำหรับ LLM ที่เล็กกว่า MCP server รองรับสาม tool profile:\n\n| Profile | Tool | Token | เหมาะกับ |\n|---------|-------|--------|----------|\n| `minimal` | 8 (composite dispatch) | ~500 | Self-hosted LLM ที่มี context ≤8k |\n| `standard` | 25 (named) | ~2,500 | Mid-size LLM (Claude Haiku, GPT-3.5) |\n| `full` | 119 (all) | ~8,250 | Large LLM (Claude Sonnet/Opus, GPT-4) — ค่าเริ่มต้น |\n\nควบคุมผ่าน:\n\n- Env var: `MCP_PROFILE=minimal|standard|full`\n- Header: `Mcp-Tool-Profile: minimal|standard|full`\n\n## Client ที่รองรับ\n\n- [Claude Desktop](/docs/mcp/claude-desktop) — desktop app ของ Anthropic\n- [Claude Code](/docs/mcp/claude-code) — terminal coding agent\n- [Cursor](/docs/mcp/cursor) — IDE ที่ขับเคลื่อนด้วย AI\n- [Continue.dev](/docs/mcp/continue) — AI coding assistant แบบ open-source\n- [Cline](/docs/mcp/claude-code) — VS Code extension\n- MCP client ใดก็ตามที่เข้ากันได้\n\n## ทำไมใช้ MCP แทน Direct API?\n\n| วิธี | ข้อดี | ข้อเสีย |\n|----------|------|------|\n| Direct API | ง่าย, ไม่มีชั้นเพิ่ม | LLM ต้องรู้ URL, header, auth |\n| MCP | LLM เห็น native tool, ไม่ต้องจำ URL | มี MCP server process เพิ่ม |\n\nสำหรับกรณีใช้งาน LLM agent ส่วนใหญ่ MCP เป็นตัวเลือกที่ดีกว่า — LLM ไม่ต้องจำ path API หรือรูปแบบ auth\n\n## ขั้นตอนถัดไป\n\n- [Claude Desktop Setup](/docs/mcp/claude-desktop) — config 2 นาที\n- [Claude Code Setup](/docs/mcp/claude-code) — integration terminal\n- [Custom MCP Client](/docs/mcp/custom-client) — สร้างของคุณเอง\n","content_html":"<h1>MCP คืออะไร?</h1>\n<p><strong>Model Context Protocol (MCP)</strong> เป็นมาตรฐานเปิดโดย Anthropic (2024) ที่ช่วยให้ LLM เรียก external tool ในรูปแบบที่มีโครงสร้าง แทนที่จะวาง API docs ลงใน prompt คุณลงทะเบียน tool กับ MCP server และ LLM เรียกตามต้องการ — เหมือน function calling แต่เป็นมาตรฐานและไม่ขึ้นกับ client</p>\n<h2>Synapse MCP Server</h2>\n<p>Synapse มี MCP server อย่างเป็นทางการ (<code>synapse-mcp-api</code> บน npm) ที่เปิดเผย <strong>79 tool</strong> ครอบคลุมฟีเจอร์ Synapse ทั้งหมด:</p>\n<table>\n<thead>\n<tr>\n<th>Category</th>\n<th>Tool</th>\n<th>จำนวน</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>Memory</td>\n<td>recall, list, store, search, semantic-search, update, delete, bulk-delete, stats, unverified, contradictions, audit, related, by-tag, diff, expiring, health, sync, embed-batch, verify, unverify, mind-export</td>\n<td>22</td>\n</tr>\n<tr>\n<td>Chat</td>\n<td>poll, reply, status, history, unread, send, upload</td>\n<td>7</td>\n</tr>\n<tr>\n<td>Scheduler</td>\n<td>cron_list, cron_create, cron_delete, cron_toggle, var_list, var_get, var_set, var_delete</td>\n<td>8</td>\n</tr>\n<tr>\n<td>Tasks</td>\n<td>task_list, task_get, task_create, task_update</td>\n<td>4</td>\n</tr>\n<tr>\n<td>Scripts</td>\n<td>script_list, script_get, script_info, script_store, script_delete</td>\n<td>5</td>\n</tr>\n<tr>\n<td>Computers</td>\n<td>computer_list, computer_get, install_code, screenshot, command_queue, command_status, commands_list, disable, delete</td>\n<td>9</td>\n</tr>\n<tr>\n<td>Push</td>\n<td>vapid_public_key, subscribe, unsubscribe, test</td>\n<td>4</td>\n</tr>\n<tr>\n<td>User/Mind</td>\n<td>register, login, minds_list, mind_create, mind_delete</td>\n<td>5</td>\n</tr>\n<tr>\n<td>Utility</td>\n<td>time, calc, random</td>\n<td>3</td>\n</tr>\n<tr>\n<td>Visualization</td>\n<td>graph, tags, compact</td>\n<td>3</td>\n</tr>\n<tr>\n<td>Sharing</td>\n<td>share, list, revoke</td>\n<td>3</td>\n</tr>\n<tr>\n<td>Webhooks</td>\n<td>register, list, get, update, delete</td>\n<td>5</td>\n</tr>\n<tr>\n<td>Browser</td>\n<td>new, navigate, click, type, screenshot, close</td>\n<td>6</td>\n</tr>\n<tr>\n<td><strong>รวม</strong></td>\n<td></td>\n<td><strong>79+</strong></td>\n</tr>\n</tbody></table>\n<h2>วิธีการทำงาน</h2>\n<pre><code class=\"hljs language-plaintext\">┌──────────────────┐    MCP protocol    ┌──────────────────┐    HTTP    ┌──────────┐\n│  LLM Client      │ ◀─────────────────▶│  Synapse MCP     │ ─────────▶ │ Synapse  │\n│ (Claude/Cursor)  │   (stdio/SSE/WS)   │  Server          │            │ API      │\n└──────────────────┘                    └──────────────────┘            └──────────┘</code></pre><ol>\n<li>คุณกำหนดค่า LLM client (Claude Desktop, Cursor ฯลฯ) ให้ใช้ Synapse MCP server</li>\n<li>client เริ่ม MCP server (ผ่าน <code>npx -y synapse-mcp-api@latest</code>)</li>\n<li>MCP server เชื่อมต่อกับ Synapse API โดยใช้ Mind Key ของคุณ</li>\n<li>LLM เห็น tool ทั้ง 79 เป็น native function ที่เรียกได้</li>\n<li>เมื่อ LLM ต้องการจดจำสิ่งใด มันเรียก <code>memory_store</code> — MCP server แปลสิ่งนี้เป็น <code>POST /memory</code> บน Synapse</li>\n</ol>\n<h2>Transport</h2>\n<p>Synapse MCP server รองรับสาม transport:</p>\n<h3>stdio (local, แนะนำสำหรับ desktop)</h3>\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_...&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>HTTP/SSE (remote, multi-tenant)</h3>\n<p>เชื่อมต่อ MCP client ของคุณกับ:</p>\n<pre><code class=\"hljs language-plaintext\">URL: https://synapse-mcp.schaefer.zone/sse\nHeaders: Authorization: Bearer YOUR_MIND_KEY</code></pre><h3>WebSocket (mobile, ปริมาณสูง)</h3>\n<pre><code class=\"hljs language-plaintext\">URL: wss://synapse-mcp.schaefer.zone/ws?mind_key=YOUR_MIND_KEY</code></pre><h2>Tool Profile (v1.4.0)</h2>\n<p>เพื่อลด overhead token สำหรับ LLM ที่เล็กกว่า MCP server รองรับสาม tool profile:</p>\n<table>\n<thead>\n<tr>\n<th>Profile</th>\n<th>Tool</th>\n<th>Token</th>\n<th>เหมาะกับ</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>minimal</code></td>\n<td>8 (composite dispatch)</td>\n<td>~500</td>\n<td>Self-hosted LLM ที่มี context ≤8k</td>\n</tr>\n<tr>\n<td><code>standard</code></td>\n<td>25 (named)</td>\n<td>~2,500</td>\n<td>Mid-size LLM (Claude Haiku, GPT-3.5)</td>\n</tr>\n<tr>\n<td><code>full</code></td>\n<td>119 (all)</td>\n<td>~8,250</td>\n<td>Large LLM (Claude Sonnet/Opus, GPT-4) — ค่าเริ่มต้น</td>\n</tr>\n</tbody></table>\n<p>ควบคุมผ่าน:</p>\n<ul>\n<li>Env var: <code>MCP_PROFILE=minimal|standard|full</code></li>\n<li>Header: <code>Mcp-Tool-Profile: minimal|standard|full</code></li>\n</ul>\n<h2>Client ที่รองรับ</h2>\n<ul>\n<li><a href=\"/docs/mcp/claude-desktop\">Claude Desktop</a> — desktop app ของ Anthropic</li>\n<li><a href=\"/docs/mcp/claude-code\">Claude Code</a> — terminal coding agent</li>\n<li><a href=\"/docs/mcp/cursor\">Cursor</a> — IDE ที่ขับเคลื่อนด้วย AI</li>\n<li><a href=\"/docs/mcp/continue\">Continue.dev</a> — AI coding assistant แบบ open-source</li>\n<li><a href=\"/docs/mcp/claude-code\">Cline</a> — VS Code extension</li>\n<li>MCP client ใดก็ตามที่เข้ากันได้</li>\n</ul>\n<h2>ทำไมใช้ MCP แทน Direct API?</h2>\n<table>\n<thead>\n<tr>\n<th>วิธี</th>\n<th>ข้อดี</th>\n<th>ข้อเสีย</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>Direct API</td>\n<td>ง่าย, ไม่มีชั้นเพิ่ม</td>\n<td>LLM ต้องรู้ URL, header, auth</td>\n</tr>\n<tr>\n<td>MCP</td>\n<td>LLM เห็น native tool, ไม่ต้องจำ URL</td>\n<td>มี MCP server process เพิ่ม</td>\n</tr>\n</tbody></table>\n<p>สำหรับกรณีใช้งาน LLM agent ส่วนใหญ่ MCP เป็นตัวเลือกที่ดีกว่า — LLM ไม่ต้องจำ path API หรือรูปแบบ auth</p>\n<h2>ขั้นตอนถัดไป</h2>\n<ul>\n<li><a href=\"/docs/mcp/claude-desktop\">Claude Desktop Setup</a> — config 2 นาที</li>\n<li><a href=\"/docs/mcp/claude-code\">Claude Code Setup</a> — integration terminal</li>\n<li><a href=\"/docs/mcp/custom-client\">Custom MCP Client</a> — สร้างของคุณเอง</li>\n</ul>\n","urls":{"html":"/docs/mcp/what-is-mcp","text":"/docs/mcp/what-is-mcp?format=text","json":"/docs/mcp/what-is-mcp?format=json","llm":"/docs/mcp/what-is-mcp?format=llm"},"translations_available":["en","zh","hi","es","fr","ar","pt","ru","ja","de","it","ko","nl","pl","tr","sv","vi","th","id","uk"]}