Skip to content

Commit e55c981

Browse files
authored
Merge pull request #373 from apollographql/DXM-256
Simplify tables and add examples
2 parents 6c00daa + d4f8b72 commit e55c981

File tree

1 file changed

+50
-40
lines changed

1 file changed

+50
-40
lines changed

docs/source/config-file.mdx

Lines changed: 50 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,17 @@ These fields are under the top-level `logging` key.
165165
These fields are under the top-level `operations` key. The available fields depend on the value of the nested `source` key.
166166
The default value for `source` is `"infer"`. Learn more about [defining tools as operations](/apollo-mcp-server/define-tools).
167167

168-
| Source | Option | Type | Default | Description |
169-
| :----------------- | :------- | :--------------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------ |
170-
| GraphOS Collection | `source` | `"collection"` | | Load operations from a GraphOS collection |
171-
| 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). |
172-
| Introspection | `source` | `"introspect"` | | Load operations by introspecting the schema. Note: You must enable introspection to use this source |
173-
| Local | `source` | `"local"` | | Load operations from local GraphQL files or directories |
174-
| Local | `paths` | `List<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. |
175-
| Manifest | `source` | `"manifest"` | | Load operations from a persisted queries manifest file |
176-
| Manifest | `path` | `FilePath` | | The path to the persisted query manifest |
177-
| Uplink | `source` | `"uplink"` | | Load operations from an uplink manifest. Note: This source requires an Apollo key and graph reference |
178-
| Infer | `source` | `"infer"` | \* | Infer where to load operations based on other configuration options. |
168+
| Source | Option | Type | Description |
169+
| :----------------- | :------- | :--------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------ |
170+
| GraphOS Collection | `source` | `"collection"` | Load operations from a GraphOS collection |
171+
| 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). |
172+
| Introspection | `source` | `"introspect"` | Load operations by introspecting the schema. Note: You must enable introspection to use this source |
173+
| Local | `source` | `"local"` | Load operations from local GraphQL files or directories |
174+
| Local | `paths` | `List<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. |
175+
| Manifest | `source` | `"manifest"` | Load operations from a persisted queries manifest file |
176+
| Manifest | `path` | `FilePath` | The path to the persisted query manifest |
177+
| Uplink | `source` | `"uplink"` | Load operations from an uplink manifest. Note: This source requires an Apollo key and graph reference |
178+
| Infer | `source` | `"infer"` | Infer where to load operations based on other configuration options. |
179179

180180
### Overrides
181181

@@ -193,52 +193,50 @@ These fields are under the top-level `overrides` key.
193193
These fields are under the top-level `schema` key. The available fields depend on the value of the nested `source` key.
194194
The default value for `source` is `"uplink"`.
195195

196-
| Source | Option | Type | Default | Description |
197-
| :----- | :------- | :--------- | :------ | :---------------------------------------------------------------------------------- |
198-
| Local | `source` | `"local"` | | Load schema from local file |
199-
| Local | `path` | `FilePath` | | Path to the GraphQL schema |
200-
| Uplink | `source` | `"uplink"` | \* | Fetch the schema from uplink. Note: This requires an Apollo key and graph reference |
196+
| Source | Option | Type | Description |
197+
| :----- | :------- | :--------- | :---------------------------------------------------------------------------------- |
198+
| Local | `source` | `"local"` | Load schema from local file |
199+
| Local | `path` | `FilePath` | Path to the GraphQL schema |
200+
| Uplink | `source` | `"uplink"` | Fetch the schema from uplink. Note: This requires an Apollo key and graph reference |
201201

202202
### Transport
203203

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

206-
```
206+
```yaml
207207
transport:
208-
type: stdio
208+
type: streamable_http
209+
address: 127.0.0.1
210+
port: 5000
211+
stateful_mode: true
209212
```
210213

211-
The available fields depend on the value of the nested `type` key:
214+
##### Type
212215

213-
##### stdio (default)
216+
The available fields depend on the value of the nested `type` key. The default type is `stdio`:
214217

215-
| Option | Value | Default Value | Description |
216-
| :----- | :-------- | :------------ | :-------------------------------------------------------------- |
217-
| `type` | `"stdio"` | \* | Use standard IO for communication between the server and client |
218+
| Option | Description |
219+
| :-------------------- | :--------------------------------------------------------------------------------------------------------------- |
220+
| `"stdio"` | Use standard IO for communication between the server and client |
221+
| `"streamable_http"` | Host the MCP server on the configuration, using streamable HTTP messages |
222+
| `"sse"` | Host the MCP server on the supplied config, using SSE for communication. Deprecated in favor of `StreamableHTTP` |
218223

219-
##### Streamable HTTP
224+
##### Transport Type Specific options
220225

221-
| Option | Value | Value Type | Description |
222-
| :-------------- | :-------------------- | :--------- | :------------------------------------------------------------------------ |
223-
| `type` | `"streamable_http"` | | Host the MCP server on the configuration, using streamable HTTP messages. |
224-
| `address` | `127.0.0.1` (default) | `IpAddr` | The IP address to bind to |
225-
| `port` | `8000` (default) | `u16` | The port to bind to |
226-
| `stateful_mode` | `true` (default) | `bool` | Flag to enable or disable stateful mode and session management. |
226+
Some transport types support further configuration. For both `streamable_http` and `sse`, you can set the `address` and `port`. For `streamable_http`, you can also set `stateful_mode`.
227+
228+
| Option | Type | Default | Description |
229+
| :-------------- | :--------- | :---------- | :----------------------------------------------------------------------------------- |
230+
| `address` | `IpAddr` | `127.0.0.1` | The IP address to bind to |
231+
| `port` | `u16` | `8000` | The port to bind to |
232+
| `stateful_mode` | `bool` | `true` | Flag to enable or disable stateful mode and session management. Not supported by SSE |
227233

228234
<Note>
229235

230236
For Apollo MCP Server `≤v1.0.0`, the default `port` value is `5000`. In `v1.1.0`, the default `port` option was changed to `8000` to avoid conflicts with common development tools and services that typically use port 5000 (such as macOS AirPlay, Flask development servers, and other local services).
231237

232238
</Note>
233239

234-
##### SSE (Deprecated, use StreamableHTTP)
235-
236-
| Option | Value | Value Type | Description |
237-
| :-------- | :-------------------- | :--------- | :--------------------------------------------------------------------------------------------------------------- |
238-
| `type` | `"sse"` | | Host the MCP server on the supplied config, using SSE for communication. Deprecated in favor of `StreamableHTTP` |
239-
| `address` | `127.0.0.1` (default) | `IpAddr` | The IP address to bind to |
240-
| `port` | `8000` (default) | `u16` | The port to bind to |
241-
242240
### Auth
243241

244242
These fields are under the top-level `transport` key, nested under the `auth` key. Learn more about [authorization and authentication](/apollo-mcp-server/auth).
@@ -339,11 +337,11 @@ transport:
339337
| `always_off` | `string` | Sampling is turned off, no traces will be exported. |
340338
| `0.0-1.0` | `f64` | Percentage of traces to export. |
341339

342-
## Example config file
340+
## Example config files
343341

344342
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.
345343

346-
```yaml config.yaml
344+
```yaml title="config.yaml"
347345
endpoint: http://localhost:4001/
348346
transport:
349347
type: streamable_http
@@ -357,6 +355,18 @@ operations:
357355
- relative/path/to/your/operations/listing.graphql
358356
```
359357

358+
This configuration file will set up Streamable HTTP transport, enables introspection, and makes all operations derive from introspection:
359+
360+
```yaml title="config.yaml"
361+
transport:
362+
type: streamable_http
363+
introspection:
364+
introspect:
365+
enabled: true
366+
operations:
367+
source: introspect
368+
```
369+
360370
## Override configuration options using environment variables
361371

362372
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.

0 commit comments

Comments
 (0)