Config File Reference

Reference guide of configuration options for running Apollo MCP Server.


You can configure Apollo MCP Server using a configuration file. You can also override configuration options using environment variables.

See the example config file for an example.

Configuration options

All fields are optional.

Top-level options

OptionTypeDefaultDescription
custom_scalarsFilePathPath to a custom scalar map
endpointURLhttp://localhost:4000/The target GraphQL endpoint
graphosGraphOSApollo-specific credential overrides
headersMap<string, string>{}List of hard-coded headers to include in all GraphQL requests
health_checkHealthCheckHealth check configuration
introspectionIntrospectionIntrospection configuration
loggingLoggingLogging configuration
operationsOperationSourceOperations configuration
overridesOverridesOverrides for server behavior
schemaSchemaSourceSchema configuration
transportTransportThe type of server transport to use

GraphOS

These fields are under the top-level graphos key and define your GraphOS graph credentials and endpoints.

OptionTypeDefaultDescription
apollo_keystringThe Apollo GraphOS key. You can also provide this with the APOLLO_KEY environment variable
apollo_graph_refstringThe Apollo GraphOS graph reference. You can also provide this with the APOLLO_GRAPH_REF environment variable
apollo_registry_urlURLThe URL to use for Apollo's registry
apollo_uplink_endpointsURLList of uplink URL overrides. You can also provide this with the APOLLO_UPLINK_ENDPOINTS environment variable

Health checks

These fields are under the top-level health_check key. Learn more about health checks.

OptionTypeDefaultDescription
enabledboolfalseEnable health check endpoints
pathstring"/health"Custom health check endpoint path
readinessobjectReadiness check configuration
readiness.allowednumber100Maximum number of rejections allowed in a sampling interval before marking unready
readiness.intervalobjectReadiness check interval configuration
readiness.interval.samplingduration"5s"How often to check the rejection count
readiness.interval.unreadyduration"10s"How long to wait before recovering from unready state (default: 2 * sampling)
note
Health checks are only available when using the streamable_http transport. The health check feature is inspired by Apollo Router's health check implementation.

Introspection

These fields are under the top-level introspection key. Learn more about the MCP introspection tools.

OptionTypeDefaultDescription
executeobjectExecution configuration for introspection
execute.enabledboolfalseEnable introspection for execution
introspectobjectIntrospection configuration for allowing clients to run introspection
introspect.enabledboolfalseEnable introspection requests
introspect.minifyboolfalseMinify introspection results to reduce context window usage
searchobjectSearch tool configuration
search.enabledboolfalseEnable search tool
search.index_memory_bytesnumber50000000Amount of memory used for indexing (in bytes)
search.leaf_depthnumber1Depth of subtype information to include from matching types
search.minifyboolfalseMinify search results to reduce context window usage
validateobjectValidation tool configuration
validate.enabledboolfalseEnable validation tool

Logging

These fields are under the top-level logging key.

OptionTypeDefaultDescription
leveloneOf ["trace", "debug", "info", "warn", "error"]"info"The minimum log level to record
pathFilePathAn output file path for logging. If not provided logging outputs to stdio/stderr.
rotationoneOf ["minutely", "hourly", "daily", "never"]"hourly"The log file rotation interval (if file logging is used)

Operation source

These fields are under the top-level operations key. The available fields depend on the value of the nested source key. The default value for source is "infer". Learn more about defining tools as operations.

SourceOptionTypeDefaultDescription
GraphOS Collectionsource"collection"Load operations from a GraphOS collection
GraphOS CollectionidstringThe collection ID to use in GraphOS. Use default for the default collection. Learn more.
Introspectionsource"introspect"Load operations by introspecting the schema. Note: You must enable introspection to use this source
Localsource"local"Load operations from local GraphQL files or directories
LocalpathsList<FilePath>Paths to GraphQL files or directories to search. Note: These paths are relative to the location from which you are running Apollo MCP Server.
Manifestsource"manifest"Load operations from a persisted queries manifest file
ManifestpathFilePathThe path to the persisted query manifest
Uplinksource"uplink"Load operations from an uplink manifest. Note: This source requires an Apollo key and graph reference
Infersource"infer"*Infer where to load operations based on other configuration options.

Overrides

These fields are under the top-level overrides key.

OptionTypeDefaultDescription
disable_type_descriptionboolfalseDisable type descriptions to save on context-window space
disable_schema_descriptionboolfalseDisable schema descriptions to save on context-window space
enable_explorerboolfalseExpose a tool that returns the URL to open a GraphQL operation in Apollo Explorer. Note: This requires a GraphOS graph reference
mutation_modeoneOf ["none", "explicit", "all"]"none"Defines the mutation access level for the MCP server

Schema source

These fields are under the top-level schema key. The available fields depend on the value of the nested source key. The default value for source is "uplink".

SourceOptionTypeDefaultDescription
Localsource"local"Load schema from local file
LocalpathFilePathPath to the GraphQL schema
Uplinksource"uplink"*Fetch the schema from uplink. Note: This requires an Apollo key and graph reference

Transport

These fields are under the top-level transport key, to configure running the MCP Server in different environments - stdio, Streamable HTTP or SSE (deprecated).

Text
1transport:
2  type: stdio

The available fields depend on the value of the nested type key:

stdio (default)
OptionValueDefault ValueDescription
type"stdio"*Use standard IO for communication between the server and client
Streamable HTTP
OptionValueValue TypeDescription
type"streamable_http"Host the MCP server on the configuration, using streamable HTTP messages.
address127.0.0.1 (default)IpAddrThe IP address to bind to
port5000 (default)u16The port to bind to
SSE (Deprecated, use StreamableHTTP)
OptionValueValue TypeDescription
type"sse"Host the MCP server on the supplied config, using SSE for communication. Deprecated in favor of StreamableHTTP
address127.0.0.1 (default)IpAddrThe IP address to bind to
port5000 (default)u16The port to bind to

Auth

These fields are under the top-level transport key, nested under the auth key. Learn more about authorization and authentication.

OptionTypeDefaultDescription
serversList<URL>List of upstream delegated OAuth servers (must support OIDC metadata discovery endpoint)
audiencesList<string>List of accepted audiences from upstream signed JWTs
resourcestringThe externally available URL pointing to this MCP server. Can be localhost when testing locally.
resource_documentationstringOptional link to more documentation relating to this MCP server
scopesList<string>List of queryable OAuth scopes from the upstream OAuth servers
disable_auth_token_passthroughboolfalseOptional flag to disable passing validated Authorization header to downstream API

Below is an example configuration using StreamableHTTP transport with authentication:

YAML
mcp.yaml
1transport:
2  type: streamable_http
3  auth:
4    # List of upstream delegated OAuth servers
5    # Note: These need to support the OIDC metadata discovery endpoint
6    servers:
7      - https://auth.example.com
8
9    # List of accepted audiences from upstream signed JWTs
10    # See: https://www.ory.sh/docs/hydra/guides/audiences
11    audiences:
12      - mcp.example.audience
13
14    # The externally available URL pointing to this MCP server. Can be `localhost`
15    # when testing locally.
16    # Note: Subpaths must be preserved here as well. So append `/mcp` if using
17    # Streamable HTTP or `/sse` is using SSE.
18    resource: https://hosted.mcp.server/mcp
19
20    # Optional link to more documentation relating to this MCP server.
21    resource_documentation: https://info.mcp.server
22
23    # List of queryable OAuth scopes from the upstream OAuth servers
24    scopes:
25      - read
26      - mcp
27      - profile

Example config file

The following example file sets your endpoint to localhost:4001, configures transport over Streamable HTTP, enables introspection, and provides two local MCP operations for the server to expose.

YAML
1endpoint: http://localhost:4001/
2transport:
3  type: streamable_http
4introspection:
5  introspect:
6    enabled: true
7operations:
8  source: local
9  paths:
10    - relative/path/to/your/operations/userDetails.graphql
11    - relative/path/to/your/operations/listing.graphql

Override configuration options using environment variables

You can override configuration options using environment variables. The environment variable name is the same as the option name, but with APOLLO_MCP_ prefixed. You can use __ to mark nested options.

For example, to override the introspection.execute.enabled option, you can set the APOLLO_MCP_INTROSPECTION__EXECUTE__ENABLED environment variable.

sh
1APOLLO_MCP_INTROSPECTION__EXECUTE__ENABLED="true"

For list values, you can set the environment variable to a comma-separated list.

For example, to override the transport.auth.servers option, you can set the APOLLO_MCP_TRANSPORT__AUTH__SERVERS environment variable to a comma-separated list.

sh
1APOLLO_MCP_TRANSPORT__AUTH__SERVERS='[server_url_1,server_url_2]'
Feedback

Edit on GitHub

Ask Community