
mcp http client example
Simple example client demonstrating how to connect to MCP servers over HTTP (SSE)
Repository Info
About This Server
Simple example client demonstrating how to connect to MCP servers over HTTP (SSE)
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
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
- uv
Usage
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
Documentation
- MCP Specification
- MCP Python SDK
Quick Start
Clone the repository
git clone https://github.com/slavashvets/mcp-http-client-exampleInstall dependencies
cd mcp-http-client-example
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.