> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archetype.ing/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP 服务器

> 把任意 MCP 服务器的工具交给智能体。

添加一个服务器后，它的工具会以 `mcp__<server>__<tool>` 的形式提供给智能体。

```bash theme={null}
# a local server, with what it needs in its environment
archetype mcp add docs --env DOCS_TOKEN=… -- docs-mcp --stdio

# a remote one
archetype mcp add linear https://mcp.example.com/mcp --header "Authorization: Bearer ${LINEAR_TOKEN}"

archetype mcp list           # the servers, and the plugins' own
archetype mcp check docs     # start it and list its tools
archetype mcp login linear   # sign in to a server that asks for it
archetype mcp remove docs
```

服务器保存在你的用户配置中的 `mcpServers` 下，在 Archetype 启动时加载。若想保留某个服务器但不运行它，可以为它设置 `"disabled": true`，或在应用的 MCP 页面上使用“关闭”。用 `"tools": { "deny": ["delete_repo"] }` 可以让所有引擎都无法使用某个工具。

批准规则同样适用于 MCP 工具：

```json theme={null}
{ "approvalRules": [{ "tool": "mcp__docs__*", "action": "allow" }] }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.