python-pip-mcp

MCP.Pizza Chef: lukeage

python-pip-mcp is a minimal reference implementation of an MCP server and client built in Python using pip. Designed for easy debugging in VSCode on Windows, it provides a straightforward example to help developers understand and experiment with the Model Context Protocol. This implementation supports quick setup with virtual environments and environment variables for API keys, making it accessible for developers looking to integrate or test MCP functionality in Python environments. While optimized for Windows and VSCode, it can be adapted to other IDEs and operating systems with minimal changes.

Use This MCP server To

Debug MCP client-server interactions in Python Learn MCP protocol basics with a simple Python example Test MCP integration in VSCode on Windows Develop custom MCP clients or servers using Python Experiment with Anthropic API key usage in MCP Set up Python MCP environment quickly with pip

README

python-pip-mcp

Minimal Example Implementation of an Anthropic MCP Client and Server in Python with Pip.

The goal of this repository is to provide a reference implementation of a mcp client and server that can be easily debugged in VSCode on Windows using the Python / Python Debugger extension.

Alternative IDEs and OS are not tested but should work with minimal adjustments, too.

Installation

# create venv
python -m venv myenv
myenv\Scripts\activate

# install requirements
pip install -r requirements.txt

# create a .env file and set your anthropic api key
cp .env.sample .env

# run mcp_client.py script
python mcp_client.py

# query for current time

python-pip-mcp FAQ

How do I install python-pip-mcp?
Create a Python virtual environment, activate it, then run 'pip install -r requirements.txt'.
Can I use python-pip-mcp on operating systems other than Windows?
Yes, but it is primarily tested on Windows; other OS may require minor adjustments.
Is python-pip-mcp compatible with IDEs other than VSCode?
It is designed for VSCode debugging but should work with other IDEs with minimal setup changes.
How do I configure API keys for python-pip-mcp?
Create a .env file based on .env.sample and set your Anthropic API key there.
Can I debug both MCP client and server with this implementation?
Yes, both client and server are designed to be debuggable in VSCode.
Does python-pip-mcp support LLM providers besides Anthropic?
While focused on Anthropic, the MCP protocol supports providers like OpenAI, Claude, and Gemini.
What Python version is recommended for python-pip-mcp?
Use Python 3.7 or higher for best compatibility.
How do I run the MCP client script?
After setup, run 'python mcp_client.py' to start the client and query the server.