MCP ExplorerExplorer

Python Pip Mcp

@lukeageon 9 months ago
9 MIT
FreeCommunity
AI Systems
"使用Python和Pip实现的MCP Server/Client最小示例。该示例在VSCode和Windows中进行了测试,服务器和客户端均可调试。"

Overview

What is Python Pip Mcp

python-pip-mcp is a minimal example implementation of a Model Context Protocol (MCP) client and server written in Python. It is designed to be easily debuggable in Visual Studio Code on Windows.

Use cases

Use cases for python-pip-mcp include developing and testing MCP-based applications, learning about the Model Context Protocol, and integrating with Anthropic’s API for various AI applications.

How to use

To use python-pip-mcp, first create a virtual environment and activate it. Then, install the required packages using pip. Set up your environment variables by creating a .env file with your Anthropic API key. Finally, run the mcp_client.py script to start querying.

Key features

Key features include a simple implementation of an MCP client and server, compatibility with Visual Studio Code for debugging, and ease of setup with a virtual environment.

Where to use

undefined

Content

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

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers