McpServer resources

Deploy the Apollo MCP Server in Kubernetes using the Apollo GraphOS Operator


An McpServer is a Kubernetes resource that allows you to run the Apollo MCP Server, which exposes GraphQL operations against a graph as tools for AI agents.

When you create an McpServer in your cluster, the Apollo GraphOS Operator will automatically provision the following resources for you:

The McpServer resource also exposes the scale subresource, so PodDisruptionBudgets or HorizontalPodAutoscalers can connect to scale the fleet if necessary

note
The McpServer resource requires Apollo GraphOS Operator v1.5.0 or later.

Deploying an McpServer

To deploy an McpServer in your Kubernetes cluster, you must define the graph it should serve operations for, via spec.supergraphSource.

Here is an example that deploys an McpServer wired up to an existing Supergraph resource in the same cluster:

YAML
1apiVersion: apollographql.com/v1alpha1
2kind: McpServer
3metadata:
4  name: my-mcp-server
5spec:
6  replicas: 1
7  deployment:
8    podTemplate:
9      mcpServerVersion: "1.19.0"
10  supergraphSource:
11    supergraph:
12      name: my-supergraph
13      namespace: default

Specifying a schema source

The McpServer resource type needs the graph's whole schema, and the MCP Server has no ability to introspect it directly — so, unlike Supergraph, it doesn't support a bare GraphQL endpoint or inline SDL. It supports two schema sources instead:

  • A Supergraph resource reference.

  • A direct Apollo GraphOS Studio graph variant reference.

Supergraph resource reference

If you already have a Supergraph resource running in your cluster, reference it by name and namespace. The Operator resolves the live GraphQL endpoint from that Supergraph's own Service, and the graph ref from its schema source (this requires the referenced Supergraph to be sourced from Studio, a SupergraphSchema resource, or an OCI artifact with a graphRef set — a Supergraph using pure inline SDL has no graph ref and isn't supported here).

YAML
1spec:
2  supergraphSource:
3    supergraph:
4      name: my-supergraph
5      # Optional: if the resource is not in the same namespace as your McpServer,
6      # you can specify the namespace here:
7      namespace: default

Changes to the referenced Supergraph's schema don't cause the McpServer to redeploy: the MCP Server fetches its own schema directly from Apollo Uplink at runtime, so the Operator only needs the graph ref and live endpoint, neither of which change when the schema does.

Apollo GraphOS Studio

You can also point an McpServer directly at a Studio graph variant, without an in-cluster Supergraph.

YAML
1spec:
2  supergraphSource:
3    studio:
4      graphRef: my-graph@my-variant

By default, the Operator resolves the live GraphQL endpoint automatically, from the routing URL registered for that graph variant in Studio. If the variant has no registered routing URL, or you want to route operations somewhere else, set endpointOverride explicitly — this always takes precedence, and skips the Studio lookup entirely:

YAML
1spec:
2  supergraphSource:
3    studio:
4      graphRef: my-graph@my-variant
5      endpointOverride: https://my-router.example.com/graphql

Configuring the MCP Server

Define MCP Server configuration directly in the McpServer CRD using the spec.config property, using the same structure as a standalone MCP Server configuration file.

For example, to enable the MCP Server's standard introspection-based tools:

YAML
1spec:
2  config:
3    introspection:
4      execute:
5        enabled: true
6      introspect:
7        enabled: true
8      search:
9        enabled: true
10      validate:
11        enabled: true

Operator-managed configuration keys

A handful of keys are required for the Operator to manage your deployment correctly, and are always overridden regardless of what you set:

  • endpoint

  • schema.source

  • transport.type

  • transport.address

  • transport.port

  • transport.stateful_mode

  • health_check.enabled

  • logging.path

  • graphos