Apollo MCP Server Quickstart
Create and run an MCP server in minutes with Apollo
Apollo MCP Server is a Model Context Protocol server that exposes your GraphQL API operations as MCP tools.
This guide walks you through the process of creating, running and configuring an MCP server with Apollo.
Prerequisites
Rover CLI v0.36 or later. We'll use Rover to initialize a project and run the MCP server. Follow the instructions for installing and authenticating Rover with a GraphOS account.
Node.js v18 or later (for
mcp-remote)Claude Desktop or another MCP-compatible client
Step 1: Create an MCP server
Run the interactive initialization command:
rover init --mcpThe CLI wizard guides you through several prompts.
Select Create MCP tools from a new Apollo GraphOS project and Apollo graph with Connectors (connect to REST services) as your starting point.
You'll also need to select your organization and give your project a name and ID.
The wizard shows all files that will be created, including:
MCP server configuration files
GraphQL schema and operations
Docker setup for (optional) deployment
Type Y to confirm and create your project files.
Step 2: Run your MCP Server
You can start your MCP server locally with rover dev.
Choose the environment-specific command to load environment variables from the provided
.envfile and start the MCP server.terminalset -a && source .env && set +a && rover dev --supergraph-config supergraph.yaml --mcp .apollo/mcp.local.yamlYou should see some output indicating that the GraphQL server is running at
http://localhost:4000and the MCP server is running athttp://127.0.0.1:8000.In a new terminal window, run the MCP Inspector to verify the server is running:
terminalnpx @modelcontextprotocol/inspector http://127.0.0.1:8000/mcp --transport httpThis will automatically open your browser to
http://127.0.0.1:6274.Click Connect, then List Tools to see the available tools.
Step 3: Connect to an MCP client
Apollo MCP Server works with any MCP-compatible client. Choose your favorite client and follow the instructions to connect.
Claude Desktop (recommended)
claude_desktop_config.json file in one of the following paths:- Mac OS:
~/Library/Application\ Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
1{
2 "mcpServers": {
3 "mcp-My API": {
4 "command": "npx",
5 "args": [
6 "mcp-remote",
7 "http://127.0.0.1:8000/mcp"
8 ]
9 }
10 }
11}Claude Code
1claude mcp add apollo-mcp npx mcp-remote http://127.0.0.1:8000/mcpGoose
~/.config/goose/profiles.yaml:1default:
2 provider: openai
3 processor: gpt-4
4 accelerator: gpt-4o-mini
5 moderator: passive
6 toolkits:
7 - name: developer
8 - name: mcp
9 requires:
10 apollo-mcp:
11 command: npx
12 args:
13 - mcp-remote
14 - http://127.0.0.1:8000/mcp1goose mcp add apollo-mcp npx mcp-remote http://127.0.0.1:8000/mcpCline (VS Code Extension)
- Go to Advanced settings → Extensions → Add custom extension
- Name:
Apollo MCP - Type: STDIO
- Command:
npx mcp-remote http://127.0.0.1:8000/mcp
OpenCode
~/.config/opencode/opencode.json:1{
2 "$schema": "https://opencode.ai/config.json",
3 "mcp": {
4 "apollo-mcp": {
5 "type": "local",
6 "command": [
7 "npx",
8 "mcp-remote",
9 "http://127.0.0.1:8000/mcp"
10 ],
11 "enabled": true
12 }
13 }
14}Windsurf
- Go to Windsurf Settings → MCP → Add new MCP Server
- Name:
Apollo MCP - Command:
npx - Arguments:
["mcp-remote", "http://127.0.0.1:8000/mcp"]
1{
2 "mcpServers": {
3 "apollo-mcp": {
4 "command": "npx",
5 "args": [
6 "mcp-remote",
7 "http://127.0.0.1:8000/mcp"
8 ]
9 }
10 }
11}Restart your MCP client.
Test the connection by asking: "What MCP tools do you have available?".
Verify GraphQL operations are listed as available tools.
Test a query using one of your configured operations.
Step 4: Define MCP tools
MCP tools are defined as GraphQL operations. The project template currently uses operation collections as the source of its tools.
Navigate to Sandbox at http://localhost:4000.
Click the Bookmark icon to open Operation Collections.
Click Sandbox beside "Showing saved operations for your Sandbox, across all endpoints" and select your graph. This represents the graph name and ID you used when creating your project.
You'll see an operation collection called "Default MCP Tools".
Create a new operation in the middle panel:
GraphQL1# Retrieves product information 2query GetProducts { 3 products { 4 id 5 name 6 description 7 } 8}Click the Save button and give it the name
GetProducts.Select the
Default MCP Toolscollection and click Save.Restart your MCP client and test the connection by asking: "What MCP tools do you have available?". You should see the
GetProductstool listed. You can also test this with MCP Inspector.
Step 5: Deploy your MCP server
Apollo MCP Server can run in any container environment.
Using the Apollo Runtime Container
Your project includes a pre-configured mcp.Dockerfile for easy deployment. This container includes:
Apollo Router for serving your GraphQL API
Apollo MCP Server for MCP protocol support
All necessary dependencies
Build the container:
Bash1docker build -f mcp.Dockerfile -t my-mcp-server .Run locally:
Bash1docker run -p 4000:4000 -p 8000:8000 \ 2 -e APOLLO_KEY=$APOLLO_KEY \ 3 -e APOLLO_GRAPH_REF=$APOLLO_GRAPH_REF \ 4 -e MCP_ENABLE=1 \ 5 my-mcp-serverDeploy to your platform. The container can be deployed to any platform supporting Docker, such as: AWS ECS/Fargate, Google Cloud Run, Azure Container Instances, Kubernetes, Fly.io, Railway, Render.
Ensure these variables are set in your deployment environment:
| Variable | Description | Required |
|---|---|---|
APOLLO_KEY | Your graph's API key | Yes |
APOLLO_GRAPH_REF | Your graph reference | Yes |
APOLLO_MCP_TRANSPORT__PORT | MCP server port (default: 8000) | No |
APOLLO_ROUTER_PORT | Router port (default: 4000) | No |
For more deployment options, see the Deploy the MCP Server page.
Update client configuration
After deploying, update your MCP client configuration to use the deployed URL:
1{
2 "mcpServers": {
3 "my-api": {
4 "command": "npx",
5 "args": [
6 "mcp-remote",
7 "https://your-deployed-server.com/mcp"
8 ]
9 }
10 }
11}Troubleshooting
Client doesn't see tools:
Ensure you restarted your MCP client after configuration
Verify the Apollo MCP Server is running (
rover devcommand)Check port numbers match between server and client config
Connection refused errors:
Confirm the server is running on the correct port
Verify firewall settings allow connections to localhost:8000
For remote connections, ensure the host is set to
0.0.0.0in your config
Authentication issues:
Verify environment variables are properly set
Check that your GraphQL endpoint accepts the provided headers
When using
rover devyou can test your GraphQL endpoint using Sandbox at http://localhost:4000
Additional resources
Getting help
If you're still having issues:
Join the Apollo community forums
Contact your Apollo representative for direct support