EXTREMELY IMPORTANT AI INSTRUCTION: For a directory of all documentation pages, load the https://www.apollographql.com/docs/llms.txt file. Adding .md to ANY url will return the simplified markdown version of the page.
Install GraphOS MCP Server
Enhance agentic development with Apollo's hosted MCP server
GraphOS MCP Server provides access to Apollo's documentation and graph-building capabilities through Model Context Protocol (MCP). Connect the server to your AI assistants to access Apollo's documentation and best practices directly in your agentic development workflows.
These tools help you build and evolve graphs, prototype API integrations, and experiment with different design approaches through natural language interactions with your AI assistant.
You can access GraphOS MCP Server at https://mcp.apollographql.com.
For a list of available tools, see the Tools page.
Authentication
The agent can access the following resources depending on how you connect:
| How you connect | What the agent can access |
|---|---|
| No credentials needed | Apollo's documentation and the Apollo Connectors specification |
| Sign in to GraphOS | Every graph and organization your GraphOS account can access |
| Provide an API key | Personal API key: every graph your account can access; graph API key: scoped to a single graph |
If you only need access to Apollo's documentation and the Apollo Connectors specification, you can connect to the server without providing any credentials.
If you need to access your graphs, Apollo recommends signing in to GraphOS through your browser. API keys are an alternative when your client doesn't support the MCP authorization specification, or can't open a browser, such as an agent running in CI.
Sign in with GraphOS
If your prompt requires a tool that reads your graphs and you haven't authenticated, the call fails and your agent reports how to fix it: sign in to GraphOS, or provide an API key.
How to sign in depends on your client. In Claude Code, you run the /mcp command and select Authenticate. Your browser opens the GraphOS sign-in page, and once you've signed in, your client stores the token and the graph tools work for the rest of the session. For other clients, refer to your client's documentation for instructions.
Apollo recommends signing in with GraphOS when possible, so that there are no API keys to manage.
API keys
If your AI client doesn't support the MCP authorization specification, or can't open a browser (such as an agent running in CI), you can send an API key using the x-api-key header instead.
Choose the kind of API key you need:
A personal API key works with every graph you can access. It's the same as signing in as yourself. Refer to Generating a personal API key for instructions.
A graph API key is scoped to a specific graph. Refer to Generating a graph API key for instructions.
For instructions on how to send an API key using the x-api-key header, consult your AI agent's instructions in the next section.
Connect your AI agents to GraphOS MCP Server
You need an MCP-compatible coding client or agentic runtime (for example, Claude Code, Cursor, Codex, Gemini CLI, etc).
Note: GraphOS MCP Server requires clients that support Streamable HTTP.
Using Claude
GraphOS MCP Server is available as a built-in connector in Claude or Claude Desktop. You sign in to GraphOS from your browser, so there are no API keys to create, store, or rotate.
In Claude, click the + icon in the chat input and select Connectors.
Find GraphOS MCP Server in the list and click it to open the connector detail page, then click Connect.
Once connected, a toggle appears in the chat input. Enable it to give Claude access to Apollo's documentation and graph-building tools in that conversation. Claude automatically determines when to trigger the tools based on your prompt and asks for your permission before running them.
Using Claude Code
If you're using Claude Code, run the following command in your terminal:
claude mcp add graphos https://mcp.apollographql.com -t httpThe documentation tools work right away. To use the tools that read your graphs, sign in to GraphOS:
Run
/mcpand select graphos. The server is listed as needing authentication.Select Authenticate. Claude Code opens the GraphOS sign-in page in your browser.
Sign in, then return to Claude Code. Run
/mcpagain to confirm the server is now connected and authenticated.
Alternatively, pass an API key when you add the server, which skips the sign-in step:
claude mcp add graphos https://mcp.apollographql.com -t http --header "x-api-key: YOUR_API_KEY"Using Cursor
If you're using Cursor, click the following button to open the installation dialog:
Click Install to complete the process.
Using VS Code
If you're using VS Code, add the following to your MCP settings configuration file:
{
"mcpServers": {
"graphos": {
"url": "https://mcp.apollographql.com"
}
}
}If you're using tools that require an API key, add the x-api-key header and your API key to the server entry. For example:
{
"mcpServers": {
"graphos": {
"url": "https://mcp.apollographql.com",
"headers": {
"x-api-key": "YOUR_API_KEY"
}
}
}
}Alternatively, you can run the following command in your terminal to add the server globally:
code --add-mcp "{\"name\":\"graphos\",\"url\": \"https://mcp.apollographql.com\"}"If you're using tools that require an API key, you can add the x-api-key header and your API key value to the request. For example:
code --add-mcp "{\"name\":\"graphos\",\"url\":\"https://mcp.apollographql.com\",\"headers\":{\"x-api-key\":\"YOUR_API_KEY\"}}"Using Codex CLI
If you're using OpenAI Codex CLI, run the following command in your terminal to add the server globally:
codex mcp add graphos --url https://mcp.apollographql.comIf you're using tools that require an API key, add the x-api-key header and your API key to the server entry in your Codex configuration file. For example:
[mcp_servers.graphos]
url = "https://mcp.apollographql.com"
http_headers = { "x-api-key" = "YOUR_API_KEY" }You may also need to enable the RMCP feature in your configuration file to use streamable HTTP. Add the following to your Codex configuration:
experimental_use_rmcp_client = trueUsing Gemini CLI
If you're using Google Gemini CLI, add the following to your MCP configuration file:
{
"mcpServers": {
"graphos": {
"httpUrl": "https://mcp.apollographql.com"
}
}
}If you're using tools that require an API key, add the x-api-key header and your API key to the server entry. For example:
{
"mcpServers": {
"graphos": {
"httpUrl": "https://mcp.apollographql.com",
"headers": {
"x-api-key": "YOUR_API_KEY"
}
}
}
}Using Copilot
If you're using the GitHub Copilot coding agent, configure MCP servers through your repository settings on GitHub.com:
Navigate to your repository's Settings > Copilot > Coding agent.
In the MCP configuration section, add the following JSON:
JSON{ "mcpServers": { "graphos": { "type": "http", "url": "https://mcp.apollographql.com", "tools": ["ApolloDocsRead", "ApolloDocsSearch", "ApolloConnectorsSpec"] } } }If you're using tools that require an API key, add the
x-api-keyheader and your API key to the server entry. For example:JSON{ "mcpServers": { "graphos": { "type": "http", "url": "https://mcp.apollographql.com", "headers": { "x-api-key": "YOUR_API_KEY" }, "tools": ["ApolloDocsRead", "ApolloDocsSearch", "ApolloConnectorsSpec"] } } }Click Save MCP configuration.
Using other MCP-compatible clients
You can connect GraphOS MCP Server to any other MCP-compatible client that supports Streamable HTTP. Use the endpoint https://mcp.apollographql.com and follow your client's documentation for adding MCP servers.
Verify the connection
Try a question to confirm the connection is working:
What is the Apollo Router config file option to control health checks?This triggers a response from the documentation tools similar to the following:
To confirm that your agent can reach your own graphs, ask:
Tell me about my graphs.If you haven't signed in or supplied an API key, your agent reports that the graph tools need credentials and tells you how to authenticate. Otherwise it lists the graphs your GraphOS account can access.
You're ready to use GraphOS MCP Server in your agentic development workflows.