inspector icon indicating copy to clipboard operation
inspector copied to clipboard

Incorrect URL in sse.js when providing a custom path

Open AbdullatifGhajar opened this issue 8 months ago • 0 comments

Summary When adding an sse server using a custom path (e.g. http://localhost:3001/custom/path/sse), the server sends messages requests to http://localhost:3001 instead of http://localhost:3001/custom/path.

Steps to reproduce Steps to reproduce the behavior:

  1. Launch an SSE MCP server on a custom path (e.g. http://localhost:3001/custom/path)
  2. Connect the inspector to it using the UI (enter http://localhost:3001/custom/path/sse in the URL field)
  3. Try to connect. Instead of successful connection, yo get an error because it sends requests to http://localhost:3001

Issue this._endpoint = new URL(messageEvent.data, this._url); in sse.js ignores custom path, which is needed for the upcoming requests.

Impact No connection is possible

AbdullatifGhajar avatar Apr 14 '25 19:04 AbdullatifGhajar