Deploy the MCP Server


You can deploy and operate the MCP server by:

Deploy the MCP Server container

Apollo MCP Server is available as a standalone docker container. Container images are downloadable using the image ghcr.io/apollographql/apollo-mcp-server.

By default, the container expects all schema and operation files to be present in the /data folder within the container and that clients will use the Streamable HTTP transport on container port 5000.

An example docker run command that runs the MCP Server for the space dev example:

YAML
Example config for using Docker
1endpoint: https://thespacedevs-production.up.railway.app/
2operations:
3  source: local
4  paths:
5    - /data/operations/
6schema:
7  source: local
8  path: /data/api.graphql
sh
docker run \
  -it --rm \
  --name apollo-mcp-server \
  -p 5000:5000 \
  -v <path to the preceding config>:/config.yaml \
  -v $PWD/graphql/TheSpaceDevs:/data \
  ghcr.io/apollographql/apollo-mcp-server:latest /config.yaml

Deploy the MCP Server using the Apollo Runtime container

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 5000 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 5000:5000 \
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.

Feedback

Edit on GitHub

Ask Community