modelcontextprotocol / modelcontextprotocol/kotlin-sdk
Ktor extensions for StreamableHttpServerTransport
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 1.5k
- Forks
- 248
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 23
Description
Create Ktor extensions for StreamableHttpServerTransport.
Server should support both stateful and stateless operation mode.
1. Application-level extensions.
API might look like. Naming is an open question
application {
routing {
mcpStreamableHttp(config: StreamableHttpServerTransport.Configuration) { mcpServer }
}
}
2. Route-level extensions. API might look like
application {
install(SSE)
routing {
route("/mcp") {
mcpStreamableHttp(config: StreamableHttpServerTransport.Configuration) { mcpServer }
}
}
}
Definition of Done:
For both (Application+Route level extensions) x (Statefull+stateless mode) = (4 combinations):
- Routes implemented
- Integration test for happy scenario
- Unit tests for route initialization, like this
Related PRs:
- #504 initial implementation
- #560 streamable transport configuration
- #563
- #535
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the initial implementation in #504 and the transport configuration in #560, then compare the referenced KtorStatelessStreamableHttpRouteExtensionsTest. Define the application- and route-level extensions for both stateful and stateless modes, with routes, happy-path integration tests, and route-initialization unit tests covering all four combinations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100