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

Provide a more flexible transport #98

Open
xtuc opened this issue Dec 4, 2024 · 1 comment
Open

Provide a more flexible transport #98

xtuc opened this issue Dec 4, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@xtuc
Copy link

xtuc commented Dec 4, 2024

The client / server architecture, as described by https://modelcontextprotocol.io/docs/concepts/architecture#overview, doesn't fit the serverless use-case (talking for Cloudflare's Workers AI), in which: either the client is running on a server or both client/server are running on the server.

Would it be possible to add a new transport layer that's essentially a JS API, not involving any IO?

Moreover, MCP server are hardcoding a transport: https://github.com/modelcontextprotocol/servers/blob/df0b733c7d086432de14504863c9c0288fc36686/src/gitlab/index.ts#L526-L527, which makes them not easily portable.

@xtuc xtuc added the enhancement New feature or request label Dec 4, 2024
@jspahrsummers
Copy link
Member

I think this issue is describing three different things:

  1. Agreed that the nature of the protocol is currently a poor fit for serverless deployments. I started Statelessness #102 to discuss this in more detail.
  2. Transports are very easily written, so yes, it's possible to create a transport that runs whatever code you want instead of doing I/O.
  3. It's a good point that perhaps servers don't need to hardcode transports! Would welcome any thoughts on how to generalize this without dictating too much of how the server itself is implemented.

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

No branches or pull requests

2 participants