Skip to content

Commit 9cec4d4

Browse files
authored
Merge branch 'main' into docs-mcp-landing-cards
2 parents db09f07 + f3d612e commit 9cec4d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4521
-548
lines changed

.github/workflows/prep-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ jobs:
232232
233233
- name: Open/Update draft PR to main
234234
env:
235-
HEAD: ${{ github.ref_name }}
235+
HEAD: release/${{ steps.bump.outputs.new_version }}
236236
TITLE: Releasing ${{ steps.bump.outputs.new_version }}
237237
shell: bash
238238
run: |

.vscode/launch.json

Lines changed: 84 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,86 @@
11
{
2-
"version": "0.2.0",
3-
"configurations": [
4-
{
5-
"type": "node",
6-
"request": "launch",
7-
"name": "Run apollo-mcp-server [Weather][Streamable HTTP]",
8-
"runtimeExecutable": "cargo",
9-
"runtimeArgs": [
10-
"run",
11-
"--bin",
12-
"apollo-mcp-server",
13-
"--",
14-
"graphql/weather/config.yaml",
15-
],
16-
"cwd": "${workspaceFolder}",
17-
"console": "integratedTerminal",
18-
"env": {
19-
"RUST_BACKTRACE": "1"
20-
}
21-
},
22-
{
23-
"type": "lldb",
24-
"request": "launch",
25-
"name": "Debug apollo-mcp-server [Weather][Streamable HTTP]",
26-
"cargo": {
27-
"args": [
28-
"build",
29-
"--bin=apollo-mcp-server",
30-
"--lib"
31-
],
32-
"filter": {
33-
"name": "apollo-mcp-server",
34-
"kind": "bin"
35-
}
36-
},
37-
"args": [
38-
"graphql/weather/config.yaml",
39-
],
40-
"cwd": "${workspaceFolder}",
41-
"env": {
42-
"RUST_BACKTRACE": "1"
43-
}
44-
},
45-
{
46-
"type": "node",
47-
"request": "launch",
48-
"name": "Run apollo-mcp-server [TheSpaceDevs][Streamable HTTP]",
49-
"runtimeExecutable": "cargo",
50-
"runtimeArgs": [
51-
"run",
52-
"--bin",
53-
"apollo-mcp-server",
54-
"--",
55-
"graphql/TheSpaceDevs/config.yaml",
56-
],
57-
"cwd": "${workspaceFolder}",
58-
"console": "integratedTerminal",
59-
"env": {
60-
"RUST_BACKTRACE": "1"
61-
}
62-
},
63-
{
64-
"type": "node",
65-
"request": "launch",
66-
"name": "Run mcp-inspector",
67-
"runtimeExecutable": "npx",
68-
"runtimeArgs": [
69-
"@modelcontextprotocol/inspector"
70-
],
71-
"cwd": "${workspaceFolder}",
72-
"console": "integratedTerminal"
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Run apollo-mcp-server [Weather][Streamable HTTP]",
8+
"runtimeExecutable": "cargo",
9+
"runtimeArgs": [
10+
"run",
11+
"--bin",
12+
"apollo-mcp-server",
13+
"--",
14+
"graphql/weather/config.yaml"
15+
],
16+
"cwd": "${workspaceFolder}",
17+
"console": "integratedTerminal",
18+
"env": {
19+
"RUST_BACKTRACE": "1"
20+
}
21+
},
22+
{
23+
"type": "lldb",
24+
"request": "launch",
25+
"name": "Debug apollo-mcp-server [Weather][Streamable HTTP]",
26+
"cargo": {
27+
"args": ["build", "--bin=apollo-mcp-server", "--lib"],
28+
"filter": {
29+
"name": "apollo-mcp-server",
30+
"kind": "bin"
7331
}
74-
]
75-
}
32+
},
33+
"args": ["graphql/weather/config.yaml"],
34+
"cwd": "${workspaceFolder}",
35+
"env": {
36+
"RUST_BACKTRACE": "1",
37+
"APOLLO_MCP_LOGGING__LEVEL": "debug"
38+
}
39+
},
40+
{
41+
"type": "node",
42+
"request": "launch",
43+
"name": "Run apollo-mcp-server [TheSpaceDevs][Streamable HTTP]",
44+
"runtimeExecutable": "cargo",
45+
"runtimeArgs": [
46+
"run",
47+
"--bin",
48+
"apollo-mcp-server",
49+
"--",
50+
"graphql/TheSpaceDevs/config.yaml"
51+
],
52+
"cwd": "${workspaceFolder}",
53+
"console": "integratedTerminal",
54+
"env": {
55+
"RUST_BACKTRACE": "1"
56+
}
57+
},
58+
{
59+
"type": "lldb",
60+
"request": "launch",
61+
"name": "Debug apollo-mcp-server [TheSpaceDevs][Streamable HTTP]",
62+
"cargo": {
63+
"args": ["build", "--bin=apollo-mcp-server", "--lib"],
64+
"filter": {
65+
"name": "apollo-mcp-server",
66+
"kind": "bin"
67+
}
68+
},
69+
"args": ["graphql/TheSpaceDevs/config.yaml"],
70+
"cwd": "${workspaceFolder}",
71+
"env": {
72+
"RUST_BACKTRACE": "1",
73+
"APOLLO_MCP_LOGGING__LEVEL": "debug"
74+
}
75+
},
76+
{
77+
"type": "node",
78+
"request": "launch",
79+
"name": "Run mcp-inspector",
80+
"runtimeExecutable": "npx",
81+
"runtimeArgs": ["@modelcontextprotocol/inspector"],
82+
"cwd": "${workspaceFolder}",
83+
"console": "integratedTerminal"
84+
}
85+
]
86+
}

CHANGELOG.md

Lines changed: 164 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,168 @@ All notable changes to this project will be documented in this file.
44

55
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
# [0.9.0] - 2025-09-24
8+
9+
## 🚀 Features
10+
11+
### Prototype OpenTelemetry Traces in MCP Server - @swcollard PR #274
12+
13+
Pulls in new crates and SDKs for prototyping instrumenting the Apollo MCP Server with Open Telemetry Traces.
14+
15+
- Adds new rust crates to support OTel
16+
- Annotates excecute and call_tool functions with trace macro
17+
- Adds Axum and Tower middleware's for OTel tracing
18+
- Refactors Logging so that all the tracing_subscribers are set together in a single module.
19+
20+
### Add CORS support - @DaleSeo PR #362
21+
22+
This PR implements comprehensive CORS support for Apollo MCP Server to enable web-based MCP clients to connect without CORS errors. The implementation and configuration draw heavily from the Router's approach. Similar to other features like health checks and telemetry, CORS is supported only for the StreamableHttp transport, making it a top-level configuration.
23+
24+
### Enhance tool descriptions - @DaleSeo PR #350
25+
26+
This PR enhances the descriptions of the introspect and search tools to offer clearer guidance for AI models on efficient GraphQL schema exploration patterns.
27+
28+
### Telemetry: Trace operations and auth - @swcollard PR #375
29+
30+
- Adds traces for the MCP server generating Tools from Operations and performing authorization
31+
- Includes the HTTP status code to the top level HTTP trace
32+
33+
### Implement metrics for mcp tool and operation counts and durations - @swcollard PR #297
34+
35+
This PR adds metrics to count and measure request duration to events throughout the MCP server
36+
37+
- apollo.mcp.operation.duration
38+
- apollo.mcp.operation.count
39+
- apollo.mcp.tool.duration
40+
- apollo.mcp.tool.count
41+
- apollo.mcp.initialize.count
42+
- apollo.mcp.list_tools.count
43+
- apollo.mcp.get_info.count
44+
45+
### Adding ability to omit attributes for traces and metrics - @alocay PR #358
46+
47+
Adding ability to configure which attributes are omitted from telemetry traces and metrics.
48+
49+
1. Using a Rust build script (`build.rs`) to auto-generate telemetry attribute code based on the data found in `telemetry.toml`.
50+
2. Utilizing an enum for attributes so typos in the config file raise an error.
51+
3. Omitting trace attributes by filtering it out in a custom exporter.
52+
4. Omitting metric attributes by indicating which attributes are allowed via a view.
53+
5. Created `telemetry_attributes.rs` to map `TelemetryAttribute` enum to a OTEL `Key`.
54+
55+
The `telemetry.toml` file includes attributes (both for metrics and traces) as well as list of metrics gathered. An example would look like the following:
56+
57+
```
58+
[attributes.apollo.mcp]
59+
my_attribute = "Some attribute info"
60+
61+
[metrics.apollo.mcp]
62+
some.count = "Some metric count info"
63+
```
64+
65+
This would generate a file that looks like the following:
66+
67+
```
68+
/// All TelemetryAttribute values
69+
pub const ALL_ATTRS: &[TelemetryAttribute; 1usize] = &[
70+
TelemetryAttribute::MyAttribute
71+
];
72+
#[derive(Debug, ::serde::Deserialize, ::schemars::JsonSchema,, Clone, Eq, PartialEq, Hash, Copy)]
73+
pub enum TelemetryAttribute {
74+
///Some attribute info
75+
#[serde(alias = "my_attribute")]
76+
MyAttribute,
77+
}
78+
impl TelemetryAttribute {
79+
/// Supported telemetry attribute (tags) values
80+
pub const fn as_str(&self) -> &'static str {
81+
match self {
82+
TelemetryAttribute::MyAttribute => "apollo.mcp.my_attribute",
83+
}
84+
}
85+
}
86+
#[derive(Debug, ::serde::Deserialize, ::schemars::JsonSchema,, Clone, Eq, PartialEq, Hash, Copy)]
87+
pub enum TelemetryMetric {
88+
///Some metric count info
89+
#[serde(alias = "some.count")]
90+
SomeCount,
91+
}
92+
impl TelemetryMetric {
93+
/// Converts TelemetryMetric to &str
94+
pub const fn as_str(&self) -> &'static str {
95+
match self {
96+
TelemetryMetric::SomeCount => "apollo.mcp.some.count",
97+
}
98+
}
99+
}
100+
```
101+
102+
An example configuration that omits `tool_name` attribute for metrics and `request_id` for tracing would look like the following:
103+
104+
```
105+
telemetry:
106+
exporters:
107+
metrics:
108+
otlp:
109+
endpoint: "http://localhost:4317"
110+
protocol: "grpc"
111+
omitted_attributes:
112+
- tool_name
113+
tracing:
114+
otlp:
115+
endpoint: "http://localhost:4317"
116+
protocol: "grpc"
117+
omitted_attributes:
118+
- request_id
119+
```
120+
121+
### Adding config option for trace sampling - @alocay PR #366
122+
123+
Adding configuration option to sample traces. Can use the following options:
124+
125+
1. Ratio based samples (ratio >= 1 is always sample)
126+
2. Always on
127+
3. Always off
128+
129+
Defaults to always on if not provided.
130+
131+
## 🐛 Fixes
132+
133+
### Update SDL handling in sdl_to_api_schema function - @lennyburdette PR #365
134+
135+
Loads supergraph schemas using a function that supports various features, including Apollo Connectors. When supergraph loading failed, it would load it as a standard GraphQL schema, which reveals Federation query planning directives in when using the `search` and `introspection` tools.
136+
137+
### Include the cargo feature and TraceContextPropagator to send otel headers downstream - @swcollard PR #307
138+
139+
Inside the reqwest middleware, if the global text_map_propagator is not set, it will no op and not send the traceparent and tracestate headers to the Router. Adding this is needed to correlate traces from the mcp server to the router or other downstream APIs
140+
141+
### Add support for deprecated directive - @esilverm PR #367
142+
143+
Includes any existing `@deprecated` directives in the schema in the minified output of builtin tools. Now operations generated via these tools should take into account deprecated fields when being generated.
144+
145+
## 📃 Configuration
146+
147+
### Add basic config file options to otel telemetry - @swcollard PR #330
148+
149+
Adds new Configuration options for setting up configuration beyond the standard OTEL environment variables needed before.
150+
151+
- Renames trace->telemetry
152+
- Adds OTLP options for metrics and tracing to choose grpc or http upload protocols and setting the endpoints
153+
- This configuration is all optional, so by default nothing will be logged
154+
155+
### Disable statefulness to fix initialize race condition - @swcollard PR #351
156+
157+
We've been seeing errors with state and session handling in the MCP Server. Whether that is requests being sent before the initialized notification is processed. Or running a fleet of MCP Server pods behind a round robin load balancer. A new configuration option under the streamable_http transport `stateful_mode`, allows disabling session handling which appears to fix the race condition issue.
158+
159+
## 🛠 Maintenance
160+
161+
### Add tests for server event and SupergraphSdlQuery - @DaleSeo PR #347
162+
163+
This PR adds tests for some uncovered parts of the codebase to check the Codecov integration.
164+
165+
### Fix version on mcp server tester - @alocay PR #374
166+
167+
Add a specific version when calling the mcp-server-tester for e2e tests. The current latest (1.4.1) as an issue so to avoid problems now and in the future updating the test script to invoke the testing tool via specific version.
168+
7169
# [0.8.0] - 2025-09-12
8170

9171
## 🚀 Features
@@ -30,8 +192,6 @@ Update the RMCP dependency to the latest version, pulling in newer specification
30192

31193
Pins the stable version of Rust to the current latest version to ensure backwards compatibility with future versions.
32194

33-
34-
35195
# [0.7.5] - 2025-09-03
36196

37197
## 🐛 Fixes
@@ -51,6 +211,7 @@ This change also updates the input schema to the execute tool to make it more cl
51211
Adding some basic e2e tests using [mcp-server-tester](https://github.com/steviec/mcp-server-tester). Currently, the tool does not always exit (ctrl+c is sometimes needed) so this should be run manually.
52212

53213
### How to run tests?
214+
54215
Added a script `run_tests.sh` (may need to run `chmod +x` to run it) to run tests. Basic usage found via `./run_tests.sh -h`. The script does the following:
55216

56217
1. Builds test/config yaml paths and verifies the files exist.
@@ -60,6 +221,7 @@ Added a script `run_tests.sh` (may need to run `chmod +x` to run it) to run test
60221
5. On script exit the generated config is cleaned up.
61222

62223
### Example run:
224+
63225
To run the tests for `local-operations` simply run `./run_tests.sh local-operations`
64226

65227
### Update snapshot format - @DaleSeo PR #313

CHANGELOG_SECTION.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ Update the RMCP dependency to the latest version, pulling in newer specification
2323
### ci: Pin stable rust version ([Issue #287](https://github.com/apollographql/apollo-mcp-server/issues/287))
2424

2525
Pins the stable version of Rust to the current latest version to ensure backwards compatibility with future versions.
26-

0 commit comments

Comments
 (0)