文档MCP

MCP

通过 Model Context Protocol 连接外部工具和服务。

什么是 MCP?

MCP 让 Enter Code 连接外部工具:数据库、GitHub、Slack、文件系统、设计工具和内部 API。

配置 MCP servers

.enter/settings.json~/.enter/settings.json 中添加 server。

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"]
    }
  }
}

查看 MCP 状态

/mcp

支持的传输方式

  • stdio — server 作为子进程运行
  • HTTP — server 作为 HTTP 服务运行
  • OAuth — 带 OAuth 身份认证的 HTTP

工具命名空间

MCP 工具会按 server 分命名空间,方便识别操作来源。