mcp-client
Simplest example of MCP client-server architecture over HTTP using Python & Golang
claude mcp add --transport stdio duaraghav8-mcp-client-server python server.py
How to use
This MCP server is a Python-based remote MCP server that exposes its tools over HTTP. The example shows a simple client-server pair where the server runs a basic MCP endpoint and the client can call a tool on the server via HTTP. You can start the server in development mode to experiment with tools, then run the client to invoke server-side tools and receive results. By default, the server listens on port 8000 and serves the MCP API at /mcp, allowing you to interact with available commands and tools from the client.
How to install
Prerequisites:
- Python 3.8+ installed on your system
- Virtual environment support (venv)
- Basic network access to run HTTP requests
Step-by-step:
-
Create and activate a virtual environment: python3 -m venv venv source venv/bin/activate
-
Install dependencies using uv (as shown in the project README): uv install
-
Run the server in development mode to test tools: mcp dev server.py
-
Start the MCP server: python server.py Access the MCP API at http://0.0.0.0:8000/mcp by default
-
In another terminal, run the MCP client to call a server tool: python client.py
Additional notes
Tips and common issues:
- Ensure the virtual environment is activated before running any commands.
- The server defaults to port 8000 and binds to 0.0.0.0; adjust firewall rules if needed.
- If you modify dependencies, run uv install again to refresh the environment.
- When troubleshooting, check server.py logs for any errors related to tool registration or HTTP endpoints.
- The MCP client communicates with the server over HTTP; ensure network access between client and server hosts.
Related MCP Servers
mcp-language
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
lihil
2X faster ASGI web framework for python, offering high-level development, low-level performance.
github-brain
An experimental GitHub MCP server with local database.
mcp-auth-proxy
MCP Auth Proxy is a secure OAuth 2.1 authentication proxy for Model Context Protocol (MCP) servers
jmeter
✨ JMeter Meets AI Workflows: Introducing the JMeter MCP Server! 🤯
cloudwatch-logs
MCP server from serkanh/cloudwatch-logs-mcp