
能够代理任意 GraphQL API 的 MCP 并曝光 spholkql 操作为 mcp 工具 .
概览
一个MCP服务器,通过: - 从GraphQL schema introduction自动生成MCP工具 - 验证参数和处理错误以进行可靠的AI交互 - 支持 stdio和HTTP的传输用于开发和生产 - Caching schema和字段选择以保持一致性能 - :从GraphQL schema introduction创建MCP工具 - :多层验证防止了GraphQL出错 - :支持stdio(AI工具)和HTTP(开发/测试) - :可选的前置和缓存 - :认证端点的弹性头部配置 [实验] : Docker 运行时支持目前是一个正在进行中的工作. 对于生产部署,我们建议在Smithery等平台上使用TypeScript运行时间. 在您的工程根中创建 mcp.json 。 这将运行在模式中 .
概述(AI 翻译)
□ 快安装
替代性安装方法
一个MCP服务器,通过:
- 从 GraphQL 中自动生成 MCP 工具
- 验证参数和处理可靠AI相互作用的错误
- 支持Stdio和HTTP运输促进发展和生产
- 连续业绩的缓存计划和实地选择
□ * * * * 特点
- ** 工具生成**: 从 GraphQL 方案创建 MCP 工具
- ** 参数验证**:多层验证防止图QL出错
- ** 双重运输**:支持Stdio(AI工具)和HTTP(开发/测试)
- ** 计划管理**: 可选的前入和缓存
- 核证:经认证的终点的灵活头头配置 [实验]
□ 开始
** 注**: Docker 运行时间支持目前是一个正在进行中的工作. 对于生产部署,我们建议在Smithery等平台上使用TypeScript运行时间.
QQ 快速启动 HTTP 模式( 建议开发)
-
** 启动服务器**:
-
** 与MCP检查员联系**:
-
** 认证**:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP GraphQL Forge
Quick Install
Alternative Installation Methods
# Via Smithery (recommended)
npx @smithery/cli install @toolprint/mcp-graphql-forge --client claude
# Via npm
npm install -g @toolprint/mcp-graphql-forge
An MCP server that makes GraphQL APIs accessible to AI tools by:
- Automatically generating MCP tools from GraphQL schema introspection
- Validating parameters and handling errors for reliable AI interactions
- Supporting both stdio and HTTP transports for development and production
- Caching schema and field selections for consistent performance
✨ Features
- Tool Generation: Creates MCP tools from GraphQL schema introspection
- Parameter Validation: Multi-layer validation prevents GraphQL errors
- Dual Transport: Supports stdio (AI tools) and HTTP (development/testing)
- Schema Management: Optional pre-introspection and caching
- Authentication: Flexible header configuration for authenticated endpoints [Experimental]
🚀 Getting Started
Note: Docker runtime support is currently a work in progress. For production deployments, we recommend using the TypeScript runtime on platforms like Smithery.
Quick Start with HTTP Mode (Recommended for Development)
-
Start the server:
# Start serving it with the Streamable HTTP transport GRAPHQL_ENDPOINT="https://your-api.com/graphql" npx -y @toolprint/mcp-graphql-forge --transport http --port 3001 -
Connect with MCP Inspector:
# In another terminal, launch the inspector npx @modelcontextprotocol/inspector -
With authentication:
# Using environment variables for configuration export GRAPHQL_ENDPOINT="https://api.github.com/graphql" export GRAPHQL_AUTH_HEADER="Bearer YOUR_TOKEN" npx @toolprint/mcp-graphql-forge --transport http --port 3001 # Or all in one line GRAPHQL_ENDPOINT="https://api.github.com/graphql" GRAPHQL_AUTH_HEADER="Bearer YOUR_TOKEN" npx @toolprint/mcp-graphql-forge --transport http --port 3001
Direct AI Integration (Claude/Cursor)
安装
npx -y @toolprint/mcp-graphql-forge配置
{
"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"
}
}
}
}