Simple example client demonstrating how to connect to Model Context Protocol (MCP) servers over HTTP using Server-Sent Events (SSE) transport.
Uses the official MCP Python SDK to handle protocol communication and server interactions.
- Connects to MCP servers over SSE transport
- Lists available tools, resources and prompts
- Properly handles connection lifecycle with async context managers
Clone this repository, then run the example client:
uv run -- main.py <server_url>
For example:
uv run -- main.py http://localhost:8000/sse
The client will:
- Connect to the specified MCP server
- List its available capabilities
- Print them as JSON