Lists all available root-level fields for GraphQL queries
Gets detailed definition for a specific query field in SDL format
Lists all available root-level fields for GraphQL mutations
Gets detailed definition for a specific mutation field in SDL format
Lists all available root-level fields for GraphQL subscriptions (if present in schema)
Gets detailed definition for a specific subscription field (if present in schema)
Lists all types defined in the GraphQL schema (excluding internal types)
Gets detailed definition for a specific GraphQL type in SDL format
Gets a simplified list of fields with their types for a specific GraphQL object type
Searches for types or fields in the schema by name pattern (case-insensitive regex)
The GraphQL Schema Explorer provides a powerful interface for Large Language Models to interact with and understand GraphQL schemas. It allows models to explore query, mutation, and subscription fields, look up detailed type definitions, search for types and fields using pattern matching, and get simplified field information including types and arguments. This tool is particularly valuable for developers working with complex GraphQL APIs, as it enables AI assistants to provide accurate guidance and code examples based on the exact schema structure. By filtering out internal GraphQL types, it delivers cleaner, more relevant results focused on the application-specific parts of the schema.
The GraphQL Schema Explorer can be installed and used with various Claude interfaces, including Claude Desktop and Claude Code.
You can run the GraphQL Schema Explorer directly using npx without installing it globally:
# 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 ../path/to/schema.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 located at:
~/Library/Application Support/Claude/claude_desktop_config.json
%AppData%\Claude\claude_desktop_config.json
Add the following to your configuration:
{
"mcpServers": {
"GraphQL Schema": {
"command": "npx",
"args": ["-y", "mcp-graphql-schema", "/ABSOLUTE/PATH/TO/schema.graphqls"]
}
}
}
Replace /ABSOLUTE/PATH/TO/schema.graphqls
with the actual path to your GraphQL schema file.
To use with Claude Code CLI:
# 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/schema.graphqls
# List all configured servers
claude mcp list
# Get details for your GraphQL schema server
claude mcp get graphql-schema
claude mcp remove graphql-schema
Once configured, you can interact with your GraphQL schema by asking questions like:
For multiple schemas, you can add different MCP servers with distinct names (e.g., main API schema, Shopify schema) to keep them organized and accessible.