Skip to content

Commit 39a4379

Browse files
authored
Merge pull request #223 from apollographql/document-config-file
docs: Provide example config file for documentation
2 parents ffbcf92 + 35b8c9f commit 39a4379

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

docs/source/command-reference.mdx

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,46 @@ iwr 'https://mcp.apollo.dev/download/win/v0.6.1' | iex
8787

8888
## Usage
8989

90-
Configure the Apollo MCP server with a configuration file. The path to this file is the only argument.
90+
Configure the Apollo MCP server with a YAML configuration file.
9191

9292
```sh showLineNumbers=false
9393
apollo-mcp-server [OPTIONS] <PATH/TO/CONFIG/FILE>
9494
```
9595

96+
A configuration file is optional. If the file is not provided, environment variables for your graph credentials (`APOLLO_GRAPH_REF` and `APOLLO_KEY`) are required for the server to run.
97+
9698
### CLI options
9799

98100
| Option | Description |
99101
| :-------------- | :------------------------ |
100102
| `-h, --help` | Print help information |
101103
| `-V, --version` | Print version information |
102104

105+
### Example config file
106+
107+
The following example file sets your endpoint to `localhost:4001`, configures transport over Streamable HTTP, provides a GraphOS key and graph reference,
108+
enables introspection, and provides two local MCP operations for the server to expose.
109+
110+
```yaml config.yaml
111+
endpoint: http://localhost:4001/
112+
transport:
113+
type: streamable_http
114+
graphos:
115+
apollo_key: <YOUR_APOLLO_KEY>
116+
apollo_graph_ref: <YOUR_APOLLO_GRAPH_REF>
117+
introspection:
118+
introspect:
119+
enabled: true
120+
operations:
121+
source: local
122+
paths:
123+
- relative/path/to/your/operations/userDetails.graphql
124+
- relative/path/to/your/operations/listing.graphql
125+
```
126+
103127
### Config options
104128
105-
All fields are optional and have sensible default values.
129+
All fields are optional.
106130
107131
| Option | Type | Default | Description |
108132
| :--------------- | :-------------------- | :----------------------- | :------------------------------------------------------------ |
@@ -120,7 +144,7 @@ All fields are optional and have sensible default values.
120144

121145
#### GraphOS configuration
122146

123-
These fields are under the top-level `graphos` key.
147+
These fields are under the top-level `graphos` key and define your GraphOS graph credentials and endpoints.
124148

125149
| Option | Type | Default | Description |
126150
| :------------------------ | :------- | :------ | :-------------------------------------------------------------------------------------------------------------- |
@@ -132,7 +156,7 @@ These fields are under the top-level `graphos` key.
132156

133157
#### Introspection configuration
134158

135-
These fields are under the top-level `introspection` key.
159+
These fields are under the top-level `introspection` key. Learn more about the MCP [introspection tools](/apollo-mcp-server/guides#introspection-tools).
136160

137161
| Option | Type | Default | Description |
138162
| :------------------- | :------- | :------ | :-------------------------------------------------------------------- |
@@ -164,7 +188,7 @@ The default value for `source` is `"infer"`.
164188
| GraphOS Collection | `id` | `string` | | The collection ID to use in GraphOS. Use `default` for the default collection. [Learn more](/apollo-mcp-server/guides/#from-operation-collection) |
165189
| Introspection | `source` | `"introspect"` | | Load operations by introspecting the schema. Note: You must enable introspection to use this source |
166190
| Local | `source` | `"local"` | | Load operations from local GraphQL files or directories |
167-
| Local | `paths` | `List<FilePath>` | | Paths to GraphQL files or directories to search |
191+
| 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. |
168192
| Manifest | `source` | `"manifest"` | | Load operations from a persisted queries manifest file |
169193
| Manifest | `path` | `FilePath` | | The path to the persisted query manifest |
170194
| Uplink | `source` | `"uplink"` | | Load operations from an uplink manifest. Note: This source requires an Apollo key and graph reference |

0 commit comments

Comments
 (0)