Skip to content

Conversation

@CBenoit
Copy link
Member

@CBenoit CBenoit commented Sep 19, 2025

The MCP proxy was previously handling the initialize request itself and returning a response instead of forwarding it to the target MCP server. It also intercepted notifications/initialized and logging/ setLevel without passing them through.

Additionally, any unknown methods were being answered with an error response, even though the actual server might support them.

This change forwards all requests and notifications directly to the server to ensure correct behavior and compatibility.

Issue: DGW-308

@CBenoit CBenoit marked this pull request as draft September 19, 2025 14:21
@CBenoit CBenoit force-pushed the test/add-jetsocat-cli-tests branch from b0096fb to d3ddc1f Compare September 19, 2025 14:34
Base automatically changed from test/add-jetsocat-cli-tests to master September 19, 2025 14:52
@CBenoit CBenoit force-pushed the DGW-308 branch 5 times, most recently from 033e420 to 3e5a528 Compare September 22, 2025 18:30
@CBenoit CBenoit force-pushed the DGW-308 branch 3 times, most recently from 6e01dc8 to 185d843 Compare September 27, 2025 15:48
The MCP proxy was previously handling the initialize request itself and
returning a response instead of forwarding it to the target MCP server.
It also intercepted notifications/initialized and logging/ setLevel
without passing them through.

Additionally, any unknown methods were being answered with an error
response, even though the actual server might support them.

This change forwards all requests and notifications directly to the
server to ensure correct behavior and compatibility.
@CBenoit CBenoit marked this pull request as ready for review September 30, 2025 14:46
@CBenoit CBenoit enabled auto-merge (squash) September 30, 2025 17:01
if let Some(text) = item_obj.get_mut("text") {
if let Some(s) = text.get::<String>() {
let decoded = s
.replace("\\u0027", "'")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That may be the biggest if chain I've ever seen 😄

Copy link
Member Author

@CBenoit CBenoit Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah right! 😂
This was a remaining of the AI-generated stuff from Marc-André’s repo: https://github.com/awakecoding/mcp-proxy-tool/blob/5c8e1664c06c2e0fea2c5f5e861788bd188adfe6/src/main.rs#L285-L306
But got worse when I removed serde-json

[dependencies]
anyhow = "1.0"
assert_cmd = "2.0"
dynosaur = "0.3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, didn't know about that cool crate!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s actually recommended over async-trait now! The implementer does not need to know about the crate too 🙂

Copy link
Contributor

@pacmancoder pacmancoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@CBenoit CBenoit merged commit 3701bd5 into master Oct 1, 2025
39 checks passed
@CBenoit CBenoit deleted the DGW-308 branch October 1, 2025 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants