trackmcp
Back to directory
slavashvets

mcp-http-client-example

View on GitHub

Simple example client demonstrating how to connect to MCP servers over HTTP (SSE)

17 stars PythonDeveloper Kits 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.py

For example:

bash
uv run -- main.py http://localhost:8000/sse

The client will:

1. Connect to the specified MCP server

2. List its available capabilities

3. Print them as JSON

Documentation

Frequently asked questions

What is mcp-http-client-example?

mcp-http-client-example is Simple example client demonstrating how to connect to MCP servers over HTTP (SSE)

How do I install mcp-http-client-example?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is mcp-http-client-example open source?

Yes — it is hosted on GitHub at https://github.com/slavashvets/mcp-http-client-example/ and has 17 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP