docat0209 avatar

Graphql

docat0209/mcp-graphql

Points at any GraphQL endpoint and auto-generates MCP tools for every query and mutation via introspection. No configuration files, no code generation step. Works with public APIs like the Countries GraphQL demo or authenticated services like GitHub's GraphQL API using bearer tokens or API keys. The server flattens nested input objects into simple parameters since LLMs handle flat schemas more reliably than deep nesting. Includes smart response truncation to avoid context overflow, schema caching for faster restarts, and mutation safety guards that warn or block destructive operations like deleteUser or removeRepository. Useful when you want Claude to query or modify data through a GraphQL API without building custom tool definitions by hand.

tools
10
transport
STDIO
last updated
Mar 13, 2026

Tools

10 tools

Public tool metadata for what this MCP can expose to an agent.

accounts_listList all accounts in your Cloudflare account

List all accounts in your Cloudflare account

No parameter schema in public metadata yet.

set_active_accountSet active account to be used for tool calls that require accountId1 params

Set active account to be used for tool calls that require accountId

Parameters* required
activeAccountIdParamstring
The accountId present in the users Cloudflare account, that should be the active accountId.
zones_listList all zones under a Cloudflare account6 params

List all zones under a Cloudflare account

Parameters* required
directionstring
Direction to order results (asc, desc)one of asc · descdefault: desc
namestring
Filter zones by name
orderstring
Field to order results by (name, status, account_name)default: name
pagenumber
Page number for paginationdefault: 1
perPagenumber
Number of zones per pagedefault: 50
statusstring
Filter zones by status (active, pending, initializing, moved, deleted, deactivated, read only)
zone_detailsGet details for a specific Cloudflare zone1 params

Get details for a specific Cloudflare zone

Parameters* required
zoneIdstring
The ID of the zone to get details for
graphql_schema_searchSearch the Cloudflare GraphQL API schema for types, fields, and enum values matching a keyword Use this tool when: - You are unsure which dataset to use for your query. - A user is looking for specific types, fields, or enum values in the Cloudflare GraphQL API schema. IMPORTA...4 params

Search the Cloudflare GraphQL API schema for types, fields, and enum values matching a keyword Use this tool when: - You are unsure which dataset to use for your query. - A user is looking for specific types, fields, or enum values in the Cloudflare GraphQL API schema. IMPORTA...

Parameters* required
includeInternalTypesboolean
Whether to include internal types (those starting with __) in the search resultsdefault: false
keywordstring
The keyword to search for in the schema
maxDetailsToFetchnumber
Maximum number of types to fetch details fordefault: 10
onlyObjectTypesboolean
Whether to only include OBJECT kind types in the search results with descriptionsdefault: true
graphql_schema_overviewFetch the high-level overview of the Cloudflare GraphQL API schema Use this tool when: - A user requests insights into the structure or capabilities of Cloudflare’s GraphQL API. - You need to explore available types, queries, mutations, or schema relationships exposed by Cloud...2 params

Fetch the high-level overview of the Cloudflare GraphQL API schema Use this tool when: - A user requests insights into the structure or capabilities of Cloudflare’s GraphQL API. - You need to explore available types, queries, mutations, or schema relationships exposed by Cloud...

Parameters* required
pagenumber
Page number to fetchdefault: 1
pageSizenumber
Number of types to return per pagedefault: 100
graphql_type_detailsFetch detailed information about a specific GraphQL type (dataset) IMPORTANT: After exploring the schema, DO NOT generate overly complicated GraphQL queries that the user didn't explicitly ask for. Only include fields that were specifically requested. Use this tool when: - You...5 params

Fetch detailed information about a specific GraphQL type (dataset) IMPORTANT: After exploring the schema, DO NOT generate overly complicated GraphQL queries that the user didn't explicitly ask for. Only include fields that were specifically requested. Use this tool when: - You...

Parameters* required
enumValuesPagenumber
Page number for enum values to fetchdefault: 1
enumValuesPageSizenumber
Number of enum values to return per pagedefault: 50
fieldsPagenumber
Page number for fields to fetchdefault: 1
fieldsPageSizenumber
Number of fields to return per pagedefault: 50
typeNamestring
The type name (dataset) of the GraphQL type to fetch details for
graphql_complete_schemaFetch the complete Cloudflare GraphQL API schema (combines overview and important type details)4 params

Fetch the complete Cloudflare GraphQL API schema (combines overview and important type details)

Parameters* required
includeRootTypeDetailsboolean
Whether to include detailed information about root typesdefault: true
maxTypeDetailsToFetchnumber
Maximum number of important types to fetch details fordefault: 3
typesPagenumber
Page number for types to fetchdefault: 1
typesPageSizenumber
Number of types to return per pagedefault: 100
graphql_queryExecute a GraphQL query against the Cloudflare API IMPORTANT: ONLY execute the EXACT GraphQL query provided by the user. DO NOT generate complicated queries that the user didn't explicitly ask for. CRITICAL: When querying, make sure to set a LIMIT (e.g., first: 10, limit: 20)...2 params

Execute a GraphQL query against the Cloudflare API IMPORTANT: ONLY execute the EXACT GraphQL query provided by the user. DO NOT generate complicated queries that the user didn't explicitly ask for. CRITICAL: When querying, make sure to set a LIMIT (e.g., first: 10, limit: 20)...

Parameters* required
querystring
The GraphQL query to execute
variablesobject
Variables for the query
graphql_api_explorerGenerate a Cloudflare GraphQL API Explorer link Use this tool when: - A user asks for any GraphQL queries and wants to explore them in the Cloudflare GraphQL API Explorer. - You want to provide a shareable link to a specific GraphQL query for the user to explore and modify. -...2 params

Generate a Cloudflare GraphQL API Explorer link Use this tool when: - A user asks for any GraphQL queries and wants to explore them in the Cloudflare GraphQL API Explorer. - You want to provide a shareable link to a specific GraphQL query for the user to explore and modify. -...

Parameters* required
querystring
The GraphQL query to include in the explorer link
variablesobject
Variables for the query in JSON format

Sponsors

Readme

graphql-to-mcp

npm version npm downloads License: MIT

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/graphql

Or 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


View the full README on GitHub

Details

Repository
github.com/docat0209/mcp-graphql
Package
graphql-to-mcp
Transport
STDIO
Registry
MCP registry, active

More from docat0209