by hannesj
mcp-graphql-schema is a Model Context Protocol (MCP) server that exposes GraphQL schema information to Large Language Models (LLMs). It enables LLMs to explore and understand complex GraphQL schemas efficiently by providing specialized tools to interact with the schema without overwhelming their context window.
mcp-graphql-schema is a Model Context Protocol (MCP) server designed to expose GraphQL schema information to Large Language Models (LLMs) like Claude. It allows LLMs to explore and understand complex GraphQL schemas without overwhelming their context window, by providing a set of specialized tools to interact with the schema.
Run the MCP server with a specific schema file:
npx -y mcp-graphql-schema # Use default schema.graphqls
npx -y mcp-graphql-schema ../schema.shopify.2025-01.graphqls # Use a specific relative path schema
npx -y mcp-graphql-schema /absolute/path/to/schema.graphqls # Use a specific absolute path schema
npx -y mcp-graphql-schema --help # Show help
npx -y @smithery/cli install @hannesj/mcp-graphql-schema --client claude
Edit your claude_desktop_config.json:
{
"mcpServers": {
"GraphQL Schema": {
"command": "npx",
"args": ["-y", "mcp-graphql-schema", "/ABSOLUTE/PATH/TO/schema.graphqls"]
}
}
}
claude mcp add graphql-schema npx -y mcp-graphql-schema
claude mcp add shopify-graphql-schema npx -y mcp-graphql-schema ~/Projects/work/schema.shopify.2025-01.graphqls
claude mcp list
claude mcp get graphql-schema
claude mcp remove graphql-schema
list-query-fields, get-query-field, list-mutation-fields, get-mutation-field, list-subscription-fields, get-subscription-field, list-types, get-type, get-type-fields, search-schema.Q: What is the purpose of mcp-graphql-schema? A: It acts as a bridge, allowing Large Language Models (LLMs) to effectively understand and navigate complex GraphQL schemas by providing a structured way to query schema information.
Q: How does it prevent context bloating for LLMs? A: Instead of feeding the entire schema to the LLM, it provides specific tools that the LLM can use to request only the relevant parts of the schema as needed, thus managing the context efficiently.
Q: Can I use it with any GraphQL schema? A: Yes, you can load any GraphQL schema file by specifying its path when running the server.
Q: What kind of information can LLMs retrieve about the schema? A: LLMs can retrieve information about query, mutation, and subscription fields, detailed type definitions, simplified field information, and can search for types and fields using pattern matching.
Q: Is it compatible with different Claude environments? A: Yes, it provides integration instructions for Claude Desktop and Claude Code CLI, making it versatile for different Claude users.
A Model Context Protocol (MCP) server that exposes GraphQL schema information to Large Language Models (LLMs) like Claude. This server allows an LLM to explore and understand GraphQL schemas through a set of specialized tools.
Run the MCP server with a specific schema file:
# 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 install GraphQL Schema for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @hannesj/mcp-graphql-schema --client claude
To use this MCP server with Claude Desktop, edit your claude_desktop_config.json configuration file:
{
"mcpServers": {
"GraphQL Schema": {
"command": "npx",
"args": ["-y", "mcp-graphql-schema", "/ABSOLUTE/PATH/TO/schema.graphqls"]
}
}
}
Location of the configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json$env:AppData\Claude\claude_desktop_config.jsonTo use this MCP server with Claude Code CLI, follow these steps:
Add the GraphQL Schema MCP server 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/work/schema.shopify.2025-01.graphqls
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
Remove the server if needed
claude mcp remove graphql-schema
Use the tool in Claude Code
Once configured, you can invoke the tool in your Claude Code session by asking questions about the GraphQL schema.
Tips:
-s or --scope flag with project (default) or global to specify where the configuration is storedThe server provides the following tools for LLMs to interact with GraphQL schemas:
list-query-fields: Lists all available root-level fields for GraphQL queriesget-query-field: Gets detailed definition for a specific query field in SDL formatlist-mutation-fields: Lists all available root-level fields for GraphQL mutationsget-mutation-field: Gets detailed definition for a specific mutation field in SDL formatlist-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 formatget-type-fields: Gets a simplified list of fields with their types for a specific GraphQL object typesearch-schema: Searches for types or fields in the schema by name pattern (case-insensitive regex)Example queries to try:
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".
Please log in to share your review and rating for this MCP.
Discover more MCP servers with similar functionality and use cases
by danny-avila
Provides a customizable ChatGPT‑like web UI that integrates dozens of AI models, agents, code execution, image generation, web search, speech capabilities, and secure multi‑user authentication, all open‑source and ready for self‑hosting.
by ahujasid
BlenderMCP integrates Blender with Claude AI via the Model Context Protocol (MCP), enabling AI-driven 3D scene creation, modeling, and manipulation. This project allows users to control Blender directly through natural language prompts, streamlining the 3D design workflow.
by pydantic
Enables building production‑grade generative AI applications using Pydantic validation, offering a FastAPI‑like developer experience.
by GLips
Figma-Context-MCP is a Model Context Protocol (MCP) server that provides Figma layout information to AI coding agents. It bridges design and development by enabling AI tools to directly access and interpret Figma design data for more accurate and efficient code generation.
by mcp-use
Easily create and interact with MCP servers using custom agents, supporting any LLM with tool calling and offering multi‑server, sandboxed, and streaming capabilities.
by sonnylazuardi
This project implements a Model Context Protocol (MCP) integration between Cursor AI and Figma, allowing Cursor to communicate with Figma for reading designs and modifying them programmatically.
by lharries
WhatsApp MCP Server is a Model Context Protocol (MCP) server for WhatsApp that allows users to search, read, and send WhatsApp messages (including media) through AI models like Claude. It connects directly to your personal WhatsApp account via the WhatsApp web multi-device API and stores messages locally in a SQLite database.
by idosal
GitMCP is a free, open-source remote Model Context Protocol (MCP) server that transforms any GitHub project into a documentation hub, enabling AI tools to access up-to-date documentation and code directly from the source to eliminate "code hallucinations."
by Klavis-AI
Klavis AI provides open-source Multi-platform Control Protocol (MCP) integrations and a hosted API for AI applications. It simplifies connecting AI to various third-party services by managing secure MCP servers and authentication.