inspector
inspector copied to clipboard
Incorrect URL in sse.js when providing a custom path
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:
- Launch an SSE MCP server on a custom path (e.g.
http://localhost:3001/custom/path) - Connect the inspector to it using the UI (enter
http://localhost:3001/custom/path/ssein the URL field) - 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