Graphql MCP server
io.github.Docat0209/graphql·v0.1.4·1 starsTurn any GraphQL API into MCP tools. Zero config, zero code.
1 stars60 downloads/wk
Reviews
Write oneNobody has reviewed Graphql yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Graphql tools
No tool declarations could be read from the package source. They show once the server is installed.
Public scan report
scanner v0.1.10 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan23 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 189 days ago4/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Graphql compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 75/100
- higher than 45% of 48,255 servers
- GitHub stars
- 1
- more than 65% of 28,688 servers
- Downloads a week
- 60
- more than 49% of 12,191 servers with a package
Install Graphql in Claude Code, Cursor or VS Code
Runs npx -y graphql-to-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add graphql -- npx -y graphql-to-mcp
What the publisher says
From the Graphql repository's README, as published. We do not edit it. Read it on GitHub
graphql-to-mcp
Turn any GraphQL API into MCP tools — zero config, zero code.
Point graphql-to-mcp at a GraphQL endpoint and it auto-generates one MCP tool per query/mutation via introspection. Works with Claude Desktop, Cursor, Windsurf, and any MCP client.
Quick Start
Try it now — no install needed:
npx graphql-to-mcp https://countries.trevorblades.com/graphqlOr add to Claude Desktop / Cursor config:
{
"mcpServers": {
"countries": {
"command": "npx",
"args": ["-y", "graphql-to-mcp", "https://countries.trevorblades.com/graphql"]
}
}
}That's it. Claude can now query countries, continents, and languages.
Features
- Zero config — just provide a GraphQL endpoint URL
- Auto-introspection — discovers all queries and mutations automatically
- Flat parameter schemas — nested input objects are flattened for better LLM accuracy
- Smart truncation — large responses are intelligently pruned (array slicing + depth limiting)
- Auth support — Bearer tokens, API keys (header or query)
- Retry logic — automatic retries on 429/5xx with exponential backoff
- Include/exclude filters — expose only the operations you want
- Schema caching — skip re-introspection with --schema-cache for faster startup
- Mutation safety — auto-detect destructive mutations (delete, remove, etc.) and warn or block them
Usage
CLI
# Public API (no auth)
npx graphql-to-mcp https://countries.trevorblades.com/graphql
# With bearer token
npx graphql-to-mcp https://api.github.com/graphql --bearer ghp_xxxxx
# With API key
npx graphql-to-mcp https://api.example.com/graphql --api-key "X-API-Key:your-key:header"
# Filter operations
npx graphql-to-mcp https://api.example.com/graphql --include "get*" --exclude "internal*"
# With prefix (avoid name collisions when using multiple APIs)
npx graphql-to-mcp https://api.example.com/graphql --prefix myapi
# Cache schema locally for faster restarts
npx graphql-to-mcp https://api.example.com/graphql --schema-cache ./schema.json
# Force re-introspection (ignore cache)
npx graphql-to-mcp https://api.example.com/graphql --schema-cache ./schema.json --force-refresh
# Block destructive mutations (delete*, remove*, etc.)
npx graphql-to-mcp https://api.example.com/graphql --mutation-safety safeClaude Desktop / Cursor Config
{
"mcpServers": {
"github": {
"command": "npx",
"args": [
"-y", "graphql-to-mcp",
"https://api.github.com/graphql",
"--bearer", "ghp_xxxxx",
"--prefix", "github"
]
}
}
}Programmatic
import { createServer } from "graphql-to-mcp";
const server = await createServer({
endpoint: "https://api.example.com/graphql",
auth: { type: "bearer", token: "xxx" },
include: ["getUser", "listUsers"],
});How It Works
- Introspect — Fetches the GraphQL schema via introspection query
- Flatten — Nested InputObject types are flattened into simple key-value parameters (e.g., input.name → input_name)
- Generate — Each query/mutation becomes an MCP tool with a flat JSON Schema
- Execute — When an LLM calls a tool, the flat args are reconstructed into proper GraphQL variables and sent to your endpoint
Why Flat Schemas?
LLMs are significantly better at filling flat key-value parameters than deeply nested JSON objects. By flattening InputObject types, we get:
- Higher accuracy in parameter filling
- Fewer hallucinated nested structures
- Better compatibility across different LLM providers
Options
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Graphql: common questions
- Is Graphql MCP server safe?
- Mostly: it is graded B (75/100). Read the Graphql safety report
- How do I install Graphql?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Graphql need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Graphql maintained?
- The last commit was 226 days ago (2026-03-23). The latest release is v0.1.4.
- How does Graphql compare with other MCP servers?
- safety score 75/100 (higher than 45% of 48,255 servers); github stars 1 (more than 65% of 28,688 servers); downloads a week 60 (more than 49% of 12,191 servers with a package). Full comparison.