跳到正文
原文
V2EX 最新主题· tangkikodo·· 13 天前AI 评分47

fastapi-gql-mcp:把 FastAPI 应用转成 Agent 友好的 MCP 服务

[Python] fastapi-gql-mcp, 将 fastapi 应用转变成 agent 友好的 mcp 服务

AI 导读

开源项目 fastapi-gql-mcp 借鉴 GraphQL 思路,把 FastAPI 的每个 endpoint 当作 GraphQL 节点、返回类型作为子节点树,生成 query 和 mutation 的 schema,以解决 FastAPI-MCP 在 endpoint 增多时 MCP tools 过多、返回数据过大撑爆 Context 的问题。

来源:V2EX 最新主题 · v2ex.com