Skip to content

[Bug]: Export virtual server configuration URL not respecting APP_ROOT_PATH #1319

@ChrisPC-39

Description

@ChrisPC-39

🐞 Bug Summary

When exporting the configuration of a virtual server to use as SSE for agents (e.g: langchain) using a custom APP_ROOT_PATH, the generated SSE URL is incorrect.

The UI currently returns:
https://<HOSTNAME>/servers/<SERVER_ID>/sse

This URL is not valid for accessing the SSE stream.

The correct URL should be:
https://<HOSTNAME>/<APP_ROOT_PATH>/servers/<SERVER_ID>/sse


🧩 Affected Component

Select the area of the project impacted:

  • mcpgateway - API
  • mcpgateway - UI (admin panel)
  • mcpgateway.wrapper - stdio wrapper
  • Federation or Transports
  • CLI, Makefiles, or shell scripts
  • Container setup (Docker/Podman/Compose)
  • Other (explain below)

🔁 Steps to Reproduce

  1. Export the configuration of a virtual server from the MCP Gateway.
  2. Note the SSE URL provided in the export.
  3. Attempt to connect to that SSE URL with an agent (e.g., chuk or langchain) OR MCP Inspctor.
  4. Observe that the connection fails because the path is incorrect.

🤔 Expected Behavior

The exported configuration should contain the correct SSE URL that agents can connect to:
https://<HOSTNAME>/<APP_ROOT_PATH>/servers/<SERVER_ID>/sse

Seems like APP_ROOT_PATH is not being used.


📓 Logs / Error Output

N/A – the issue is reproducible simply by inspecting the configuration export and attempting to connect to the SSE endpoint.


🧠 Environment Info

You can retrieve most of this from the /version endpoint.

Key Value
Version or commit v0.8.0
Runtime e.g. Python 3.11, Gunicorn
Platform / OS e.g. Linux
Container e.g. Podman

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriageIssues / Features awaiting triage

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions