You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/deploy.mdx
+29-29Lines changed: 29 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,25 @@
1
1
---
2
2
title: Deploy the MCP Server
3
+
subtitle: Deployment using Docker containers, when to choose which option, and production considerations
3
4
---
4
5
5
-
## Recommended: Apollo Runtime Container (All-in-One)
6
+
Apollo MCP Server can be deployed in your production environment using the [Apollo Runtime Container](#apollo-runtime-container-recommended) or the [standalone Apollo MCP Server container](#standalone-apollo-mcp-server-container).
6
7
7
-
**For most production deployments, we recommend Apollo Runtime container.** It includes everything you need to serve both GraphQL and MCP requests in a single, optimized container.
8
+
## Apollo Runtime Container (Recommended)
8
9
9
-
### Why choose the All-in-One container?
10
+
For most production deployments, use the all-in-one [Apollo Runtime Container](/graphos/routing/self-hosted/containerization/docker). It includes everything you need to serve both GraphQL and MCP requests in a single, optimized container.
11
+
12
+
### Why choose the Apollo Runtime Container?
10
13
11
14
-**Simplified operations**: Single container to deploy and manage
12
15
-**Optimized performance**: Apollo Router and Apollo MCP Server are co-located
13
16
-**Built-in best practices**: Pre-configured for production use
14
17
-**Easier scaling**: Scale both GraphQL and MCP together
15
18
-**Unified monitoring**: Single service to monitor and debug
16
19
17
-
### Deploy Apollo Runtime container
20
+
### Deploy the Apollo Runtime Container
18
21
19
-
Apollo Runtime container includes all services necessary to serve GraphQL and MCP requests, including Apollo Router and Apollo MCP Server. Both port `4000` (GraphQL) and `5000` (MCP) are exposed.
22
+
The Apollo Runtime Container includes all services necessary to serve GraphQL and MCP requests, including Apollo Router and Apollo MCP Server. Both port `4000` (GraphQL) and `5000` (MCP) are exposed.
20
23
21
24
```bash title="Deploy with GraphOS (Recommended)"
22
25
docker run \
@@ -31,32 +34,29 @@ docker run \
31
34
32
35
When you run this, it will:
33
36
34
-
- Fetch your schema from GraphOS
35
-
- Configure Apollo Router with your supergraph
36
-
- Enable Apollo MCP Server endpoint at `/mcp`
37
-
- Provide access to your GraphOS persisted queries for MCP tool configuration
38
-
39
-
<Note>
37
+
- Fetch your schema from GraphOS using your graph credentials (`APOLLO_GRAPH_REF` and `APOLLO_KEY`)
38
+
- Start the Apollo Router with your graph configuration
39
+
- Enable the Apollo MCP Server endpoint at `/mcp`
40
40
41
-
You'll still need to configure which operations to expose as MCP tools. See [Define MCP Tools](/apollo-mcp-server/define-tools)for configuration options.
41
+
This command uses GraphOS-managed persisted queries for MCP tools. You'll need to publish your operations to the [GraphOS-managed persisted queries list](/apollo-mcp-server/define-tools#from-graphos-managed-persisted-queries). If you want to use other methods for defining MCP tools, see the [Define MCP Tools](/apollo-mcp-server/define-tools)page.
42
42
43
-
</Note>
43
+
You can provide a configuration file for the MCP server in `config/mcp_config.yaml`. The container will automatically use this file if it exists.
44
44
45
-
To learn more, review the [Apollo Runtime container documentation](/graphos/routing/self-hosted/containerization/docker).
45
+
To learn more, see the [Apollo Runtime Container documentation](/graphos/routing/self-hosted/containerization/docker).
46
46
47
-
## Alternative: Standalone Apollo MCP Server container
47
+
## Standalone Apollo MCP Server container
48
48
49
-
**Use this option only if you already have a GraphQL API running elsewhere** and want to add MCP capabilities to it.
49
+
Use the standalone Apollo MCP Server container if you already have a GraphQL API running elsewhere and want to add MCP capabilities to it.
50
50
51
51
### Deploy standalone Apollo MCP Server container
52
52
53
53
Apollo MCP Server is available as a standalone Docker container. Container images are downloadable using the image `ghcr.io/apollographql/apollo-mcp-server`.
54
54
55
55
By default, the container expects all schema and operation files to be present in the `/data` directory within the container and that clients use Streamable HTTP transport on container port `5050`.
56
56
57
-
Here's an example `docker run` command that runs Apollo MCP Server for the space dev example:
57
+
Here's an example `docker run` command that runs Apollo MCP Server for an example using [TheSpaceDevs graph](https://thespacedevs-production.up.railway.app/):
**Important**: MCP is a stateful protocol that requires session affinity (sticky sessions).
95
+
MCP is a stateful protocol that requires session affinity (sticky sessions).
96
96
97
97
When an MCP client initializes a session with Apollo MCP Server, it receives a session identifier unique to that server instance through the `mcp-session-id` header. You must enable session affinity in your load balancer so that all requests sharing the same `mcp-session-id` are routed to the same backend instance.
98
98
@@ -103,13 +103,13 @@ When an MCP client initializes a session with Apollo MCP Server, it receives a s
103
103
104
104
### Scaling Recommendations
105
105
106
-
**Apollo Runtime Container** (Recommended):
106
+
For the Apollo Runtime Container:
107
107
108
108
- Scale both GraphQL and MCP together as a single unit
109
109
- Simpler horizontal scaling
110
110
- Consistent performance characteristics
111
111
112
-
**Standalone Apollo MCP Server**:
112
+
For the standalone Apollo MCP Server container:
113
113
114
114
- Scale Apollo MCP Server independently of your GraphQL API
115
115
- More complex but enables fine-tuned resource allocation
0 commit comments