mcp-graphql-enhanced — Claude Code MCP server: setup and overview
GraphQL gateway for AI assistants that prevents context overflow crashes when inspecting complex schemas. Allows targeted graph inspection and endpoint federation.
claude mcp add --env ENDPOINT=<ENDPOINT> --env HEADERS=<HEADERS> --env ALLOW_MUTATIONS=<ALLOW_MUTATIONS> --env NAME=<NAME> --env SCHEMA=<SCHEMA> --transport stdio mcp-graphql-enhanced -- npx -y @letoribo/mcp-graphql-enhancedWhat mcp-graphql-enhanced does
Monolithic schema introspection easily triggers tool size limits when handling large APIs like Neo4j or GitHub. This gateway avoids context exhaustion by letting assistants inspect specific nodes using typeNames and control recursion depth with typeDepth, keeping queries within reasonable token budgets.
The server enables switching target APIs directly inside query-graphql or introspect-schema arguments without dropping the active session. It also aggregates multiple endpoints passed as comma-separated addresses, performing object-level deduplication across federated nodes.
Mutations remain blocked out of the box to prevent accidental writes. You must supply the ALLOW_MUTATIONS environment variable before any modifying operations can run.
What it helps with
- inspect specific GraphQL types using
typeNamesandtypeDepthlimits - switch target API endpoints at runtime without resetting server state
- merge multiple independent GraphQL services into a unified federated graph
- pass custom authentication headers directly through tool arguments
Example prompts for the agent
- Run
introspect-schemafor typesUserandRepositorywithtypeDepthset to 2 - Execute a read query using
query-graphqlwith anAuthorizationheader passed in arguments - Query a secondary GraphQL target by providing a different
endpointparameter inquery-graphql
How to install mcp-graphql-enhanced
Platform CLI
claude mcp add --env ENDPOINT=<ENDPOINT> --env HEADERS=<HEADERS> --env ALLOW_MUTATIONS=<ALLOW_MUTATIONS> --env NAME=<NAME> --env SCHEMA=<SCHEMA> --transport stdio mcp-graphql-enhanced -- npx -y @letoribo/mcp-graphql-enhancedReplace <…> with your own values. 2 more environment variables are in the server README
Platform CLI
codex mcp add mcp-graphql-enhanced --env ENDPOINT=<ENDPOINT> --env HEADERS=<HEADERS> --env ALLOW_MUTATIONS=<ALLOW_MUTATIONS> --env NAME=<NAME> --env SCHEMA=<SCHEMA> -- npx -y @letoribo/mcp-graphql-enhancedReplace <…> with your own values. 2 more environment variables are in the server README
Config file
{
"mcpServers": {
"mcp-graphql-enhanced": {
"command": "npx",
"args": [
"-y",
"@letoribo/mcp-graphql-enhanced"
],
"env": {
"ENDPOINT": "<ENDPOINT>",
"HEADERS": "<HEADERS>",
"ALLOW_MUTATIONS": "<ALLOW_MUTATIONS>",
"NAME": "<NAME>",
"SCHEMA": "<SCHEMA>"
}
}
}
}Replace <…> with your own values. 2 more environment variables are in the server README
Config file
{
"servers": {
"mcp-graphql-enhanced": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@letoribo/mcp-graphql-enhanced"
],
"env": {
"ENDPOINT": "<ENDPOINT>",
"HEADERS": "<HEADERS>",
"ALLOW_MUTATIONS": "<ALLOW_MUTATIONS>",
"NAME": "<NAME>",
"SCHEMA": "<SCHEMA>"
}
}
}
}Replace <…> with your own values. 2 more environment variables are in the server README
Platform CLI
gemini mcp add -e ENDPOINT=<ENDPOINT> -e HEADERS=<HEADERS> -e ALLOW_MUTATIONS=<ALLOW_MUTATIONS> -e NAME=<NAME> -e SCHEMA=<SCHEMA> mcp-graphql-enhanced npx -y @letoribo/mcp-graphql-enhancedReplace <…> with your own values. 2 more environment variables are in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-graphql-enhanced
How to install mcp-graphql-enhanced in Claude Code?
Run claude mcp add mcp-graphql-enhanced -- npx -y @letoribo/mcp-graphql-enhanced in your terminal.
What does mcp-graphql-enhanced do?
It acts as an MCP bridge to GraphQL APIs, preventing context crashes by scoping schema introspection to specific types and depths.
Are mutations allowed by default?
No, mutations are disabled out of the box for safety. You must supply the ALLOW_MUTATIONS environment variable to permit data modifications.