Content
# Sample code for Model Context Protocol (MCP) with Server Sent Event (SSE)
This repository is a sample for using SSE server. This server provides two unhelpful methods but this implementation is very simple and useful for understanding how the SSE server works.
This server implementation is based on official sample code.
- [simple-tool | modelcontextprotocol/python-sdk](https://github.com/modelcontextprotocol/python-sdk/tree/aaf32b530738ff79ba607c2884374243350f521c/examples/servers/simple-tool)
## How to use
First, you must launch the server with the `uv` command like below. This sample code has a standard I/O version, but this repository is just showing how to use the SSE server, so I won't explain the normal version. If you want to know about that, please refer to the official code.
```shell
$ uv run mcp_server_sample --port 8080 --transport sse
```
Next, just execute `client.py`.
```shell
$ python client.py
```