Connects to GitHub's GraphQL API to provide tools for repository access, user information, organization management, issue creation, and comment addition.
Automatically generates MCP tools from any GraphQL API through schema introspection, enabling AI tools to query and mutate data with parameter validation and error handling.
Enables interaction with Shopify's GraphQL API for product management, order processing, and customer management with complete relationship mapping.
Integrates with Strapi CMS GraphQL API to provide tools for content querying and management, including articles, users, categories with full field selections including media and relations.
Provides tools for interacting with WooCommerce GraphQL APIs for e-commerce functionality including product and order management.
MCP GraphQL Forge
Quick Install
Alternative Installation Methods
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:
- Connect with MCP Inspector:
- With authentication:
Direct AI Integration (Claude/Cursor)
Create an mcp.json
in your project root. This will run it in stdio mode.
Schema Management
- Pre-generate schema:
- Custom schema location:
- Force schema regeneration:
Advanced Configuration
🛠️ How It Works
1. Schema Introspection
2. Intelligent Tool Generation
For a GraphQL schema like:
Fast MCP GraphQL automatically generates:
- ✅
query_user
- with requiredid
parameter validation - ✅
query_articles
- with optional filtering and pagination - ✅
mutation_createUser
- with input validation and complete field selections
3. Smart Field Selection
Instead of manual GraphQL query construction:
Fast MCP GraphQL generates optimal queries automatically:
🏗️ Architecture
Caching System
- Type-Level Caching: Each GraphQL type's field selection is computed once and reused
- Circular Reference Resolution: Intelligent detection with minimal field fallbacks
- Consistent Output: Same type always generates identical field selections
Validation Pipeline
- JSON Schema Validation: MCP clients validate parameters before execution
- Server-Side Validation: Prevents execution with missing required parameters
- GraphQL Validation: Final validation at the GraphQL layer
Transport Support
- Stdio Transport: For MCP client integration (default)
- HTTP Transport: RESTful interface with MCP 2025 Streamable HTTP specification
- Session Management: Automatic session handling for HTTP transport
📚 API Reference
CLI Options
Environment Variables
Variable | Description | Example |
---|---|---|
GRAPHQL_ENDPOINT | GraphQL API endpoint | https://api.example.com/graphql |
GRAPHQL_AUTH_HEADER | Authorization header | Bearer token123 |
GRAPHQL_HEADER_* | Custom headers | GRAPHQL_HEADER_X_API_KEY=key123 |
SCHEMA_PATH | Schema cache file path | ./schema.json |
PORT | HTTP server port | 3001 |
Generated Tool Schema
Each generated tool follows this pattern:
🧪 Testing
Comprehensive Test Suite
- 40+ Test Cases: Covering all functionality and edge cases
- Real-World Scenarios: Tests against actual GraphQL schemas (Strapi, GitHub, etc.)
- Security Testing: Prototype pollution protection and input validation
- Performance Testing: Cache efficiency and field selection optimization
Integration Testing
🛡️ Security
Parameter Validation
- Required Parameter Enforcement: Prevents GraphQL variable errors
- Null/Undefined Checking: Validates parameter presence and values
- Prototype Pollution Protection: Uses secure property checking methods
Schema Security
- Input Sanitization: All GraphQL inputs are properly typed and validated
- Circular Reference Protection: Prevents infinite recursion in field selections
- Header Validation: Secure header handling for authentication
🚀 Performance
Benchmarks
- Schema Introspection: ~10ms for typical schemas
- Tool Generation: ~5ms with caching enabled
- Field Selection: Pre-computed and cached for instant access
- Memory Usage: Efficient caching with minimal memory footprint
Optimization Features
- Field Selection Caching: Eliminates redundant field selection computation
- Schema Caching: Optional schema persistence for faster restarts
- Minimal GraphQL Queries: Only requests necessary fields
- Connection Pooling: Efficient HTTP client management
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
Code Quality
- TypeScript: Fully typed codebase
- ESLint: Consistent code formatting
- Vitest: Modern testing framework
- 100% Test Coverage: Comprehensive test suite
📖 Examples
Real-World Usage
Custom Schema Example
📄 License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
🏢 About OneGrep, Inc.
MCP GraphQL Forge is developed and maintained by OneGrep, Inc., a company focused on building developer tools and AI infrastructure.
Made with ❤️ by the OneGrep team
This server cannot be installed
MCP that can proxy any GraphQL API and expose graphql operations as mcp tools.
Related MCP Servers
- AsecurityAlicenseAqualityMCP for working with GraphQL servers.Last updated -2467232TypeScriptMIT License
- -securityAlicense-qualityA MCP server that exposes GraphQL schema information to LLMs like Claude. This server allows an LLM to explore and understand large GraphQL schemas through a set of specialized tools, without needing to load the whole schema into the contextLast updated -1238JavaScriptMIT License
- -securityAlicense-qualityA proxy service that connects MCP clients to remote MCP servers, allowing users to use server keys from MCP.so to access remote resources without running their own server.Last updated -393TypeScriptMIT License
- AsecurityAlicenseAqualityGraphQL MCP Server that acts as a bridge allowing MCP clients (like Cursor or Claude Desktop) to interact with target GraphQL APIs through standard tools for schema introspection and operation execution.Last updated -243TypeScriptMIT License