This MCP server enables large language models like Claude to explore and understand GraphQL schemas through specialized tools. It loads schema files and provides interactive access to queries, mutations, subscriptions, and type definitions, making it easier to work with GraphQL APIs.
You can run the MCP-GraphQL-Schema server directly using npx without installation:
# Use the default schema.graphqls in current directory
npx -y mcp-graphql-schema
# Use a specific schema file (relative path)
npx -y mcp-graphql-schema ../schema.shopify.2025-01.graphqls
# Use a specific schema file (absolute path)
npx -y mcp-graphql-schema /absolute/path/to/schema.graphqls
# Show help
npx -y mcp-graphql-schema --help
To integrate with Claude Desktop, edit your configuration file:
{
"mcpServers": {
"GraphQL Schema": {
"command": "npx",
"args": ["-y", "mcp-graphql-schema", "/ABSOLUTE/PATH/TO/schema.graphqls"]
}
}
}
The configuration file is located at:
~/Library/Application Support/Claude/claude_desktop_config.json
$env:AppData\Claude\claude_desktop_config.json
To use with Claude Code CLI:
Register the MCP server:
# Basic syntax
claude mcp add graphql-schema npx -y mcp-graphql-schema
# Example with specific schema
claude mcp add shopify-graphql-schema npx -y mcp-graphql-schema ~/Projects/work/schema.shopify.2025-01.graphqls
Verify registration:
# List all configured servers
claude mcp list
# Get details for your GraphQL schema server
claude mcp get graphql-schema
Remove if needed:
claude mcp remove graphql-schema
Tips:
-s
or --scope
flag with project
(default) or global
to specify where the configuration is storedThe MCP server provides these tools for exploring GraphQL schemas:
You can ask Claude questions like:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "GraphQL-Schema" '{"command":"npx","args":["-y","mcp-graphql-schema"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"GraphQL Schema": {
"command": "npx",
"args": [
"-y",
"mcp-graphql-schema"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"GraphQL Schema": {
"command": "npx",
"args": [
"-y",
"mcp-graphql-schema"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect