MCP SSE Client Python
@zanetworker
About MCP SSE Client Python
Simple MCP Client for remote MCP Servers π
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-sse-client-python": {
"command": "python",
"args": [
"-m",
"mcp_sse_client.examples.llm_example",
"--provider",
"openai",
"--endpoint",
"http://localhost:8000/sse"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MCP SSE Client Python?
MCP SSE Client Python is a Python toolkit for connecting to and interacting with remote Model Context Protocol (MCP) endpoints over Server-Sent Events (SSE). It is designed for developers building AI-driven applications that need to list and invoke MCP tools from a remote server.
How to use MCP SSE Client Python?
Install the package via pip install -e . from source or pip install mcp-playground once published. Set environment variables for LLM provider API keys (e.g., OPENAI_API_KEY). Use the MCPClient class with an endpoint URL ending in /sse. Optionally use OpenAIBridge or other LLM bridges for natural-language tool selection. Run the included Streamlit app with streamlit run app.py for interactive testing.
Key features of MCP SSE Client Python
- Full SSE implementation for real-time remote MCP communication
- LLM-powered tool selection using OpenAI, Anthropic, Ollama, or OpenRouter
- Pythonic
MCPClientwith timeout and retry logic - Interactive Streamlit testing interface with multiple chat modes
- Command-line interface for quick tool listing and invocation
- Automatic error handling with bespoke exception types
Use cases of MCP SSE Client Python
- Connect an AI agent to a remote MCP tool server and let the LLM decide which tool to invoke
- Test and debug a remote MCP endpoint interactively without writing full client code
- Build a chat interface that transparently uses MCP tools when needed
- Scripted automation of MCP tool calls with configurable retry and timeout
FAQ from MCP SSE Client Python
What protocols does MCP SSE Client Python support now?
Currently only Server-Sent Events (SSE). Streamable HTTP, WebSocket, and gRPC are planned for future releases.
Does the endpoint URL require a specific format?
Yes. All MCP endpoints must end with /sse (e.g., http://localhost:8000/sse). The client validates this requirement.
Which LLM providers are supported?
OpenAI, Anthropic, Ollama (local), and OpenRouter. Each has a dedicated bridge class: OpenAIBridge, AnthropicBridge, OllamaBridge, and OpenRouterBridge.
What are the runtime requirements?
Python 3.8 or later, plus mcp>=0.1.0, pydantic>=2.0.0, and optionally openai, anthropic, ollama, and streamlit for their respective features.
How does MCP SSE Client Python handle connection errors?
The client includes automatic retry with exponential backoff, configurable timeout (default 30β―s), and maximum retries (defaultβ―3). Specific exception types (MCPConnectionError, MCPTimeoutError) are provided.
More Other MCP servers
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
π Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
MCP Go π
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
ACI: Open-Source Infra to Power Unified MCP Servers
aipotheosis-labsACI.dev is the open source tool-calling platform that hooks up 600+ tools into any agentic IDE or custom AI agent through direct function calling or a unified MCP server. The birthplace of VibeOps.
Comments