Apollo MCP Server Config File

As the number of command-line options to the Apollo MCP Server has become unwieldy, we’re moving configuration into a config file. Command-line options are being removed, so this will be a breaking change for existing users. We’ve made Release Candidate 0.6.0-rc.3 available now so you can prepare for the change.

You can install the RC as follows:

curl -sSL https://mcp.apollo.dev/download/nix/v0.6.0-rc.3 | sh

Or use the Docker image:

ghcr.io/apollographql/apollo-mcp-server:v0.6.0-rc.3

Here’s an example config file:

# yaml-language-server: $schema=https://github.com/apollographql/apollo-mcp-server/releases/download/v0.6.0-rc.3/config.schema.json
endpoint: https://thespacedevs-production.up.railway.app/
transport:
  type: streamable_http
operations:
  source: local
  paths:
    - ./graphql/TheSpaceDevs/operations
schema:
  source: local
  path: ./graphql/TheSpaceDevs/api.graphql
overrides:
  mutation_mode: all
introspection:
  execute:
    enabled: true
  introspect:
    enabled: true
  search:
    enabled: true

If you’re using the YAML Language Support extension in VS Code, the first line specifies the JSON Schema for the config file format, giving you validation and auto-completion in the editor.

This release candidate also contains a new search tool, which is enabled in the example configuration above. Using this tool, the AI model can search for type information in your GraphQL schema. This allows the model to find relevant type information with fewer tool calls than the existing introspect tool.

Please give the release candidate a try, and let us know your feedback on the new configuration file and search tool!

2 Likes

It appears that it requires that GraphOS be specified. If its not specified in the config file, it errors that the APOLLO_GRAPH_REF missing regardless of the fact that GraphOS isn’t being used

1 Like

Thank you for bringing this to our attention, @CyberDaedalus00! We’re looking into the issue and will work on a fix as soon as possible.

@matthew.hawkins and @DaleSeo First thank you for this.. I’ve been trying to find a way to include a header via config without checking it into a repo and this helps immensely. One feature we want is the header directive in the config file which is failing at startup. We get what looks like a rust error

Example header declaration from YAML

headers:
  x-my-cool-header: “thisgivesmeanerror”

Error received
Error: invalid type: found string "x-my-cool-header", expected a borrowed string for key "default.headers.x-my-cool-header" in /config.yaml YAML file

we do have everything else defined and the server appears to start fine wihtout the header declaration in place.

I’d also be interested in what the ENV variable format would be for that since headers is a map but new documentation says that we can also provide an ENV variable using the path

1 Like

@DaleSeo I’m seeing same issue here as @chris-allnutt. I think headers itself is not working correctly from config file. Can you check on this too?

Error: invalid type: found string "authorization", expected a borrowed string for key "HEADERS.AUTHORIZATION" in `APOLLO_MCP_` environment variable(s)

Because I need to do the quick check with auth, so I tried with basic auth, but it failed from here.

Even when I try with just simple key value for headers, it fails too.

1 Like

@chris-allnutt @wangmir Thanks for reporting the issue. I found an open PR that appears to address this issue. We’ll review the changes and include it in v0.6.1:

2 Likes

@CyberDaedalus00 @chris-allnutt @wangmir We’ve just released v0.6.1 with the fixes. Please upgrade to the latest version of Apollo MCP Server and let us know if the issues have been resolved.

1 Like

@DaleSeo Now the problem is resolved correctly. Thanks for the quick fix.

1 Like