| 1 | import type { DocsMcpDict } from "../types"; |
| 2 | |
| 3 | /** |
| 4 | * English reference dictionary for `app/[locale]/docs/mcp/page.tsx`. |
| 5 | * Copy moved verbatim from the page's `isZh` ternaries — any wording change |
| 6 | * belongs in its own commit, never mixed into a structural move. |
| 7 | */ |
| 8 | export const docsMcp: DocsMcpDict = { |
| 9 | metaTitle: "MCP · Codewhale Docs", |
| 10 | metaDescription: |
| 11 | "Consume external tool servers over the Model Context Protocol, or expose Codewhale itself as an MCP server.", |
| 12 | bodyClassName: "text-ink-soft leading-relaxed", |
| 13 | overviewLead: |
| 14 | "Codewhale can load additional tools via MCP (Model Context Protocol). MCP servers can be local stdio processes that the TUI starts, or remote URL-based servers that speak Streamable HTTP with legacy SSE fallback. A successfully connected server registers its tools into the model catalog; a failed or disabled server is never presented as an available tool.", |
| 15 | overviewConfig: |
| 16 | "The config file defaults to {configPath} (the legacy {legacyConfigPath} is still read when the Codewhale file is absent), overridable with {configPathOption} or {configEnvVar}. The {serversKey} key used by other clients is accepted too.", |
| 17 | setupTitle: "Setup and management", |
| 18 | setupLead: |
| 19 | "Bootstrap a starter config with {initCommand}; inside the TUI, {mcpCommand} opens a compact manager showing each server's enabled state, transport, command or URL, timeouts, and connection errors. Common commands:", |
| 20 | setupReload: |
| 21 | "Config edits made from the TUI are written immediately, but the model-visible MCP tool pool is not hot-reloaded — the manager marks it restart-required. /mcp validate and /mcp reload reconnect to refresh the on-screen snapshot.", |
| 22 | authTitle: "Remote authentication", |
| 23 | authLead: |
| 24 | "URL-based servers can use static headers, env-derived env_headers, bearer_token_env_var, or OAuth. Precedence is conservative: headers and env_headers apply first; bearer_token_env_var adds an Authorization header only when one is not already set; OAuth login tokens likewise never override an explicit header. Avoid committing literal Authorization headers — prefer env_headers, bearer_token_env_var, or OAuth login so secrets stay outside the MCP file.", |
| 25 | toolsTitle: "Tool naming and safety", |
| 26 | toolsLead: |
| 27 | "Discovered MCP tools are exposed to the model as {toolNamePattern} — a server named {gitServer} with a {statusTool} tool becomes {gitStatusTool}. MCP tools flow through the same approval framework as built-in tools: read-only MCP helpers can run without prompts when policy permits, side-effectful MCP tools require approval, and Full Access does not bypass hard policy holds.", |
| 28 | toolsTrust: |
| 29 | "Only configure MCP servers you trust, and treat MCP server configuration as equivalent to running code on your machine. Reviewed local plugin bundles can also contribute MCP servers: they reuse the same MCP manager, approval, and network-policy paths, appear under namespaced <plugin>-<server> identities, and are held to a stricter boundary than hand-written mcp.json.", |
| 30 | serverTitle: "Codewhale as an MCP server", |
| 31 | serverLead: |
| 32 | "{serveMcp} runs Codewhale as an stdio MCP server so other sessions (or any MCP client) can call its tools; {mcpServerCommand} is the equivalent dispatcher entrypoint. {addSelfCommand} resolves the current binary path and writes the server into your MCP config. Keep the modes distinct: {serveHttp} is the runtime HTTP/SSE API, a separate surface.", |
| 33 | sourceNote: "Source document: docs/MCP.md · Update docs-map.ts when changing.", |
| 34 | }; |
| 35 |