Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration tests for a server with SSE transport #17

Open
Chrisbattarbee opened this issue Dec 11, 2024 · 5 comments
Open

Add integration tests for a server with SSE transport #17

Chrisbattarbee opened this issue Dec 11, 2024 · 5 comments
Labels

Comments

@Chrisbattarbee
Copy link
Contributor

Integration tests should:

  1. Spin up an MCP server
  2. Query all the generated endpoints (list, initialize etc), validate that the response is as expected
  3. Query the user specified endpoints for tools, resources etc, validate that the response is as expected
  4. Make incorrect queries, validate that the server returns appropriate errors and recovers correctly
@svperfecta
Copy link

Would be nice to be able to instantiate multiple servers, and mount each on a base_path.

  • FooServer -> /foo
  • BarServer -> /bar

It will make having a single monolithic server make more sense, and (when auth is supported) make it easier to implement ACLs.

@svperfecta
Copy link

Would also be nice to add middleware support.

@Chrisbattarbee
Copy link
Contributor Author

Definitely agree, the way I'm imagining that SSE should work is that the transport will register itself onto an existing http server as a handler.

My personal use case is that I want to use our existing http servers (gin) to also host MCP servers so we'll definitely support this.

I don't quite have a lot of the specifics fleshed out in my mind right now, I'll probably write up a proposal later this week after looking at some of the implementations in the official sdks.

@svperfecta
Copy link

We're thinking of cloud hosting ours, using gRPC with a custom auth middleware, and doing something like running a local (generated) grpc proxy. For now, we'll do something like store a JWT locally which is passed along for authentication / authorization to the proxy, which unlocks certain endpoints. (This is a short term hack until they figure out a real auth / auth model.)

@Chrisbattarbee
Copy link
Contributor Author

Yeah makes sense, the current proposal PR for auth (support for JWT and oauth) is here modelcontextprotocol/specification#101 if anyone happens to find this later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants