Skip to content

Conversation

@kpavlov
Copy link
Contributor

@kpavlov kpavlov commented Nov 12, 2025

Add McpClient.ipynb example notebook demonstrating MCP client

Motivation and Context

Provide more examples

How Has This Been Tested?

Run Kotlin Notebook locally

Breaking Changes

No

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

@kpavlov kpavlov added documentation Improvements or additions to documentation samples labels Nov 12, 2025
@kpavlov kpavlov marked this pull request as ready for review November 12, 2025 19:54
@kpavlov kpavlov requested a review from devcrocod November 12, 2025 19:54
@kpavlov kpavlov changed the title Add McpClient.ipynb example notebook demonstrating MCP client Add example Kotlin Notebook demonstrating MCP client Nov 12, 2025
@kpavlov kpavlov force-pushed the kpavlov/example-notebook branch from 0fa96a4 to afb006a Compare November 12, 2025 20:00
@kpavlov kpavlov requested a review from tiginamaria November 12, 2025 20:04
@kpavlov kpavlov force-pushed the kpavlov/example-notebook branch from afb006a to 214e49f Compare November 13, 2025 09:56
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.

Thanks for the PR!

I’ve left a few comments regarding the dependencies.

Overall, since this is a notebook, I think it would be better to split the code into separate cells and add some md explanations so that it becomes a complete example

Comment on lines 41 to 52
"import kotlinx.coroutines.runBlocking\n",
"import io.modelcontextprotocol.kotlin.sdk.EmptyJsonObject\n",
"import io.modelcontextprotocol.kotlin.sdk.Implementation\n",
"import io.modelcontextprotocol.kotlin.sdk.TextContent\n",
"import io.modelcontextprotocol.kotlin.sdk.client.Client\n",
"import io.modelcontextprotocol.kotlin.sdk.client.ClientOptions\n",
"import io.modelcontextprotocol.kotlin.sdk.client.StdioClientTransport\n",
"import io.modelcontextprotocol.kotlin.sdk.client.StreamableHttpClientTransport\n",
"import io.ktor.client.HttpClient\n",
"import io.ktor.client.call.body\n",
"import io.ktor.client.request.get\n",
"import kotlinx.serialization.Serializable\n",
"import kotlinx.serialization.json.JsonObject\n",
"import io.ktor.client.plugins.logging.*\n",
"import io.ktor.client.plugins.sse.SSE\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think it’s worth creating a descriptor for mcp sdk?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's also a good way to promote it

@kpavlov kpavlov force-pushed the kpavlov/example-notebook branch 3 times, most recently from 40985e5 to 37d3358 Compare November 14, 2025 10:51
@kpavlov kpavlov requested a review from devcrocod November 14, 2025 10:52
@kpavlov kpavlov force-pushed the kpavlov/example-notebook branch 2 times, most recently from a939dcb to d179c97 Compare November 14, 2025 14:13
@kpavlov kpavlov force-pushed the kpavlov/example-notebook branch from d179c97 to 2a18d95 Compare November 14, 2025 14:15
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.

lgtm!

@kpavlov kpavlov merged commit d2f0893 into main Nov 14, 2025
7 checks passed
@kpavlov kpavlov deleted the kpavlov/example-notebook branch November 14, 2025 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation samples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants