Skip to content

Conversation

@MukjepScarlet
Copy link
Contributor

@MukjepScarlet MukjepScarlet commented Aug 13, 2025

Replace the CIO dependency with only server/client core dependency.

Motivation and Context

In order to minimize the size of package. There are probably other existing engines like Netty/Tomcat(server) or Java/OkHttp/Apache(client) in the classpath. So we can reuse existing infrastructure.

How Has This Been Tested?

I have run:

  • kotlin-sdk-client: jvmTest, jsTest
  • kotlin-sdk-test: jvmTest, jsTest
  • kotlin-sdk-server: allTests
  • All build of samples

I have an issue about samples/kotlin-mcp-server. io.modelcontextprotocol is not found in commonMain.

Breaking Changes

Yes. They need to implementation CIO engine manually if they use it in their app.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

closes #111

@devcrocod
Copy link
Contributor

Thanks @MukjepScarlet for your pr!

Sorry, I’m having trouble understanding the motivation behind this PR
Is the package size really so large that it needs to be reduced, especially considering that the user will still need a dependency on some engine anyway?

Also, the user can already choose any other engine. CIO is just the default engine

@MukjepScarlet
Copy link
Contributor Author

The main motivation is that the users of client applications like iOS/Android/Desktop would like to see a smaller package. And we usually want to integrate the lib into an existing application with some infrastructures, maybe tons of configurations, in this situation the lib-integrated engine is redundant.

Copy link
Contributor

@kpavlov kpavlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @MukjepScarlet
It's totally make sense to remove Ktor engine implementations from library dependencies, so users would not have to exclude CIO if they want to use another client or server. Let's mention it in the documentation/README too: now users have to explicitly provide KTor engine dependency in their application.

@MukjepScarlet MukjepScarlet marked this pull request as ready for review September 9, 2025 16:46
@MukjepScarlet
Copy link
Contributor Author

Waiting for test workflow

@kpavlov kpavlov added dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation labels Sep 10, 2025
MukjepScarlet and others added 5 commits September 11, 2025 13:46
- Add runtime dependencies to CIO server/client in samples
- Update README.md about adding Ktor engine dependencies
- Add test runtime dependency to slf4j-simple
Copy link
Contributor

@devcrocod devcrocod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kpavlov kpavlov merged commit b1ba0cd into modelcontextprotocol:main Sep 11, 2025
3 checks passed
@MukjepScarlet MukjepScarlet deleted the deps_cio branch September 11, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support other engines (client/server)

3 participants