modelcontextprotocol / modelcontextprotocol/kotlin-sdk

Reusable server "specs" - don't re-create the server from scratch for each transport

Open
#296 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Kotlin
Stars
1.5k
Forks
248
Avg merge
1d 20h
Merged PRs (30d)
23

Description

Is your feature request related to a problem? Please describe.

With how each MCP server instance is limited to a single transport, you need to re-create the server instance (and any components, i.e. tools) for each different transport (and maybe session?). This can get decently expensive, especially if you're creating a bunch of JSON schemas.

Describe the solution you'd like

It would be great to be able to create a "spec" like object, quite like what Server is today, and then create an "instance" for each transport. That way you don't need to re-create all the tools and everything else.

Describe alternatives you've considered

Re-creating the server and any tools for each transport is currently the only alternative.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the current Server implementation and its transport handling, since the issue does not identify specific files or tests. Define what a reusable server spec contains and how transport-specific instances are created, then verify that tools and JSON schemas are not recreated for each instance.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.