Skip to content

add config parsing for SSE and streamable HTTP transports#483

Closed
al1y wants to merge 4 commits intomodelcontextprotocol:mainfrom
al1y:add-config-parsing-for-sse-and-streamable-http
Closed

add config parsing for SSE and streamable HTTP transports#483
al1y wants to merge 4 commits intomodelcontextprotocol:mainfrom
al1y:add-config-parsing-for-sse-and-streamable-http

Conversation

@al1y
Copy link
Copy Markdown

@al1y al1y commented Jun 3, 2025

Motivation and Context

Currently, the inspector won't parse and load details from an SSE or Streamable HTTP config.

For example, running node client/bin/start.js --config "C:\path\to\mcp.json" --server my-server where mcp.json is

{
    "mcpServers": {
        "my-server": {
            "type": "sse",
            "url": "http://localhost:60157/sse"
        }
    }
}

will yield

Starting MCP inspector...
⚙️ Proxy server listening on port 6277
🔍 MCP Inspector is up and running at http://127.0.0.1:6274 🚀

NOTE - it defaults to stdio and does not respect the provided config

image

SSE

After these changes, running node client/bin/start.js --config "C:\path\to\mcp.json" --server my-server will yield

Loaded configuration for 'my-server' from 'C:\path\to\test-mcp.json'
Starting MCP inspector...
Using sse transport with URL: http://localhost:60157/sse
⚙️ Proxy server listening on port 6277
� MCP Inspector is up and running at http://127.0.0.1:6274 �

image

Streamable HTTP

Similarly, running node client/bin/start.js --config "C:\path\to\mcp.json" --server my-server where mcp.json is

{
    "mcpServers": {
        "my-server": {
            "type": "streamable-http",
            "url": "http://localhost:3000/mcp"
        }
    }
}

will now yield

Loaded configuration for 'my-server' from 'C:\path\to\test-mcp.json'
Starting MCP inspector...
Using streamable-http transport with URL: http://localhost:3000/mcp
⚙️ Proxy server listening on port 6277
� MCP Inspector is up and running at http://127.0.0.1:6274 �

image

How Has This Been Tested?

Manually with local stdio, sse and streamable-http servers, ensuring stdio env vars propagate appropriately.
Extended related automated tests for client using loaded config values in the connect call.
Better test representation would be in client start and proxy but there's currently no existing framework for either.

Breaking Changes

No expected breaking changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

First contribution, apologies for any errors in process or intent

@al1y al1y force-pushed the add-config-parsing-for-sse-and-streamable-http branch from 41e8d7c to e1477a4 Compare June 6, 2025 22:21
Copy link
Copy Markdown
Member

@olaservo olaservo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR and sorry for the wait. I had some minor comments and questions mainly to clarify the logic.

Comment thread client/bin/start.js Outdated
@olaservo olaservo added the waiting on submitter Waiting for the submitter to provide more info label Jun 15, 2025
@al1y al1y force-pushed the add-config-parsing-for-sse-and-streamable-http branch from e1477a4 to a37a922 Compare June 15, 2025 18:09
@al1y al1y requested a review from olaservo June 16, 2025 14:06
@al1y al1y force-pushed the add-config-parsing-for-sse-and-streamable-http branch 2 times, most recently from 0489103 to e46ae33 Compare June 18, 2025 18:04
@al1y al1y force-pushed the add-config-parsing-for-sse-and-streamable-http branch from e46ae33 to 8a34260 Compare June 21, 2025 16:40
@olaservo
Copy link
Copy Markdown
Member

olaservo commented Jul 7, 2025

Hi, not sure if you already saw that there is a CI failure happening here: https://github.com/modelcontextprotocol/inspector/actions/runs/15797660186/job/45442692899?pr=483
image

@timheuer
Copy link
Copy Markdown

While using he config file is a great option as well, I feel like having just passing in the specific variables would also provide utmost flexibility during development and if containers are in play here a file-based approach only might not be ideal.

something like enabling start --transport streamable-http --uri http://localhost/foo and similarly command/args for stdio.

@al1y al1y closed this Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting on submitter Waiting for the submitter to provide more info

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants