Simple example client demonstrating how to connect to MCP servers over HTTP (SSE)
17 stars
Python
Updated Sep 19, 2025
Documentation
MCP HTTP Client Example
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.
Features
- Connects to MCP servers over SSE transport
- Lists available tools, resources and prompts
- Properly handles connection lifecycle with async context managers
Requirements
Usage
Clone this repository, then run the example client:
bash
uv run -- main.pyFor example:
bash
uv run -- main.py http://localhost:8000/sseThe client will:
1. Connect to the specified MCP server
2. List its available capabilities
3. Print them as JSON
Documentation
Similar MCP
Based on tags & features
Trending MCP
Most active this week