v0.6.0
❗ BREAKING ❗
Replace CLI flags with a configuration file - @nicholascioli PR #162
All command line arguments are now removed and replaced with equivalent configuration
options. The Apollo MCP server only accepts a single argument which is a path to a
configuration file. An empty file may be passed, as all options have sane defaults
that follow the previous argument defaults.
All options can be overridden by environment variables. They are of the following
form:
- Prefixed by
APOLLO_MCP_ - Suffixed by the config equivalent path, with
__marking nested options.
E.g. The environment variable to change the config option introspection.execute.enabled
would be APOLLO_MCP_INTROSPECTION__EXECUTE__ENABLED.
Below is a valid configuration file with some options filled out:
custom_scalars: /path/to/custom/scalars
endpoint: http://127.0.0.1:4000
graphos:
apollo_key: some.key
apollo_graph_ref: example@graph
headers:
X-Some-Header: example-value
introspection:
execute:
enabled: true
introspect:
enabled: false
logging:
level: info
operations:
source: local
paths:
- /path/to/operation.graphql
- /path/to/other/operation.graphql
overrides:
disable_type_description: false
disable_schema_description: false
enable_explorer: false
mutation_mode: all
schema:
source: local
path: /path/to/schema.graphql
transport:
type: streamable_http
address: 127.0.0.1
port: 5000🚀 Features
Validate tool for verifying graphql queries before executing them - @swcollard PR #203
The introspection options in the mcp server provide introspect, execute, and search tools. The LLM often tries to validate its queries by just executing them. This may not be desired (there might be side effects, for example). This feature adds a validate tool so the LLM can validate the operation without actually hitting the GraphQL endpoint. It first validates the syntax of the operation, and then checks it against the introspected schema for validation.
Minify introspect return value - @pubmodmatt PR #178
The introspect and search tools now have an option to minify results. Minified GraphQL SDL takes up less space in the context window.
Add search tool - @pubmodmatt PR #171
A new experimental search tool has been added that allows the AI model to specify a set of terms to search for in the GraphQL schema. The top types matching that search are returned, as well as enough information to enable creation of GraphQL operations involving those types.