GraphQL MCP Server
Provides tools to introspect a configured GraphQL schema and execute GraphQL queries or mutations with optional variables against the GraphQL endpoint.
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 MCP Server introspect the GraphQL schema and show available queries and mutations"
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 Server
A Model Context Protocol (MCP) server that provides tools to interact with GraphQL endpoints. This server allows Claude Desktop to introspect GraphQL schemas and execute queries/mutations against any GraphQL API.
Features
GraphQL Introspection: Discover available types, queries, and mutations in a GraphQL schema
Query/Mutation Execution: Execute GraphQL queries and mutations with variables support
Environment-based Configuration: Configure GraphQL endpoint and headers via environment variables
Claude Desktop Integration: Ready to use with Claude Desktop
Related MCP server: mcp-graphql-tools
Tools Provided
1. graphql_introspect
Introspects the GraphQL schema to discover available types, queries, and mutations.
Parameters: None
Returns: The GraphQL schema in SDL format plus raw introspection data
2. graphql_execute
Executes GraphQL queries and mutations against the configured endpoint.
Parameters:
query(required): The GraphQL query or mutation to executevariables(optional): Variables to pass to the GraphQL query/mutation
Returns: The JSON response from the GraphQL endpoint
Setup
Install dependencies:
npm installBuild the project:
npm run buildCreate a
.envfile with your GraphQL configuration:
cp .env.example .envEdit
.envwith your GraphQL endpoint and headers:
GRAPHQL_ENDPOINT=https://your-graphql-api.com/graphql
GRAPHQL_HEADERS={"Authorization": "Bearer your-token", "Content-Type": "application/json"}Claude Desktop Configuration
Add this server to your Claude Desktop configuration file:
macOS
~/Library/Application Support/Claude/claude_desktop_config.json
Windows
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"graphql": {
"command": "node",
"args": ["/path/to/your/project/dist/index.js"],
"env": {
"GRAPHQL_ENDPOINT": "https://your-graphql-api.com/graphql",
"GRAPHQL_HEADERS": "{\"Authorization\": \"Bearer your-token\", \"Content-Type\": \"application/json\"}"
}
}
}
}Development
Run in development mode:
npm run devEnvironment Variables
GRAPHQL_ENDPOINT: The URL of your GraphQL endpoint (required)GRAPHQL_HEADERS: JSON string containing headers to send with requests (optional)
Example Usage
Once configured with Claude Desktop, you can:
Introspect a schema:
Ask Claude: "Can you introspect the GraphQL schema to see what's available?"
Execute queries:
Ask Claude: "Can you run a query to get all users?"
Claude will use the
graphql_executetool with an appropriate query
Execute mutations:
Ask Claude: "Can you create a new user with name 'John' and email 'john@example.com'?"
Claude will construct and execute the appropriate mutation
License
MIT
Available Tools
2 toolsgraphql_executeC
Execute GraphQL queries and mutations against the configured endpoint
Inputs: query (required), variables.
graphql_introspectA
Introspect the GraphQL schema to discover available types, queries, and mutations
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one discovers the schema, the other executes operations against it. There is no meaningful overlap or risk of misselection.
Both names follow a consistent graphql_<verb> snake_case pattern. The convention is predictable and readable.
Two tools is below the typical 3-15 range, but the generic execute tool subsumes arbitrary queries and mutations, making the surface compact rather than deficient. A slightly richer surface could still be reasonable, but the count is defensible.
Introspection plus generic execution covers discovery and both read and write operations, which is the core GraphQL lifecycle. Minor gaps exist around subscriptions, explicit schema validation, or query analysis, but core workflows are covered.
Maintenance
Related MCP Connectors
The Grafbase MCP server sits in front of a GraphQL API and exposes an MCP protocol-compliant interface that allows AI agents and LLMs to explore and query GraphQL APIs using natural language. It provides tools to search schemas, introspect types and fields, and execute GraphQL queries while minimizing context bloat by returning only relevant schema subsets, with built-in support for authentication, authorization, and configurable access control.
Connect ChatGPT or Claude to your CRM, store or shipping API. Keys stay out of the chat.
Use your LinkedIn from Claude and ChatGPT. Actions run in your own Chrome through a free extension.
Lets Claude, ChatGPT, and Muse read and update your beckett tasks, notes, calendar, and lists.
Related MCP Servers
- AlicenseAqualityDmaintenanceGraphQL MCP Server that acts as a bridge allowing MCP clients (like Cursor or Claude Desktop) to interact with target GraphQL APIs through standard tools for schema introspection and operation execution.23MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to execute GraphQL queries and retrieve schema information from any GraphQL endpoint.28MIT
- AlicenseAqualityDmaintenanceProvides comprehensive GraphQL introspection, filtering, and query/mutation execution with safety controls. Enables AI agents to explore and interact with GraphQL APIs through natural language.71MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with GraphQL APIs through schema introspection and query execution.1MIT