Skip to content

MCP 接入

知识库提供标准 MCP Server(Streamable HTTP),Claude / Cursor / 自研 Agent 可直接注册。

服务地址

  • 开发:http://localhost:4180/mcp
  • 生产(示例):https://atlas-mcp.halfwaylab.cn/mcp

注册配置

json
{
  "mcpServers": {
    "design-atlas": {
      "type": "http",
      "url": "https://atlas-mcp.halfwaylab.cn/mcp",
      "headers": { "Authorization": "Bearer <API_KEY>" }
    }
  }
}

工具

工具说明
atlas_lookup按 id / slug 精确查找实体/关系/证据
atlas_search全文检索(支持 scope 过滤、limit)
atlas_graph以某实体为中心的关系邻域(BFS)
atlas_stats知识包版本、计数与治理统计

调用示例(MCP 客户端)

bash
# 用官方 SDK 客户端直连(见 scripts/mcp-e2e.mjs)
ATLAS_MCP_URL=https://atlas-mcp.halfwaylab.cn/mcp \
ATLAS_API_KEY=<API_KEY> node scripts/mcp-e2e.mjs "安藤忠雄"
text
[tools] atlas_lookup, atlas_search, atlas_graph, atlas_stats
[graph] nodes=29 edges=33 truncated=true
[stats] {"persons":174,"works":606,...}

本地 stdio 模式

bash
ATLAS_MCP_TRANSPORT=stdio ATLAS_RUNTIME_URL=http://localhost:4150 npm run mcp:start

设计图谱知识库 · Halfway Lab