Skip to content

Setting SERVER_PORT doesn't cascade through to launching the client endpoint #256

@aaronpowell

Description

@aaronpowell

Describe the bug
According to the docs, if you want to run a custom set of ports for the client/server parts you run this command:

CLIENT_PORT=8080 SERVER_PORT=9000 npx @modelcontextprotocol/inspector node build/index.js

When started you have the following in the logs:

🔍 MCP Inspector is up and running at http://127.0.0.1:8080 🚀

Clicking that link results in the inspector failing to resolve the config from the server because it is still trying to access it via the endpoint 6277, not 9000 as specified (and where it is running). This is because the proxyPort query string value isn't passed to the client app to override the default server endpoint port.

To Reproduce
Steps to reproduce the behavior:

  1. Run CLIENT_PORT=8080 SERVER_PORT=9000 npx @modelcontextprotocol/inspector node build/index.js
  2. Click the link displayed
  3. Attempt to access the server

Expected behavior
The URL provided in the terminal launches with the correct server backend.

Logs
If applicable, add logs to help explain your problem.

Additional context
If you add ?proxyPort=9000 to the address bar when launched it does start working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp2-mediumMedium priority - normal timeline

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions