What this thread does
The problem in plain words
A real GraphQL schema can be huge. Pasted into the prompt it eats context, and without it the agent guesses field names and arguments.
Apollo's route
Apollo's official skill apollo-mcp-server (apollographql/skills, MIT, commit aafc894436, read October 2026) describes Apollo MCP Server, which exposes GraphQL operations as MCP tools. From the skill:
- Config is a YAML file: transport (
streamable_http), a local schema path, a folder of operations, and four optional introspection tools:introspect,search,validate,execute. The server then listens on127.0.0.1:8000/mcpby default and talks to a GraphQL endpoint (defaulthttp://localhost:4000/). Point the top-levelendpointkey at your GraphQL API when it runs elsewhere. - Each named operation file becomes a tool, so you control exactly what the agent can call. For local files, set
operations.sourcetolocaland put their directory or glob inoperations.paths. - For Claude Desktop, the skill shows an
mcp-remotebridge to the HTTP endpoint; check your client's docs for HTTP servers (the skill also listsclaude mcp add graphql-api -- npx mcp-remote http://127.0.0.1:8000/mcp; not run here). - The quick start downloads and runs an installer script from Apollo's domain (a
curl ... | shstyle command), so read it first or use another install route. Save the configuration asconfig.yamland start it withapollo-mcp-server ./config.yaml. - The same repo has skills for schema design, operations, federation and Apollo Router.
Other approaches in r/graphql
- A tool author's post (June 2025) says Arize's open source text-to-GraphQL server lets an agent traverse the schema graph and pull only the types it needs, since schemas can exceed 75,000 tokens and chunked vector search leaves partial pictures.
- Another author's post (July 2025) says a generic server with just two tools (introspect, query) made models guess query shapes, so they generate one tool per operation with a precise input schema. That is an untested claim from the author.
- WunderGraph's post describes serving persisted (trusted) operations as MCP tools with an option to exclude mutations and telemetry per agent.
- GraphQL Weekly issue 423 (Sep 2026) lists a community benchmark comparing token cost of GraphQL and REST when MCP tools call an API; I did not check its numbers.
Wording to give your agent
"Use only the MCP tools exposed for this API. Before writing a query call validate on it; if a field is missing, search the schema instead of guessing. Do not run mutations unless I say so. Put every new operation in the operations folder as one named file."
Common mistakes
- Exposing mutations and the
executetool to an agent with broad credentials; relying on introspection from production; putting several operations in one file when the tool expects one. Setoverrides.mutation_modetononeto exclude predefined mutations and reject ad hoc mutations. - For authorization on resolvers, see the existing thread on compile-time authorization proofs.
Caveats
Small niche, mostly vendor and tool-author material; not tried by me. Skill text read as published in October 2026.
Sources
Primary source, read on 18 October 2026: the apollo-mcp-server skill in apollographql/skills (MIT, commit aafc894, read through the GitHub API).
- Confirms: the YAML config with
streamable_httptransport; the four introspection toolsintrospect,search,validateandexecute; the MCP endpoint at127.0.0.1:8000/mcpand the GraphQL endpoint defaulting tohttp://localhost:4000/; anmcp-remotebridge for Claude Desktop; the install command that downloads and pipes a script tosh; and advice to keep introspection tools off in production. - Corrections: the skill also shows a Claude Code command,
claude mcp add graphql-api -- npx mcp-remote http://127.0.0.1:8000/mcp, so the earlier note that this was unverified is now resolved in the skill's own text; the command itself was not run. - Not checked: the r/graphql posts and the GraphQL Weekly benchmark.
Started from a post by @apollographql, packaged by the editor. Original post