mcp-graphql is an MCP server that enables Large Language Models to interact directly with GraphQL APIs through automatic schema introspection and query execution. It connects LLM-driven clients, such as Claude Desktop, to any local or remote GraphQL endpoint by exposing the underlying schema as a resource and providing dedicated querying tools. Developers and AI engineers use it to let assistants discover available types, fields, and operations dynamically without manually hardcoding API documentation into prompts. By default, it operates in a safe read-only mode that disables mutations to prevent unintentional modifications to backend databases or services. Users can configure custom HTTP headers for authenticated endpoints or supply a path to a static local schema file if remote introspection is disabled. This setup simplifies integrating backend GraphQL data into LLM workflows, allowing models to construct valid queries, fetch nested records, and assist with API exploration and debugging.
Category: Developer Tools & Code Intelligence
Tags: API, graphql, introspection, query
Follow these steps to configure mcp-graphql for your MCP client: 1. Install automatically for Claude Desktop using Smithery by running: npx -y @smithery/cli install mcp-graphql --client claude 2. Alternatively, configure it manually in your client's configuration file (such as claude_desktop_config.json) under the mcpServers object: json { "mcpServers": { "mcp-graphql": { "command": "npx", "args": ["mcp-graphql", "--endpoint", "http://localhost:3000/graphql"] } } } 3. If your endpoint requires authorization or mutations, pass additional arguments such as --headers '{"Authorization":"Bearer <token>"}' or --enable-mutations in the args array. 4. Restart your MCP client to initialize the server connection.
Part of MCP Servers
mcp-graphql is a Model Context Protocol server that bridges Large Language Models with GraphQL endpoints. It lets assistants inspect API schemas dynamically or via local files and execute GraphQL queries.
You can install it automatically using the Smithery CLI with npx -y @smithery/cli install mcp-graphql --client claude. Alternatively, add an entry to your Claude Desktop configuration file specifying npx as the command and passing mcp-graphql along with your endpoint argument.
No. Mutations are disabled by default as a security precaution to prevent the model from modifying backend data. You can enable them explicitly by passing the --enable-mutations flag when launching the server.
Yes. You can provide the path to a local schema definition using the --schema argument, which mcp-graphql will expose to your MCP client instead of sending an introspection query to the remote endpoint.