mcp-graphql-forge
by toolprint·★ 18·综合分 40
将 GraphQL API 转换为 MCP 工具的 MCP 服务器,自动进行参数验证和字段选择缓存。
概述
MCP GraphQL Forge 是一个专业的 MCP 服务器,通过从 GraphQL 模型内省自动生成 MCP 工具,将 GraphQL API 与 AI 工具连接起来。它支持双传输模式(stdio 用于 AI 集成,HTTP 用于开发),全面的参数验证可防止 GraphQL 错误,以及智能字段选择系统,可处理循环引用并优化查询结构。该服务器支持预内省和模型缓存以确保性能一致,同时提供实验性认证支持。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您使用 GraphQL API 并需要 AI 工具集成而不想手动构建查询时,选择此服务器。适合已经在使用 GraphQL 并希望将其 API 暴露给 AI 助手的团队。
什么时候不要选它
如果您主要使用 REST API 或需要超出简单基于内省的工具生成的复杂查询功能,请不要选择此服务器。
此 server 暴露的工具
从 README 抽取出 12 个工具query_userExecute GraphQL query to retrieve a user by ID
query_articlesExecute GraphQL query to retrieve articles with optional filters
mutation_createUserExecute GraphQL mutation to create a new user
query_postsExecute GraphQL query to retrieve blog posts with optional filters
query_postExecute GraphQL query to retrieve a single post by slug
query_authorsExecute GraphQL query to retrieve all authors
mutation_createPostExecute GraphQL mutation to create a new blog post
mutation_publishPostExecute GraphQL mutation to publish a post by ID
query_productsExecute GraphQL query to retrieve products with optional filters
mutation_productCreateExecute GraphQL mutation to create a new product
query_ordersExecute GraphQL query to retrieve orders with optional filters
mutation_orderUpdateExecute GraphQL mutation to update an existing order
可对比工具
安装
安装
推荐方法 (Smithery)
npx @smithery/cli install @toolprint/mcp-graphql-forge --client claude替代方法
# npm install
npm install -g @toolprint/mcp-graphql-forgeClaude Desktop 配置
将此内容添加到您的 claude_desktop_config.json 中:
{
"mcpServers": {
"mcp-graphql-forge": {
"command": "npx",
"args": [
"-y",
"@toolprint/mcp-graphql-forge"
],
"env": {
"GRAPHQL_ENDPOINT": "https://your-api.com/graphql",
"GRAPHQL_AUTH_HEADER": "Bearer YOUR_TOKEN"
}
}
}
}FAQ
- 它如何处理 GraphQL 内省?
- 服务器会自动内省 GraphQL API 以生成工具。您可以使用 'introspect' 命令预生成并缓存模型,以加快启动速度。
- 它是否支持认证?
- 是的,它支持通过环境变量(如 GRAPHQL_AUTH_HEADER)进行认证。可以使用 GRAPHQL_HEADER_* 前缀配置自定义标头。
mcp-graphql-forge 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。