inspector icon indicating copy to clipboard operation
inspector copied to clipboard

Adding tests for when a sse url with specfic protocols or ports are passed to `useConnection`

Open olaservo opened this issue 8 months ago • 0 comments

Adding tests to confirm the behavior when a url with different protocols or ports are passed to useConnection.

Motivation and Context

See: https://github.com/modelcontextprotocol/inspector/issues/292

So far I'm unable to repro this scenario ^^

How Has This Been Tested?

For these tests:

cd client
npm test

For CLI mode, I ran the default server-everything example using SSE on port 3001 and it was able to connect:

In server-everything:

npm run start:sse

In inspector:

node cli/build/cli.js --cli http://localhost:3001/sse --method tools/call --tool-name echo --tool-arg message="hola PCM!"
{
  "content": [
    {
      "type": "text",
      "text": "Echo: hola PCM!"
    }
  ]
}

Breaking Changes

No

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

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

olaservo avatar Apr 30 '25 13:04 olaservo