Running the Apollo MCP Server


There are multiple ways to run the Apollo MCP server.

  • If you have an existing GraphQL API deployed, use the standalone MCP server binary to get started quickly.

  • If you use Docker in your developer workflow, use the Apollo MCP Server Docker image.

  • If you are running your GraphQL API locally with Rover, you can use the Rover CLI's rover dev command to run the MCP server alongside your local graph.

  • If you are using the Apollo Runtime Container, you can use the container to run both the MCP server and the Apollo Router in a single container.

With the Rover CLI

The Rover CLI is a tool for working with GraphQL APIs locally.

You can use the rover dev command of Rover CLI v0.35 or later to run an Apollo MCP Server instance alongside your local graph. Use the --mcp flag to start an MCP server and provide an optional configuration file.

sh
1rover dev --mcp <PATH/TO/CONFIG> [...other rover dev flags]

For more information, see the Rover CLI documentation.

Standalone MCP server binary

To install or upgrade to the latest release of Apollo MCP Server:

terminal
curl -sSL https://mcp.apollo.dev/download/nix/latest | sh

To install or upgrade to a specific version of Apollo MCP Server (recommended for CI environments to ensure predictable behavior):

terminal
# Note the `v` prefixing the version number
curl -sSL https://mcp.apollo.dev/download/nix/v1.2.1 | sh

To install or upgrade to a specific version of Apollo MCP Server that is a release candidate (recommended for those that want to test early builds):

terminal
# Note the `v` prefixing the version number and the `-rc` suffix
curl -sSL https://mcp.apollo.dev/download/nix/v1.2.1-rc.1 | sh

You can configure the Apollo MCP server using a YAML configuration file.

If the file is not provided, environment variables for your Apollo graph credentials (APOLLO_GRAPH_REF and APOLLO_KEY) are required for the server to run.

After installing the MCP server, you can run it using the following command:

sh
./apollo-mcp-server [OPTIONS] <PATH/TO/CONFIG/FILE>

CLI options

OptionDescription
-h, --helpPrint help information
-V, --versionPrint version information

With Docker

A container is built for the Apollo MCP Server with every release at ghcr.io/apollographql/apollo-mcp-server.

To download the latest release Docker container of Apollo MCP Server:

Bash
1docker image pull ghcr.io/apollographql/apollo-mcp-server:latest

To download a specific version of Apollo MCP Server (recommended for CI environments to ensure predictable behavior):

Bash
1# Note the `v` prefixing the version number
2docker image pull ghcr.io/apollographql/apollo-mcp-server:v1.2.1

To download a specific version of Apollo MCP Server that is a release candidate:

Bash
1# Note the `v` prefixing the version number and the `-rc` suffix
2docker image pull ghcr.io/apollographql/apollo-mcp-server:v1.2.1-rc.1
note
The container sets a few defaults for ease of use:
  • Working Directory is /data: Make sure to mount static schemas / operations to this location using the volume flag when running (-v / --volume).
  • HTTP Streamable Transport on port 8000: Make sure to export container port 8000 for HTTP Streamable connections to the MCP server using the port flag when running (-p / --port)

Run the following Docker command to start the MCP Server, replacing the values for the paths to the config file and project root with your own:

sh
docker run \
  -it --rm \
  --name apollo-mcp-server \
  -p 8000:8000 \
  -v <PATH/TO/CONFIG/FILE>:/config.yaml \
  -v <PATH/TO/PROJECT/ROOT>:/data \
  --pull always \
  ghcr.io/apollographql/apollo-mcp-server:latest /config.yaml

This command:

  • Starts an MCP Server in a Docker container

  • Maps configuration files into the proper place for the Apollo MCP Server container

  • Forwards port 8000 for accessing the MCP Server

With the Apollo Runtime Container

The Apollo Runtime Container runs both the MCP Server and the Apollo Router in a single container. It's useful for local development, testing, and production deployments.

The Apollo Runtime container includes all services necessary to serve GraphQL and MCP requests, including the Router and MCP Server. It is the easiest way to operate a GraphQL API with MCP support.

To serve both MCP and GraphQL requests, both port 4000 and 8000 will need to be exposed. An example command which retrieves the schema from Uplink is:

Bash
Docker
1docker run \
2  -p 4000:4000 \
3  -p 8000:8000 \
4  --env APOLLO_GRAPH_REF="<your-graph-ref>" \
5  --env APOLLO_KEY="<your-graph-api-key>" \
6  --env MCP_ENABLE=1 \
7  --rm \
8  ghcr.io/apollographql/apollo-runtime:latest

To learn more, review the Apollo Runtime container documentation.