graphql-mcp
Allows executing any GraphQL query or mutation against any GraphQL API, supporting authentication, variables, and introspection.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@graphql-mcprun query { viewer { id name email } }"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
graphql-mcp
MCP server that exposes any GraphQL API as a single graphql tool. Works with Claude Code, Cursor, and any MCP client.
Setup
uv syncRelated MCP server: graphql-mcp-server
Configuration
All configuration is via environment variables:
Variable | Required | Description |
| Yes | The GraphQL endpoint URL |
| Yes | API key or token for authentication |
| No | Header name for auth (default: |
| No | Request timeout in seconds (default: |
Usage with Claude Code
claude --mcp-config mcp.jsonWhere mcp.json contains:
{
"mcpServers": {
"graphql": {
"command": "uv",
"args": ["run", "--directory", "/path/to/graphql-mcp", "python", "main.py"],
"env": {
"GRAPHQL_API_URL": "https://api.example.com/graphql",
"GRAPHQL_API_KEY": "your-api-key"
}
}
}
}Tool
graphql
Execute any GraphQL query or mutation.
Parameters:
query(string, required) — A GraphQL query or mutation documentvariables(object, optional) — GraphQL variables
Examples:
# Query
query { viewer { id name email } }
# Mutation with variables
mutation($id: String!, $body: String!) {
commentCreate(input: { issueId: $id, body: $body }) {
success
}
}
# Introspection
query { __type(name: "Mutation") { fields { name } } }Available Tools
1 toolgraphqlC
Execute a GraphQL query or mutation.
Args: query: A GraphQL query or mutation document. variables: Optional GraphQL variables object.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| variables | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description must fully disclose behavior. It mentions that mutations can be executed, implying potentially destructive operations, but it does not warn about side effects, permissions, error conditions, or reversibility. This is a substantial transparency gap for a mutation-capable tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is exceptionally concise, featuring a one-line summary followed by a structured Args block. Every word earns its place, with no redundancy or filler, making it easy to parse and understand.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Although the tool has an output schema to cover return values, the description misses critical context for a mutation-capable tool: it does not mention side effects, required permissions, or scenarios where mutations should be avoided. The lack of annotations amplifies this incompleteness, leaving the agent without sufficient safety information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has zero description coverage, but the description explicitly explains both parameters: 'query' as a GraphQL query or mutation document, and 'variables' as an optional GraphQL variables object. This adds meaning beyond the schema's property titles, though it lacks deeper detail such as formatting, constraints, or examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool executes a GraphQL query or mutation, providing a specific verb (execute) and resource (GraphQL). It is unambiguous and easy to understand, though it does not differentiate from siblings because none are provided.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description offers no guidance on when to use this tool versus alternatives, nor any exclusions or prerequisites. It simply states what the tool does without providing usage context, so an agent receives no decision-making support.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
graphql
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion between tools. The tool's purpose is clear: execute GraphQL queries or mutations.
The single tool name 'graphql' is not a verb_noun pattern, but there is no inconsistency to penalize. It is readable and directly reflects the tool's function.
One tool feels thin compared to a typical MCP server, but for a generic GraphQL executor, a single tool can be sufficient. It is slightly under the standard range but reasonable.
The tool can execute any GraphQL query or mutation, including introspection, covering the full domain of GraphQL operations. There are no obvious gaps for the server's stated purpose.
Maintenance
Related MCP Connectors
- OpsLevelOAuthcom.opslevel
Query your OpsLevel internal developer portal: catalog, maturity data, and tech docs.
- OneOAuthai.withone
Search, document and execute authenticated API calls across 700+ apps via one MCP server
Remote MCP for 1,500+ APIs. Vault-managed credentials; OAuth or API key. Search, load, and execute.
Unified gateway exposing 150+ tools across all NexGenData MCP servers via one endpoint.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAutomatically discovers GraphQL APIs through introspection and generates table-formatted queries with pagination, filters, and sorting. Supports multiple authentication types and provides both CLI and REST API interfaces for seamless integration.1MIT
- AlicenseNot gradedqualityDmaintenanceAutomatically generates MCP tools from any GraphQL API by introspecting its schema, supporting queries, mutations, and authentication.5GPL 3.0
- AlicenseNot gradedqualityDmaintenanceAutomatically discovers and exposes any GraphQL API as MCP tools with zero configuration.MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to execute GraphQL queries and retrieve schema information from any GraphQL endpoint.28 npm8MIT