/apollo-skills:apollo-mcp-serverfrom apollo-skills
Guides setup and use of Apollo MCP Server to expose GraphQL APIs as MCP tools. Covers configuration, introspection, authentication, CORS, health checks, telemetry, Rhai scripting, prompts, MCP Apps, and production deployment.
Ships in apollo-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Apollo MCP Server exposes GraphQL operations as MCP tools, enabling AI agents to interact with GraphQL APIs through the Model Context Protocol.
# Linux / MacOS
curl -sSL https://mcp.apollo.dev/download/nix/latest | sh
# Windows
iwr 'https://mcp.apollo.dev/download/win/latest' | iex
Create config.yaml in your project root:
transport:
type: streamable_http
schema:
source: local
path: ./schema.graphql
operations:
source: local
paths:
- ./operations/
introspection:
introspect:
enabled: true
search:
enabled: true
validate:
enabled: true
execute:
enabled: true
Start the server:
apollo-mcp-server ./config.yaml
The MCP endpoint is available at http://127.0.0.1:8000/mcp (streamable_http defaults: address 127.0.0.1, port 8000, path /mcp). The GraphQL endpoint defaults to http://localhost:4000/ — override with the endpoint key if your API runs elsewhere.
The server serves MCP at the exact transport.path only — subpaths return 404. Set transport.path: / to serve at root.
The server watches the config file for changes and automatically restarts with updated configuration.
Add to your MCP client configuration:
Streamable HTTP (recommended):
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"graphql-api": {
"command": "npx",
"args": ["mcp-remote", "http://127.0.0.1:8000/mcp"]
}
}
}
Claude Code:
claude mcp add graphql-api -- npx mcp-remote http://127.0.0.1:8000/mcp
Stdio (client launches the server directly):
{
"mcpServers": {
"graphql-api": {
"command": "./apollo-mcp-server",
"args": ["./config.yaml"]
}
}
}
| Tool | Purpose | When to Use |
|---|---|---|
introspect | Explore schema types in detail | Need type definitions, fields, relationships |
search | Find types in schema | Looking for specific types or fields |
validate | Check operation validity | Before executing operations |
execute | Run ad-hoc GraphQL operations | Testing or one-off queries |
explorer | Open operation in Apollo Explorer | Generate Explorer URLs (requires GraphOS graph ref) |
MCP tools are created from GraphQL operations:
operations:
source: local
paths:
- ./operations/
operations:
source: collection
id: your-collection-id
operations:
source: manifest
path: ./persisted-query-manifest.json
operations:
source: introspect
operations:
source: uplink
Security: Sensitive operations. Configure authentication before exposing to AI agents. Use
headersfor API keys, OAuth for user-scoped access.
overrides.mutation_mode to control mutation exposure# Static header
headers:
Authorization: "Bearer ${env.API_TOKEN}"
# Dynamic header forwarding
forward_headers:
- x-tenant-id
# OAuth (streamable_http transport)
transport:
type: streamable_http
auth:
servers:
- https://auth.example.com
audiences:
- https://api.example.com
scopes:
- read
scope_mode: require_all
# Local file
schema:
source: local
path: ./schema.graphql
# Federated graphs (uplink)
schema:
source: uplink
# Non-federated graphs (graphos)
schema:
source: graphos
Control mutation behavior via overrides.mutation_mode:
| Mode | Predefined mutations | Ad hoc mutations (execute) |
|---|---|---|
none | Skipped | Rejected |
explicit | Exposed | Rejected |
all | Exposed | Allowed |
Build interactive UI experiences inside MCP Apps-compatible hosts (e.g., ChatGPT). Define tools with @tool and @prefetch directives on GraphQL operations. Configure the apps directory:
apps:
path: ./apps
expose_without_app_param:
analytics: [usage_chart]
Use expose_without_app_param to make selected app tools available on connections without the ?app= query parameter.
Return async task handles for slow GraphQL calls. Clients poll tasks/get for results:
tasks:
enabled: true
detach_after_ms: 1000
Enable minification to reduce token usage:
introspection:
introspect:
minify: true
search:
minify: true
graphos:
apollo_key: ${env.APOLLO_KEY}
apollo_graph_ref: my-graph@production
schema:
source: uplink # federated graphs; use graphos for non-federated graphs
transport:
type: streamable_http
schema:
source: local
path: ./schema.graphql
introspection:
introspect:
enabled: true
search:
enabled: true
validate:
enabled: true
execute:
enabled: true
overrides:
mutation_mode: all
transport:
type: streamable_http
trusted_proxies:
- 10.0.4.0/24
auth:
servers:
- https://auth.example.com
audiences:
- https://api.example.com
rate_limit:
per_client: true
endpoint: https://api.production.com/graphql
operations:
source: manifest
path: ./persisted-query-manifest.json
graphos:
apollo_key: ${env.APOLLO_KEY}
apollo_graph_ref: ${env.APOLLO_GRAPH_REF}
schema:
source: uplink # federated graphs; use graphos for non-federated graphs
health_check:
enabled: true
logging:
format: json
telemetry:
exporters:
metrics:
otlp:
endpoint: https://your-metrics-endpoint
protocol: http/protobuf
tracing:
otlp:
endpoint: https://your-traces-endpoint
protocol: http/protobuf
parent_based_sampler: false # public-facing servers only; keeps untrusted callers from forcing sampling
sampler: 0.1
transport:
type: streamable_http
address: 0.0.0.0
port: 8000
endpoint: ${env.GRAPHQL_ENDPOINT}
graphos:
apollo_key: ${env.APOLLO_KEY}
apollo_graph_ref: ${env.APOLLO_GRAPH_REF}
schema:
source: uplink # federated graphs; use graphos for non-federated graphs
health_check:
enabled: true
mutation_mode: explicit or mutation_mode: none in shared environmentsoverrides.required_scopes keys after tool changesauth at the top level — it must be nested under transportmutation_mode provides per-invocation approval (it is a configuration gate)schema.source: graphos for non-federated graphs (uplink only serves federated graphs)disable_auth_token_passthrough: true when your API does not need the caller's tokenreferences/auth.md (opens in a new tab)references/best-practices.md (opens in a new tab)references/configuration.md (opens in a new tab)references/custom-scalars.md (opens in a new tab)references/deploy.md (opens in a new tab)references/error-handling.md (opens in a new tab)references/limitations.md (opens in a new tab)references/mcp-apps.md (opens in a new tab)references/prompts.md (opens in a new tab)references/rhai-scripting.md (opens in a new tab)references/telemetry.md (opens in a new tab)references/token-exchange.md (opens in a new tab)references/tools.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub apollographql/skills --plugin apollo-skills15 skills in this plugin
/apollo-clientGuide for building React applications with Apollo Client 4.x. Use this skill when: (1) setting up Apollo Client in a React project, (2) writing GraphQL queries or mutations with hooks, (3) configuring caching or cache policies, (4) managing local state with reactive variables, (5) troubleshooting Apollo Client errors or performance issues.
/apollo-connectorsDEPRECATED: superseded by the graphos-factory skill (npx skills add apollographql/skills@graphos-factory), which builds and maintains a Connectors subgraph from a REST API with recorded decisions and verification. Guide for integrating REST APIs into GraphQL supergraphs using Apollo Connectors with @source and @connect directives. Use this skill when the user: (1) mentions "connectors", "Apollo Connectors", or "REST Connector", (2) wants to integrate a REST API into GraphQL, (3) references @source or @connect directives, (4) works with files containing "# Note to AI Friends: This is an Apollo Connectors schema".
/apollo-federationGuide for authoring Apollo Federation subgraph schemas. Use this skill when: (1) creating new subgraph schemas for a federated supergraph, (2) defining or modifying entities with @key, (3) sharing types/fields across subgraphs with @shareable, (4) working with federation directives (@external, @requires, @provides, @override, @inaccessible), (5) troubleshooting composition errors, (6) any task involving federation schema design patterns.
Other plugins' skills for the same job