docs: streamable server sample (#595)
- add a simple streamable http server example with auth - update readme: replace quickstart example from sse server to streamable server - add readme files for samples, simple-streamable-server, notebooks closes #170 ## How Has This Been Tested? knit and inspector ## Breaking Changes NaN ## 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) - [x] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [ ] I have added appropriate error handling - [x] I have added or updated documentation as needed
This commit is contained in:
parent
5b58814613
commit
0b39f57cff
1 changed files with 1085 additions and 254 deletions
55
samples/README.md
Normal file
55
samples/README.md
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
# Kotlin MCP SDK Samples
|
||||
|
||||
Runnable projects demonstrating MCP server and client implementations with the
|
||||
[Kotlin MCP SDK](https://github.com/modelcontextprotocol/kotlin-sdk).
|
||||
For background on the protocol itself, see the [MCP documentation](https://modelcontextprotocol.io/introduction).
|
||||
|
||||
## Overview
|
||||
|
||||
| Sample | Type | Transport | MCP Features |
|
||||
|--------------------------------------------------------|-------------------|-----------------|------------------------------------|
|
||||
| [simple-streamable-server](./simple-streamable-server) | Server | Streamable HTTP | Tools, Resources, Prompts, Logging |
|
||||
| [kotlin-mcp-server](./kotlin-mcp-server) | Server | STDIO, SSE | Tools, Resources, Prompts |
|
||||
| [weather-stdio-server](./weather-stdio-server) | Server | STDIO | Tools |
|
||||
| [kotlin-mcp-client](./kotlin-mcp-client) | Client | STDIO | Tool discovery & invocation |
|
||||
| [notebooks](./notebooks) | Client (Notebook) | Streamable HTTP | Tool discovery & invocation |
|
||||
|
||||
## Getting Started
|
||||
|
||||
- **Building a server?** Start with [simple-streamable-server](./simple-streamable-server) — it
|
||||
uses the recommended Streamable HTTP transport and covers tools, resources, prompts, and logging.
|
||||
- **Building a client?** Open the [notebooks](./notebooks) sample for a step-by-step walkthrough,
|
||||
or see [kotlin-mcp-client](./kotlin-mcp-client) for a full CLI client with Anthropic API
|
||||
integration.
|
||||
|
||||
## Samples
|
||||
|
||||
### Simple Streamable HTTP Server
|
||||
|
||||
A minimal Streamable HTTP server with optional Bearer token authentication. Demonstrates tools
|
||||
(`greet`, `multi-greet`), a prompt template, a resource, and server-to-client logging notifications.
|
||||
[Read more →](./simple-streamable-server)
|
||||
|
||||
### Kotlin MCP Server
|
||||
|
||||
A multi-transport server supporting STDIO, SSE (plain), and SSE (Ktor plugin). Useful for exploring
|
||||
different transport modes side by side.
|
||||
[Read more →](./kotlin-mcp-server)
|
||||
|
||||
### Weather STDIO Server
|
||||
|
||||
A focused STDIO server that exposes weather forecast and alert tools backed by the weather.gov API.
|
||||
Includes Claude Desktop integration instructions.
|
||||
[Read more →](./weather-stdio-server)
|
||||
|
||||
### Kotlin MCP Client
|
||||
|
||||
An interactive CLI client that connects to any MCP server over STDIO and routes queries through
|
||||
Anthropic's Claude API, bridging MCP tools with LLM conversations.
|
||||
[Read more →](./kotlin-mcp-client)
|
||||
|
||||
### MCP Client Notebook
|
||||
|
||||
A Kotlin notebook that connects to a remote MCP server via Streamable HTTP and demonstrates ping,
|
||||
tool listing, and tool invocation — all in an interactive cell-by-cell format.
|
||||
[Read more →](./notebooks)
|
||||
Loading…
Reference in a new issue