mcp-graphql-schema
GraphQL Schema Model Context Protocol Server
claude mcp add --transport stdio hannesj-mcp-graphql-schema npx -y mcp-graphql-schema /ABSOLUTE/PATH/TO/schema.graphqls
How to use
This MCP server exposes the GraphQL schema information of a provided GraphQL SDL file to LLMs via a set of specialized tools. It lets you inspect root query, mutation, and subscription fields, view detailed type definitions, search for types and fields by name patterns, and obtain simplified field information including argument types. Internal GraphQL types are filtered out for clearer results, making it easier for models to navigate complex schemas. To use it, run the server with a target schema file (either a default file like schema.graphqls in the current directory or a specific path) and then invoke the available MCP tools such as list-query-fields, get-type, or search-schema to explore the schema. The server is designed to integrate with Claude Desk or Claude Code, enabling you to ask questions about the schema and receive structured SDL or descriptive outputs.
How to install
Prerequisites:
- Node.js installed (which provides npm/npmx).
- Access to npx (comes with npm).
Installation steps:
-
Ensure you have Node.js and npm installed. You can verify: node -v npm -v
-
Install and run the MCP server using npx with the GraphQL schema package:
- You can use a default schema file by placing schema.graphqls in your current directory or pass a path to your SDL file.
-
Example command to run the server against a specific schema: npx -y mcp-graphql-schema /path/to/your/schema.graphqls
-
(Optional) If you want to install via Smithery for Claude Desktop integration: npx -y @smithery/cli install @hannesj/mcp-graphql-schema --client claude
-
If you are configuring Claude Desktop, you can add the server to claude_desktop_config.json as shown in the README (adjust the absolute path to your schema): { "mcpServers": { "GraphQL Schema": { "command": "npx", "args": ["-y", "mcp-graphql-schema", "/ABSOLUTE/PATH/TO/schema.graphqls"] } } }
Additional notes
Tips and considerations:
- Use a definitive absolute path to your schema file when configuring Claude Desktop or Claude Code to avoid path resolution issues.
- The MCP tools include: 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, and search-schema. Use these to iteratively explore the schema.
- You can run multiple MCP servers for different schemas by giving each a distinct name, e.g., GraphQL Schema and Shopify GraphQL Schema.
- If you encounter permissions or network issues when using npx, ensure npm is up to date and you have network access. For local development, you can also consider installing the package locally and running it via node if a local start script is provided by the package.
- When using Claude integration, you can leverage the -s/--scope option to choose where configuration is stored (project vs global).
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.