diff --git a/docs/source/command-reference.mdx b/docs/source/command-reference.mdx index 7aba2d2c..34daaa16 100644 --- a/docs/source/command-reference.mdx +++ b/docs/source/command-reference.mdx @@ -109,7 +109,7 @@ apollo-mcp-server [OPTIONS] --directory | `-x, --explorer` | Expose a tool that returns the URL to open a GraphQL operation in Apollo Explorer (requires `APOLLO_GRAPH_REF`). | | `-o, --operations [...]` | Operation files to expose as MCP tools. [Learn more](/apollo-mcp-server/guides/#from-operation-files). | | `--manifest ` | The path to the persisted query manifest containing operations. | -| `--collection ` | The ID of an operation collection to use as the source for operations (requires `APOLLO_KEY`). If `default` is used instead of an ID, the MCP Tools for `APOLLO_GRAPH_REF` will be used as the source. | +| `--collection ` | The ID of an operation collection to use as the source for operations (requires `APOLLO_KEY`). If `default` is used instead of an ID, the MCP Tools for `APOLLO_GRAPH_REF` will be used as the source. [Learn more](/apollo-mcp-server/guides/#from-operation-collection) | | `--disable-type-description` | Disable operation root field types in tool description. | | `--disable-schema-description` | Disable schema type definitions referenced by all fields returned by the operation in the tool description. | | `-m, --allow-mutations ` | [default: `none`]

Possible values:
  • `none`: Don't allow any mutations
  • `explicit`: Allow explicit mutations, but don't allow the LLM to build them
  • `all`: Allow the LLM to build mutations
| diff --git a/docs/source/guides/index.mdx b/docs/source/guides/index.mdx index accb1ce8..962622e5 100644 --- a/docs/source/guides/index.mdx +++ b/docs/source/guides/index.mdx @@ -71,6 +71,26 @@ The `--operations` option can also be used to specify a directory. All files wit Files and directories specified with `--operations` will be hot reloaded. When specifying a file, the MCP tool will be updated when the file contents are modified. When specifying a directory, operations exposed as MCP tools will be updated when files are added, modified, or removed from the directory. +### From Operation Collection + +For graphs managed by GraphOS, Apollo MCP Server can get operations from an [Operation Collection](https://www.apollographql.com/docs/graphos/platform/explorer/operation-collections). + +To use a GraphOS Operation Collection, you must: + +- Set `APOLLO_GRAPH_REF` and `APOLLO_KEY` environment variables for a GraphOS graph + +Each variant will have it's own default MCP Tools Collection, but you can specify any shared collection by using `--collection `. +Apollo MCP Server will automatically fetch the default collection if no id is specified. + +```sh title="Example command using a GraphOS Operation Collection" +apollo-mcp-server \ + --directory \ + --schema graphql/weather/api.graphql \ + --collection +``` + +The MCP Server supports hot reloading of the GraphOS Operation Collection, so it can automatically pick up changes from GraphOS without restarting. + ### From persisted query manifests Apollo MCP Server supports reading GraphQL operations from Apollo-formatted [persisted query manifest](/graphos/platform/security/persisted-queries#manifest-format) files.