Skip to content

Can we move the transports to separate packages? #753

@paoloricciuti

Description

@paoloricciuti

Is your feature request related to a problem? Please describe.
Right now the MCP server builder and the transport live in the same package. This is good because you don't have to install multiple dependencies but it's bad because it means that regardless of the transport you decide to use you are installing dependencies that are related to the default transport.

This is really not needed since what an MCP server really is is a jsonrpc server so the only concern should be to consume jsonrpc requests and return jsonrpc responses (as plain JS objects).

By doing this if I want to build a stdio i don't need to have express in my dependencies (same if I want to build it with a framework that uses a regular Request/Response.

Describe the solution you'd like
We should have an agnostic @modelcontextprotocol/sdk that only consume and produce JSONrpc and a @modelcontextprotocol/stremable-http @modelcontextprotocol/stdio packages that provide the transport.

Describe alternatives you've considered
Build my own JSONrpc handler that follows the MCP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequest for a new feature that's not currently supported

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions