Skip to content

Commit ad5c9e3

Browse files
feat!: replace args with config file (#162)
* feat!: replace args with config file This commit replaces all cli arguments with a single config file to simplify the deployment process and make future iterations on config easier to sync across projects using the MCP server. BREAKING: Users now need to create a config file instead of using CLI arguments. Co-authored-by: Matthew Hawkins <[email protected]>
1 parent 588ef96 commit ad5c9e3

22 files changed

+1024
-399
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
### Replace CLI flags with a configuration file - @nicholascioli PR #162
2+
3+
All command line arguments are now removed and replaced with equivalent configuration
4+
options. The Apollo MCP server only accepts a single argument which is a path to a
5+
configuration file. An empty file may be passed, as all options have sane defaults
6+
that follow the previous argument defaults.
7+
8+
Below is a valid configuration file with some options filled out:
9+
10+
```yaml
11+
custom_scalars: /path/to/custom/scalars
12+
endpoint: http://127.0.0.1:4000
13+
graphos:
14+
apollo_key: some.key
15+
apollo_graph_ref: example@graph
16+
headers:
17+
X-Some-Header: example-value
18+
introspection:
19+
execute:
20+
enabled: true
21+
introspect:
22+
enabled: false
23+
log_level: info
24+
operations:
25+
source: local
26+
paths:
27+
- /path/to/operation.graphql
28+
- /path/to/other/operation.graphql
29+
overrides:
30+
disable_type_description: false
31+
disable_schema_description: false
32+
enable_explorer: false
33+
mutation_mode: all
34+
schema:
35+
source: local
36+
path: /path/to/schema.graphql
37+
transport:
38+
type: streamable_http
39+
address: 127.0.0.1
40+
port: 5000
41+
```

Cargo.lock

Lines changed: 193 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ reqwest = { version = "0.12.15", default-features = false, features = [
2121
"json",
2222
"native-tls-vendored",
2323
] }
24+
secrecy = { version = "0.10.3", features = ["serde"] }
2425
serde = { version = "1.0.219", features = ["derive"] }
2526
serde_json = "1.0.140"
2627
thiserror = "2.0.12"
@@ -39,7 +40,7 @@ tokio-stream = "0.1"
3940
tracing = "0.1.41"
4041
tracing-core = "0.1.33"
4142
tracing-subscriber = { version = "0.3.19", features = ["json"] }
42-
url = "2.4"
43+
url = { version = "2.4", features = ["serde"] }
4344

4445
[workspace.metadata]
4546
crane.name = "apollo-mcp"

crates/apollo-mcp-registry/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ graphql_client = "0.14.0"
1818
insta.workspace = true
1919
notify = "8.0.0"
2020
reqwest.workspace = true
21-
secrecy = "0.10.3"
21+
secrecy.workspace = true
2222
serde.workspace = true
2323
serde_json.workspace = true
2424
thiserror.workspace = true

0 commit comments

Comments
 (0)