Back to MCP Catalog

GraphQL Schema Explorer MCP Server

Developer ToolsJavaScript
Explore and understand GraphQL schemas through specialized tools
Available Tools

list-query-fields

Lists all available root-level fields for GraphQL queries

get-query-field

Gets detailed definition for a specific query field in SDL format

list-mutation-fields

Lists all available root-level fields for GraphQL mutations

get-mutation-field

Gets detailed definition for a specific mutation field in SDL format

list-subscription-fields

Lists all available root-level fields for GraphQL subscriptions (if present in schema)

get-subscription-field

Gets detailed definition for a specific subscription field (if present in schema)

list-types

Lists all types defined in the GraphQL schema (excluding internal types)

get-type

Gets detailed definition for a specific GraphQL type in SDL format

get-type-fields

Gets a simplified list of fields with their types for a specific GraphQL object type

search-schema

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.

Installation

The GraphQL Schema Explorer can be installed and used with various Claude interfaces, including Claude Desktop and Claude Code.

Using with npx (Quickest Method)

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

Claude Desktop Integration

To integrate with Claude Desktop, edit your configuration file located at:

  • macOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %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.

Claude Code Integration

To use with Claude Code CLI:

  1. Add the GraphQL Schema Explorer to Claude Code:
# 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
  1. Verify the MCP server is registered:
# List all configured servers
claude mcp list

# Get details for your GraphQL schema server
claude mcp get graphql-schema
  1. To remove the server if needed:
claude mcp remove graphql-schema

Usage Tips

Once configured, you can interact with your GraphQL schema by asking questions like:

  • "What query fields are available in this GraphQL schema?"
  • "Show me the details of the 'user' query field."
  • "What mutation operations can I perform in this schema?"
  • "List all types defined in this schema."
  • "Show me the definition of the 'Product' type."
  • "List all fields of the 'Order' type."
  • "Search for types and fields related to 'customer'."

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.

Related MCPs

Apple Shortcuts
Developer ToolsJavaScript

Control Apple Shortcuts automations from AI assistants

Clojars Dependency Lookup
Developer ToolsJavaScript

Fetch dependency information from Clojars, the Clojure community's artifact repository

Simple Timeserver
Developer ToolsPython

Provides Claude with current time and timezone information

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.