diff --git a/docs/source/config-file.mdx b/docs/source/config-file.mdx index 54021eaa..8375d547 100644 --- a/docs/source/config-file.mdx +++ b/docs/source/config-file.mdx @@ -113,17 +113,17 @@ These fields are under the top-level `logging` key. 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](/apollo-mcp-server/define-tools). -| Source | Option | Type | Default | Description | -| :----------------- | :------- | :--------------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------ | -| GraphOS Collection | `source` | `"collection"` | | Load operations from a GraphOS collection | -| GraphOS Collection | `id` | `string` | | The collection ID to use in GraphOS. Use `default` for the default collection. [Learn more](/apollo-mcp-server/define-tools#from-operation-collection). | -| Introspection | `source` | `"introspect"` | | Load operations by introspecting the schema. Note: You must enable introspection to use this source | -| Local | `source` | `"local"` | | Load operations from local GraphQL files or directories | -| Local | `paths` | `List` | | Paths to GraphQL files or directories to search. Note: These paths are relative to the location from which you are running Apollo MCP Server. | -| Manifest | `source` | `"manifest"` | | Load operations from a persisted queries manifest file | -| Manifest | `path` | `FilePath` | | The path to the persisted query manifest | -| Uplink | `source` | `"uplink"` | | Load operations from an uplink manifest. Note: This source requires an Apollo key and graph reference | -| Infer | `source` | `"infer"` | \* | Infer where to load operations based on other configuration options. | +| Source | Option | Type | Description | +| :----------------- | :------- | :--------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------ | +| GraphOS Collection | `source` | `"collection"` | Load operations from a GraphOS collection | +| GraphOS Collection | `id` | `string` | The collection ID to use in GraphOS. Use `default` for the default collection. [Learn more](/apollo-mcp-server/define-tools#from-operation-collection). | +| Introspection | `source` | `"introspect"` | Load operations by introspecting the schema. Note: You must enable introspection to use this source | +| Local | `source` | `"local"` | Load operations from local GraphQL files or directories | +| Local | `paths` | `List` | Paths to GraphQL files or directories to search. Note: These paths are relative to the location from which you are running Apollo MCP Server. | +| Manifest | `source` | `"manifest"` | Load operations from a persisted queries manifest file | +| Manifest | `path` | `FilePath` | The path to the persisted query manifest | +| Uplink | `source` | `"uplink"` | Load operations from an uplink manifest. Note: This source requires an Apollo key and graph reference | +| Infer | `source` | `"infer"` | Infer where to load operations based on other configuration options. | ### Overrides @@ -141,45 +141,46 @@ These fields are under the top-level `overrides` key. 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"`. -| Source | Option | Type | Default | Description | -| :----- | :------- | :--------- | :------ | :---------------------------------------------------------------------------------- | -| Local | `source` | `"local"` | | Load schema from local file | -| Local | `path` | `FilePath` | | Path to the GraphQL schema | -| Uplink | `source` | `"uplink"` | \* | Fetch the schema from uplink. Note: This requires an Apollo key and graph reference | +| Source | Option | Type | Description | +| :----- | :------- | :--------- | :---------------------------------------------------------------------------------- | +| Local | `source` | `"local"` | Load schema from local file | +| Local | `path` | `FilePath` | Path to the GraphQL schema | +| Uplink | `source` | `"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). -``` +```yaml transport: - type: stdio + type: streamable_http + address: 127.0.0.1 + port: 5000 + stateful_mode: true ``` -The available fields depend on the value of the nested `type` key: +##### Type -##### stdio (default) +The available fields depend on the value of the nested `type` key. The default type is `stdio`: -| Option | Value | Default Value | Description | -| :----- | :-------- | :------------ | :-------------------------------------------------------------- | -| `type` | `"stdio"` | \* | Use standard IO for communication between the server and client | +| Option | Description | +| :-------------------- | :--------------------------------------------------------------------------------------------------------------- | +| `"stdio"` | Use standard IO for communication between the server and client | +| `"streamable_http"` | Host the MCP server on the configuration, using streamable HTTP messages | +| `"sse"` | Host the MCP server on the supplied config, using SSE for communication. Deprecated in favor of `StreamableHTTP` | -##### Streamable HTTP +##### Transport Type Specific options -| Option | Value | Value Type | Description | -| :-------------- | :-------------------- | :--------- | :------------------------------------------------------------------------ | -| `type` | `"streamable_http"` | | Host the MCP server on the configuration, using streamable HTTP messages. | -| `address` | `127.0.0.1` (default) | `IpAddr` | The IP address to bind to | -| `port` | `5000` (default) | `u16` | The port to bind to | -| `stateful_mode` | `true` (default) | `bool` | Flag to enable or disable stateful mode and session management. | +Some transport types support further configuration. Streamable HTTP and SSE both allow setting address and port. Streamable HTTP also supoorts setting stateful mode. -##### SSE (Deprecated, use StreamableHTTP) +SSE is deprecated and streamable HTTP should be used instead, but settings remain for configuring SSE transport. -| Option | Value | Value Type | Description | -| :-------- | :-------------------- | :--------- | :--------------------------------------------------------------------------------------------------------------- | -| `type` | `"sse"` | | Host the MCP server on the supplied config, using SSE for communication. Deprecated in favor of `StreamableHTTP` | -| `address` | `127.0.0.1` (default) | `IpAddr` | The IP address to bind to | -| `port` | `5000` (default) | `u16` | The port to bind to | + +| Option | Type | Default | Description | +| :-------------- | :--------- | :---------- | :----------------------------------------------------------------------------------- | +| `address` | `IpAddr` | `127.0.0.1` | The IP address to bind to | +| `port` | `u16` | `5000` | The port to bind to | +| `stateful_mode` | `bool` | `true` | Flag to enable or disable stateful mode and session management. Not supported by SSE | ### Auth @@ -226,6 +227,7 @@ transport: - profile ``` + ### Telemetry | Option | Type | Default | Description | @@ -272,11 +274,11 @@ transport: | `always_off` | `string` | Sampling is turned off, no traces will be exported. | | `0.0-1.0` | `f64` | Percentage of traces to export. | -## Example config file +## Example config files 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 config.yaml +```yaml title="config.yaml" endpoint: http://localhost:4001/ transport: type: streamable_http @@ -290,6 +292,18 @@ operations: - relative/path/to/your/operations/listing.graphql ``` +This configuration file will set up Streamable HTTP transport, enables introspection, and makes all operations derive from introspection: + +```yaml title="config.yaml" +transport: + type: streamable_http +introspection: + introspect: + enabled: true +operations: + source: introspect +``` + ## 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.