mcp-graphql-forge
Configuration-driven MCP server exposing modular GraphQL queries as tools.
Key Features
Use Cases
README
mcp-graphql-forge
A lightweight, configuration-driven MCP server that exposes curated GraphQL queries as modular tools, enabling intentional API interactions from your agents.
Purpose
mcp-graphql-forge lets you turn any GraphQL endpoint into an MCP server whose tools are defined in YAML files that specify the GraphQL queries and their parameters. This allows you to create a modular, secure, and minimal server that can be easily extended without modifying the application code.
Releases
All official versions of mcp-graphql-forge are published on GitHub Releases. Since this MCP server is written in Go, each release provides pre-compiled executables for macOS, Linux, and Windows—ready to download and run.
Alternatively, if you have Go installed, you can install mcp-graphql-forge directly from source using the following command:
go install github.com/UnitVectorY-Labs/mcp-graphql-forge@latest
Configuration
The server is configured using command line parameters, environment variables, and YAML files.
Command Line Parameters
--forgeConfig: Specifies the path to the folder containing the YAML configuration files (forge.yamland tool definitions). If set, this takes precedence over theFORGE_CONFIGenvironment variable. If neither is set, the application will return an error and exit.--forgeDebug: If provided, enables detailed debug logging tostderr, including the obtained token and the full HTTP request/response for GraphQL calls. If set, this takes precedence over theFORGE_DEBUGenvironment variable.
Environment Variables
FORGE_CONFIG: Specifies the path to the folder containing the YAML configuration files (forge.yamland tool definitions). Used if--forgeConfigis not set.FORGE_DEBUG: If set totrue(case-insensitive), enables detailed debug logging tostderr, including the obtained token and the full HTTP request/response for GraphQL calls. Used if--forgeDebugis not set.
forge.yaml
The configuration folder uses a special configuration file forge.yaml that specifies the common configuration attributes.
The following attributes can be specified in the file:
name: The name of the MCP serverurl: The URL of the GraphQL endpointtoken_command: The command to use to request the Bearer token for theAuthorizationheader (optional)env: A map of environment variables to pass to the token command (optional)env_passthrough: If set totrue, passes all environment variables used when invoking mcp-graphql-forge to the token command; if used in conjunction withenv, the variables fromenvwill take precedence (optional, defaults tofalse)
An example configuration would look like:
name: "ExampleServer"
url: "https://api.github.com/graphql"
token_command: "gh auth token"
Tool Configuration
All other YAML files located in the folder are treated as configuration files. Each YAML file defines a tool for the MCP server.
The following attributes can be specified in the file:
name: The name of the MCP tooldescription: The description of the MCP toolquery: The GraphQL query to executeinputs: The list of inputs defined by the MCP tool and passed into the GraphQL query as variablesname: The name of the inputtype: The parameter type; can be 'string' or 'number'description: The description of the parameter for the MCP tool to userequired: Boolean value specifying if the attribute is required
annotations: MCP annotations that provide hints about the tool's behavior (optional)title: A human-readable title for the tool, useful for UI display (optional)readOnlyHint: If true, indicates the tool does not modify its environment (optional, default: false)destructiveHint: If true, the tool may perform destructive updates (only meaningful when readOnlyHint is false) (optional, default: true)idempotentHint: If true, calling the tool repeatedly with the same arguments has no additional effect (only meaningful when readOnlyHint is false) (optional, default: false)openWorldHint: If true, the tool may interact with an "open world" of external entities (optional, default: true)
An example configuration would look like:
name: "getUser"
description: "Fetch basic information about a user by `login`, including their name, URL, and location."
query: |
query ($login: String!) {
user(login: $login) {
id
name
url
location
}
}
inputs:
- name: "login"
type: "string"
description: "The user `login` that uniquely identifies their account."
required: true
annotations:
title: "Get User Information"
readOnlyHint: true
destructiveHint: false
idempotentHint: true
openWorldHint: true
Run in Streamable HTTP Mode
By default the server runs in stdio mode, but if you want to run in streamable HTTP mode, you can specify the --http command line flag with the server address and port (ex: --http 8080). This will run the server with the following endpoint that your MCP client can connect to:
http://localhost:8080/mcp
./mcp-graphql-forge --http 8080
If you do not specify token_command in the configuration, the "Authorization" header, if passed to the MCP server, will be passed through from the incoming MCP request to the backend GraphQL endpoint.
Limitations
- Each instance of
mcp-graphql-forgecan only be used with a single GraphQL server at a single URL. - The GraphQL queries are all exposed as Tools and not as Resources, even if they are not mutations.
Star History
Repository Owner
Organization
Repository Details
Programming Languages
Tags
Topics
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
mcp-cli
A command-line inspector and client for the Model Context Protocol
mcp-cli is a command-line interface tool designed to interact with Model Context Protocol (MCP) servers. It allows users to run and connect to MCP servers from various sources, inspect available tools, resources, and prompts, and execute commands non-interactively or interactively. The tool supports OAuth for various server types, making integration and automation seamless for developers working with MCP-compliant servers.
- ⭐ 391
- MCP
- wong2/mcp-cli
FastMCP
The fast, Pythonic way to build MCP servers and clients.
FastMCP is a production-ready framework for building Model Context Protocol (MCP) applications in Python. It streamlines the creation of MCP servers and clients, providing advanced features such as enterprise authentication, composable tools, OpenAPI/FastAPI generation, server proxying, deployment tools, and comprehensive client libraries. Designed for ease of use, it offers both standard protocol support and robust utilities for production deployments.
- ⭐ 20,201
- MCP
- jlowin/fastmcp
mcp-graphql
Enables LLMs to interact dynamically with GraphQL APIs via Model Context Protocol.
mcp-graphql provides a Model Context Protocol (MCP) server that allows large language models to discover and interact with GraphQL APIs. The implementation facilitates schema introspection, exposes the GraphQL schema as a resource, and enables secure query and mutation execution based on configuration. It supports configuration through environment variables, automated or manual installation options, and offers flexibility in using local or remote schema files. By default, mutation operations are disabled for security, but can be enabled if required.
- ⭐ 319
- MCP
- blurrah/mcp-graphql
gqai
Expose GraphQL operations as Model Context Protocol (MCP) tools for AI models.
gqai is a lightweight proxy that converts GraphQL operations into MCP-compatible tools, enabling integration with AI systems such as ChatGPT, Claude, and Cursor. It automatically discovers and exposes GraphQL queries and mutations as callable tools via an MCP server, powered by your existing GraphQL backend. Configuration is managed via standard .graphqlrc.yml and .graphql files, with support for dynamic endpoints and environment variables.
- ⭐ 21
- MCP
- fotoetienne/gqai
GitHub GraphQL MCP Server
A Model Context Protocol server for executing arbitrary GraphQL queries on GitHub's API.
GitHub GraphQL MCP Server is a Model Context Protocol (MCP) server that enables interaction with GitHub's GraphQL API. It allows users to execute any GraphQL queries and mutations against GitHub, supporting variable injection and error handling. The server is designed to integrate with Claude for Desktop, providing tooling for AI environments to access or manipulate GitHub data. Detailed documentation and configuration examples are provided for rapid setup and use.
- ⭐ 9
- MCP
- QuentinCody/github-graphql-mcp-server
Shopify Storefront MCP Server
Seamless Shopify Storefront API access for AI assistants via Model Context Protocol
Enables AI assistants to interact with Shopify store data through standardized MCP tools. Offers endpoints for product discovery, inventory management, GraphQL queries, cart operations, and comprehensive customer data manipulation. Designed for easy integration with MCP-compatible AI and automated token handling. Simplifies secure connection to Shopify's Storefront API with minimal configuration.
- ⭐ 5
- MCP
- QuentinCody/shopify-storefront-mcp-server
Didn't find tool you were looking for?