{"title":"MCP là gì?","slug":"what-is-mcp","category":"mcp","summary":"Model Context Protocol cho phép LLM gọi công cụ bên ngoài. Synapse lộ 79 công cụ qua MCP server chính thức.","audience":["human","llm"],"tags":["mcp","intro","overview"],"difficulty":"beginner","updated":"2026-06-27","word_count":652,"read_minutes":3,"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":"vi","translated":true,"requested_lang":"vi","content_markdown":"\n# MCP là gì?\n\n**Model Context Protocol (MCP)** là tiêu chuẩn mở của Anthropic (2024) cho phép\nLLM gọi công cụ bên ngoài theo cách có cấu trúc. Thay vì dán tài liệu API vào\nprompt, bạn đăng ký công cụ với MCP server, và LLM gọi chúng khi cần — giống\nfunction calling, nhưng được chuẩn hóa và không phụ thuộc client.\n\n## Synapse MCP Server\n\nSynapse đi kèm với MCP server chính thức (`synapse-mcp-api` trên npm) lộ **79\ncông cụ** bao phủ tất cả tính năng Synapse:\n\n| Danh mục | Công cụ | Số lượng |\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| **Tổng** | | **79+** |\n\n## Cách hoạt động\n\n```\n┌──────────────────┐    MCP protocol    ┌──────────────────┐    HTTP    ┌──────────┐\n│  LLM Client      │ ◀─────────────────▶│  Synapse MCP     │ ─────────▶ │ Synapse  │\n│ (Claude/Cursor)  │   (stdio/SSE/WS)   │  Server          │            │ API      │\n└──────────────────┘                    └──────────────────┘            └──────────┘\n```\n\n1. Bạn cấu hình LLM client của mình (Claude Desktop, Cursor, v.v.) để sử dụng Synapse MCP server\n2. Client khởi động MCP server (qua `npx -y synapse-mcp-api@latest`)\n3. MCP server kết nối đến Synapse API sử dụng Mind Key của bạn\n4. LLM thấy tất cả 79 công cụ dưới dạng hàm native nó có thể gọi\n5. Khi LLM cần nhớ điều gì, nó gọi `memory_store` — MCP server dịch điều này thành `POST /memory` trên Synapse\n\n## Transport\n\nSynapse MCP server hỗ trợ ba transport:\n\n### stdio (cục bộ, khuyến nghị cho 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 (từ xa, multi-tenant)\n\nKết nối MCP client của bạn đến:\n\n```\nURL: https://synapse-mcp.schaefer.zone/sse\nHeaders: Authorization: Bearer YOUR_MIND_KEY\n```\n\n### WebSocket (di động, khối lượng lớn)\n\n```\nURL: wss://synapse-mcp.schaefer.zone/ws?mind_key=YOUR_MIND_KEY\n```\n\n## Tool Profile (v1.4.0)\n\nĐể giảm chi phí token cho LLM nhỏ hơn, MCP server hỗ trợ ba tool profile:\n\n| Profile | Công cụ | Token | Tốt nhất cho |\n|---------|-------|--------|----------|\n| `minimal` | 8 (composite dispatch) | ~500 | LLM tự lưu trữ với ngữ cảnh ≤8k |\n| `standard` | 25 (named) | ~2,500 | LLM kích thước trung bình (Claude Haiku, GPT-3.5) |\n| `full` | 119 (all) | ~8,250 | LLM lớn (Claude Sonnet/Opus, GPT-4) — mặc định |\n\nKiểm soát qua:\n\n- Biến môi trường: `MCP_PROFILE=minimal|standard|full`\n- Header: `Mcp-Tool-Profile: minimal|standard|full`\n\n## Client được hỗ trợ\n\n- [Claude Desktop](/docs/mcp/claude-desktop) — ứng dụng desktop của Anthropic\n- [Claude Code](/docs/mcp/claude-code) — agent lập trình terminal\n- [Cursor](/docs/mcp/cursor) — IDE dựa trên AI\n- [Continue.dev](/docs/mcp/continue) — trợ lý lập trình AI mã nguồn mở\n- [Cline](/docs/mcp/claude-code) — tiện ích mở rộng VS Code\n- Bất kỳ client tương thích MCP nào\n\n## Tại sao sử dụng MCP thay vì API trực tiếp?\n\n| Cách tiếp cận | Ưu điểm | Nhược điểm |\n|----------|------|------|\n| API trực tiếp | Đơn giản, không có lớp thêm | LLM cần biết URL, header, xác thực |\n| MCP | LLM thấy công cụ native, không cần ghi nhớ URL | Tiến trình MCP server thêm |\n\nCho hầu hết trường hợp sử dụng LLM agent, MCP là lựa chọn tốt hơn — LLM không\ncần ghi nhớ đường dẫn API hoặc mẫu xác thực.\n\n## Bước tiếp theo\n\n- [Thiết lập Claude Desktop](/docs/mcp/claude-desktop) — cấu hình 2 phút\n- [Thiết lập Claude Code](/docs/mcp/claude-code) — tích hợp terminal\n- [Client MCP tùy chỉnh](/docs/mcp/custom-client) — xây dựng của riêng bạn\n","content_html":"<h1>MCP là gì?</h1>\n<p><strong>Model Context Protocol (MCP)</strong> là tiêu chuẩn mở của Anthropic (2024) cho phép\nLLM gọi công cụ bên ngoài theo cách có cấu trúc. Thay vì dán tài liệu API vào\nprompt, bạn đăng ký công cụ với MCP server, và LLM gọi chúng khi cần — giống\nfunction calling, nhưng được chuẩn hóa và không phụ thuộc client.</p>\n<h2>Synapse MCP Server</h2>\n<p>Synapse đi kèm với MCP server chính thức (<code>synapse-mcp-api</code> trên npm) lộ <strong>79\ncông cụ</strong> bao phủ tất cả tính năng Synapse:</p>\n<table>\n<thead>\n<tr>\n<th>Danh mục</th>\n<th>Công cụ</th>\n<th>Số lượng</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>Tổng</strong></td>\n<td></td>\n<td><strong>79+</strong></td>\n</tr>\n</tbody></table>\n<h2>Cách hoạt động</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>Bạn cấu hình LLM client của mình (Claude Desktop, Cursor, v.v.) để sử dụng Synapse MCP server</li>\n<li>Client khởi động MCP server (qua <code>npx -y synapse-mcp-api@latest</code>)</li>\n<li>MCP server kết nối đến Synapse API sử dụng Mind Key của bạn</li>\n<li>LLM thấy tất cả 79 công cụ dưới dạng hàm native nó có thể gọi</li>\n<li>Khi LLM cần nhớ điều gì, nó gọi <code>memory_store</code> — MCP server dịch điều này thành <code>POST /memory</code> trên Synapse</li>\n</ol>\n<h2>Transport</h2>\n<p>Synapse MCP server hỗ trợ ba transport:</p>\n<h3>stdio (cục bộ, khuyến nghị cho 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 (từ xa, multi-tenant)</h3>\n<p>Kết nối MCP client của bạn đến:</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 (di động, khối lượng lớn)</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>Để giảm chi phí token cho LLM nhỏ hơn, MCP server hỗ trợ ba tool profile:</p>\n<table>\n<thead>\n<tr>\n<th>Profile</th>\n<th>Công cụ</th>\n<th>Token</th>\n<th>Tốt nhất cho</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>LLM tự lưu trữ với ngữ cảnh ≤8k</td>\n</tr>\n<tr>\n<td><code>standard</code></td>\n<td>25 (named)</td>\n<td>~2,500</td>\n<td>LLM kích thước trung bình (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>LLM lớn (Claude Sonnet/Opus, GPT-4) — mặc định</td>\n</tr>\n</tbody></table>\n<p>Kiểm soát qua:</p>\n<ul>\n<li>Biến môi trường: <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 được hỗ trợ</h2>\n<ul>\n<li><a href=\"/docs/mcp/claude-desktop\">Claude Desktop</a> — ứng dụng desktop của Anthropic</li>\n<li><a href=\"/docs/mcp/claude-code\">Claude Code</a> — agent lập trình terminal</li>\n<li><a href=\"/docs/mcp/cursor\">Cursor</a> — IDE dựa trên AI</li>\n<li><a href=\"/docs/mcp/continue\">Continue.dev</a> — trợ lý lập trình AI mã nguồn mở</li>\n<li><a href=\"/docs/mcp/claude-code\">Cline</a> — tiện ích mở rộng VS Code</li>\n<li>Bất kỳ client tương thích MCP nào</li>\n</ul>\n<h2>Tại sao sử dụng MCP thay vì API trực tiếp?</h2>\n<table>\n<thead>\n<tr>\n<th>Cách tiếp cận</th>\n<th>Ưu điểm</th>\n<th>Nhược điểm</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>API trực tiếp</td>\n<td>Đơn giản, không có lớp thêm</td>\n<td>LLM cần biết URL, header, xác thực</td>\n</tr>\n<tr>\n<td>MCP</td>\n<td>LLM thấy công cụ native, không cần ghi nhớ URL</td>\n<td>Tiến trình MCP server thêm</td>\n</tr>\n</tbody></table>\n<p>Cho hầu hết trường hợp sử dụng LLM agent, MCP là lựa chọn tốt hơn — LLM không\ncần ghi nhớ đường dẫn API hoặc mẫu xác thực.</p>\n<h2>Bước tiếp theo</h2>\n<ul>\n<li><a href=\"/docs/mcp/claude-desktop\">Thiết lập Claude Desktop</a> — cấu hình 2 phút</li>\n<li><a href=\"/docs/mcp/claude-code\">Thiết lập Claude Code</a> — tích hợp terminal</li>\n<li><a href=\"/docs/mcp/custom-client\">Client MCP tùy chỉnh</a> — xây dựng của riêng bạn</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"]}