graphql-mcp-server

graphql-mcp-server is a skill for Claude Code, Codex from KKonstantinov/graphql2mcp. It costs 99 tokens per session (2,236 once invoked), scanned B, original, MIT.

A bridge that turns a GraphQL API into tools an AI assistant can call. GraphQL is a way for software to request specific data from an API using a defined schema.

In plain words
What is it for?
It helps connect GraphQL endpoints, local schema files, or introspection data to clients such as Claude Code, Cursor, VS Code, and Claude Desktop.
Why use it?
It avoids writing a separate tool for each GraphQL query or mutation and lets an assistant use an existing API schema.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit It helps connect GraphQL endpoints, local schema files, or introspection data to clients such as Claude Code, Cursor, VS Code, and Claude Desktop.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kkonstantinov/graphql2mcp/graphql-mcp-server
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add KKonstantinov/graphql2mcp --skill graphql-mcp-server
Clone the repo
git clone --depth 1 https://github.com/KKonstantinov/graphql2mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graphql-mcp-server

README.md
[![agentmods](https://agentmods.dev/badge/skills/kkonstantinov/graphql2mcp/graphql-mcp-server/github.svg)](https://agentmods.dev/skills/kkonstantinov/graphql2mcp/graphql-mcp-server)
Your own site
<a href="https://agentmods.dev/skills/kkonstantinov/graphql2mcp/graphql-mcp-server"><img src="https://agentmods.dev/badge/skills/kkonstantinov/graphql2mcp/graphql-mcp-server/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for graphql-mcp-server

Your own site · 80×15
<a href="https://agentmods.dev/skills/kkonstantinov/graphql2mcp/graphql-mcp-server"><img src="https://agentmods.dev/badge/skills/kkonstantinov/graphql2mcp/graphql-mcp-server.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,236 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.02236
Opus 5.5 $0.00040 $0.00894
Sonnet 5.5 $0.00020 $0.00447
Haiku 4.5 $0.00010 $0.00224

Measured 2d ago against content hash 663d0432f155, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

graphql-mcp-server scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

4. **`--include` filters mutations too.** If you combine `--include` with whitelisted mutations, list the mutations in `--include` as well. Otherwise they are dropped without any warning.
skills/graphql-mcp-server/SKILL.md · 138 lines

How it starts

The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GraphQL MCP Server (graphql2mcp)

graphql2mcp turns every field on a GraphQL schema's Query type (and any Mutation fields you opt in to) into an MCP tool. When a tool is called, it runs the matching operation against the GraphQL endpoint and returns the JSON result.

Situation Use
An MCP client (Claude Code, Cursor, …) should talk to a GraphQL API CLI: npx -y graphql2mcp <source> [options]
You already have a TypeScript McpServer and want GraphQL tools @graphql2mcp/lib → registerGraphQLTools(server, options)
Several GraphQL APIs in one server, built in code createProxyServer from graphql2mcp, see references/library.md

Runtime: Node.js >= 22, Bun >= 1.2, or Deno >= 2.

CLI

# Live endpoint: the schema is introspected and queries go to the same URL
npx -y graphql2mcp https://api.example.com/graphql -H "Authorization: Bearer $TOKEN"

# Local schema (SDL file, quoted glob, or introspection .json): -e is REQUIRED
npx -y graphql2mcp ./schema.graphql -e https://api.example.com/graphql

How <source> is interpreted: http(s):// means live introspection. *.json is a saved introspection result. Anything containing * or ? is a glob, and the matched files are merged. *.graphql/*.gql is an SDL file.

Main flags (full table in references/cli.md):

Flag Default Notes
-e, --endpoint <url> source URL Where queries are executed. Required for non-URL sources
-H, --header "K: V" One header per flag; repeat the flag. Used for introspection and execution
-m, --mutations <mode> none none, all, whitelist
--mutation-whitelist a,b Comma-separated. Switches to whitelist mode automatically
--include a,b Comma-separated GraphQL field names. Applies to queries and mutations
--exclude a,b Comma-separated. Overrides --include
-d, --depth <n> 3 How deep nested objects are selected in results
-t, --transport <type> stdio stdio or http
-p, --port <n> 3000 Only used with -t http
-n, --name <name> graphql-mcp-server MCP server name

Read the full file on GitHub · 138 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 138 lines · 99 tokens per session scan B 663d0432f155

Subscribe to this mod's changes

graphql-mcp-server is a skill published in the GitHub repository KKonstantinov/graphql2mcp (1 stars, last pushed 3d ago), licensed MIT. It adds 99 tokens to every session and 2,236 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-14.

Related

Other skills, from other repositories

mcp2cli

Turn any MCP server, OpenAPI spec, or GraphQL endpoint into a CLI. Use this skill when the user wants to interact with an MCP server, OpenAPI/REST API, or GraphQL API via command line, discover available tools/endpoints, call API operations, or generate a new skill from an API. Triggers include "mcp2cli", "call this…

knowsuchagency/mcp2cli · 126 tokens

lap

LAP CLI -- compile, search, and manage API specs for AI agents. Use when working with API specifications (OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman), compiling specs to LAP format, searching the LAP registry, generating skills from API specs, or publishing APIs. Commands: init, compile, search, get, skill…

Lap-Platform/LAP · 89 tokens

lap

LAP CLI -- compile, search, and manage API specs for AI agents. Use when working with API specifications (OpenAPI, GraphQL, AsyncAPI, Protobuf, Postman), compiling specs to LAP format, searching the LAP registry, generating skills from API specs, or publishing APIs. Commands: init, compile, search, get, skill…

Lap-Platform/LAP · 89 tokens

pipefy-api-fallback

Use this skill when a toolkit operation fails AND the introspection skill could not resolve the problem. This is the last-resort fallback (Tier 3): call the Pipefy GraphQL API directly using curl or httpx, authenticating with the Service Account (OAuth2) or a Personal Access Token (PAT) available as env var. Follow…

pipefy/ai-toolkit · 86 tokens

pipefy-introspection

Use this skill when you need to discover GraphQL type shapes, mutation signatures, enum values, or execute arbitrary GraphQL as a fallback. This is the first fallback tier (Tier 2) when dedicated operations fail or don't exist for an operation.

pipefy/ai-toolkit · 55 tokens

binance-spot-openapi-skill

Operate Binance Spot market, account, and order APIs through UXC with a curated OpenAPI schema, Binance query signing, and separate mainnet/testnet link flows.

holon-run/uxc · 42 tokens