| 1 | # Integrasi MCP (Server Alat Eksternal) |
| 2 | |
| 3 | Codewhale dapat memuat alat tambahan melalui **MCP (Model Context Protocol)**. Server MCP dapat berupa proses stdio lokal yang dijalankan oleh TUI, atau server jarak jauh berbasis URL yang menggunakan Streamable HTTP dengan fallback SSE. |
| 4 | |
| 5 | --- |
| 6 | |
| 7 | ## Konfigurasi Server MCP |
| 8 | |
| 9 | Konfigurasi server MCP disimpan di dalam `mcp.json` (baik di `$CODEWHALE_HOME/mcp.json` untuk global atau `.codewhale/mcp.json` untuk proyek). |
| 10 | |
| 11 | Contoh konfigurasi `mcp.json`: |
| 12 | |
| 13 | ```json |
| 14 | { |
| 15 | "mcpServers": { |
| 16 | "filesystem": { |
| 17 | "command": "npx", |
| 18 | "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"] |
| 19 | }, |
| 20 | "git": { |
| 21 | "command": "uvx", |
| 22 | "args": ["mcp-server-git", "--repository", "."] |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | ``` |
| 27 | |
| 28 | --- |
| 29 | |
| 30 | ## Perintah CLI & TUI untuk MCP |
| 31 | |
| 32 | - `/mcp` — Kelola server dan alat MCP dari dalam TUI. |
| 33 | - `codewhale mcp init` — Inisialisasi templat konfigurasi `mcp.json`. |
| 34 | - `codewhale doctor` — Periksa kesehatan dan kesiapan server MCP yang terkonfigurasi. |
| 35 |