🐞 Bug Summary
I am using Hybrid Cloud Mesh to connect a MCP client in Fyre (Environment A) to a ContextForge instance in AWS (Environment B). SSE messages fail to generate a response due to ContextForge leveraging the URL used by the client's original SSE connection when calling it's own /rpc endpoint. This is because the client URL is only resolvable/reachable from the client's Fyre environment.
The setup:
- MCP Client is in environment A, ContextForge in environment B. Neither the client or ContextForge have a public endpoint.
- Mesh gateways in both environments, where Mesh creates a local endpoint in environment A that proxies traffic to ContextForge in environment B.
- This local endpoint only makes sense in environment A. For example, environment A is a 192.168.x.x private network, environment B is a 10.x.x.x private network.
- MCP Client reaches ContextForge at that local endpoint (i.e. 192.168.0.10).
The behavior:
- Client connects to ContextForge at http://$ENV_A_ENDPOINT/servers/$SERVER_ID/sse , the SSE stream and session_id is set up correctly
- Client sends a POST request to ContextForge at http://$ENV_A_ENDPOINT/servers/$SERVER_ID/message?session_id=$SESSION_ID
- The /message handler in main.py > message_endpoint() broadcasts the message to the corresponding session using session_registry.broadcast()
- To actually respond to the client, ContextForge handles the broadcasted message in session_registry.py > respond() > generate_response()
- In generate_response(), ContextForge attempts to make a RPC call to ContextForge/itself using the URL that the original client used when setting up the SSE stream
- The issue: Because the client reached ContextForge at a URL that only makes sense in environment A, the RPC call fails (since there is no corresponding endpoint in environment B)
🧩 Affected Component
Select the area of the project impacted:
🔁 Steps to Reproduce
Steps are described above in Bug Summary
🤔 Expected Behavior
What should have happened instead?
ContextForge should not rely on the URL used by the client because it may not be resolvable/reachable in ContextForge's environment. It should handle the /rpc call internally rather than going back out over the network to simply reach itself.
📓 Logs / Error Output
Paste any relevant stack traces or logs here.
⚠️ Do not paste secrets, credentials, or tokens.
🧠 Environment Info
You can retrieve most of this from the /version endpoint.
| Key |
Value |
| Version or commit |
1.0.0-RC1 |
| Platform / OS |
Ubuntu 24.04 |
| Container |
Kubernetes (microk8s) |
🧩 Additional Context (optional)
Add any configuration details, flags, or related issues.
🐞 Bug Summary
I am using Hybrid Cloud Mesh to connect a MCP client in Fyre (Environment A) to a ContextForge instance in AWS (Environment B). SSE messages fail to generate a response due to ContextForge leveraging the URL used by the client's original SSE connection when calling it's own /rpc endpoint. This is because the client URL is only resolvable/reachable from the client's Fyre environment.
The setup:
The behavior:
🧩 Affected Component
Select the area of the project impacted:
mcpgateway- APImcpgateway- UI (admin panel)mcpgateway.wrapper- stdio wrapper🔁 Steps to Reproduce
Steps are described above in Bug Summary
🤔 Expected Behavior
What should have happened instead?
ContextForge should not rely on the URL used by the client because it may not be resolvable/reachable in ContextForge's environment. It should handle the /rpc call internally rather than going back out over the network to simply reach itself.
📓 Logs / Error Output
Paste any relevant stack traces or logs here.
⚠️ Do not paste secrets, credentials, or tokens.
🧠 Environment Info
You can retrieve most of this from the
/versionendpoint.🧩 Additional Context (optional)
Add any configuration details, flags, or related issues.