MCP GraphQL Forge Server

MCP that can proxy any GraphQL API and expose graphql operations as mcp tools.
  • typescript

15

GitHub Stars

typescript

Language

4 months ago

First Indexed

3 weeks ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You have a dedicated MCP server that exposes GraphQL capabilities as MCP tools. It automatically generates tools from a GraphQL schema, validates parameters to prevent errors, supports both stdio and HTTP transports for development and production, and can cache schema data for fast, consistent responses. This guide shows you how to use and install it, configure connections, and understand its key features and security considerations.

How to use

Connect your client or editor to the MCP GraphQL Forge to expose GraphQL operations as MCP tools. Use the HTTP transport for development and testing, or the stdio transport for direct integration with an AI tool or local workflow. You will benefit from automatic tool generation, robust parameter validation, and cached, optimized field selections that minimize GraphQL requests while maximizing usefulness.

How to install

Prerequisites depend on your chosen runtime. You need Node.js to run the CLI and generate tools, or a compatible runtime for the stdio integration. Ensure you have access to the internet to install dependencies.

# Quick install via npm (for HTTP/TypeScript runtime)
npx -y @toolprint/mcp-graphql-forge --transport http --port 3001
```} ]},{

Additional configuration and usage notes

Configuration supports multiple headers for authenticated endpoints, schema management options, and development-time auto-reload. You can pre-generate a schema, use a custom schema location, and force regeneration when needed. You can run in HTTP mode for external access or in stdio mode for direct AI tool integration.

# Development: start HTTP transport (example)
GRAPHQL_ENDPOINT="https://your-api.com/graphql" npx -y @toolprint/mcp-graphql-forge --transport http --port 3001

# Stdio integration (example) using a project root mcp.json
# This will run the MCP Forge in stdio mode and connect to your GraphQL endpoint
GRAPHQL_ENDPOINT="https://your-api.com/graphql" GRAPHQL_AUTH_HEADER="Bearer YOUR_TOKEN" npx @toolprint/mcp-graphql-forge --transport stdio
```} ]},{

Security and best practices

Apply strict parameter validation to ensure required fields are provided and values are properly typed. Sanitize all inputs, protect authentication headers, and leverage caching to reduce exposure to repeated GraphQL introspection. If you enable experimental header-based authentication, review how headers are configured and secured in your environment.

Examples of usage with real GraphQL endpoints

Use the following patterns to connect to common GraphQL sources and expose their operations as MCP tools.

# Strapi GraphQL integration example (HTTP)
export GRAPHQL_ENDPOINT="https://your-strapi.com/graphql"
export GRAPHQL_AUTH_HEADER="Bearer YOUR_STRAPI_TOKEN"
mcp-graphql-forge

# GitHub GraphQL integration example (HTTP)
export GRAPHQL_ENDPOINT="https://api.github.com/graphql"
export GRAPHQL_AUTH_HEADER="Bearer YOUR_GITHUB_TOKEN"
mcp-graphql-forge
```} ]},{

Understanding the generated tools

From a GraphQL schema, you get a suite of MCP tools that map to queries and mutations. Tools are generated with field selections and input validations to ensure reliable interactions.

Troubleshooting

If you encounter validation errors, verify that required parameters are provided and that you are using the correct GraphQL endpoint. Check that environment variables are correctly set and that the HTTP transport port does not conflict with other services.

Notes

For production deployments, prefer the TypeScript runtime and a stable hosting environment. Docker support is experimental and may not be fully ready for production workloads.

Available tools

query_user

Execute GraphQL query: user with required id parameter and full field selections

query_articles

Execute GraphQL query for articles with optional filters and pagination

mutation_createUser

Create a user with validated input fields and full field selections

query_posts

Query posts with optional published and author filtering and full field selections

query_post

Query a single post by slug with validated parameters

query_authors

Query authors with their related posts and metadata

mutation_createPost

Create a post with input validation and complete field selections

mutation_publishPost

Publish a post by id with required parameter validation

query_repository

Query a repository in GitHub-like APIs with intelligent result handling

query_organization

Query organizational data with full field selections and relations

query_search

Perform a generic search across entities with type-aware results

mutation_createIssue

Create an issue in a project with validated inputs

mutation_addComment

Add a comment to an entity with proper input validation

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational