cosmicishan
MCP Servercosmicishanpublic

mcp_pypi

一个通过模型上下文协议 (MCP) 提供 PyPI 包信息的 Python 项目。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License

About This Server

一个通过模型上下文协议 (MCP) 提供 PyPI 包信息的 Python 项目。

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 PyPI Insights

A Python project that leverages the Model Context Protocol (MCP) to create a server for fetching and analyzing Python package information from PyPI. This tool enables AI agents to access up-to-date package metadata through a standardized interface.


Overview

MCP PyPI Insights provides a seamless way to retrieve package information from the Python Package Index (PyPI) using the Model Context Protocol. The project consists of:

  • An MCP server that exposes PyPI package information as a tool
  • A client implementation for interacting with the server
  • Integration with LLM providers like Groq

Features

  • PyPI Package Information: Fetch metadata including version, dependencies, and release notes
  • Interactive Chat Interface: Communicate with AI models while providing access to PyPI data
  • Conversation Memory: Maintain context throughout interactions
  • Easy Integration: Works with any MCP-compatible client or agent

Installation

# Clone the repository
git clone https://github.com/cosmicishan/mcp_pypi.git
cd mcp_pypi

# Create and activate a virtual environment using uv
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate.bat or .venv\Scripts\Activate.ps1

# Install dependencies using uv
uv sync

Configuration

Create a .env file with your API keys:

GROQ_API_KEY=your_groq_api_key_here

Update the server.json file with the correct paths for your environment:

{
  "mcpServers": {
    "pypi_server": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/your/project/",
        "run",
        "--python",
        ".venv/bin/python",
        "pypi_tool.py"
      ]
    }
  }
}

Usage

Starting the MCP Server

The PyPI tool server can be started directly:

python pypi_tool.py

Using the Client

Run the interactive chat client to communicate with an AI model that has access to PyPI package information:

python client.py

In the chat interface:

  • Type your questions about Python packages
  • Type clear to reset conversation history
  • Type exit or quit to end the session

Example Interactions

🧠 Model Context Protocol Inspector

The MCP Inspector is a developer tool for testing and debugging MCP servers like our PyPI package information server.

!MCP Inspector Screenshot


💬 Interactive Chat via client.py

You can start the client to initiate a chat-based session with the AI model. The model can now fetch real-time PyPI data and respond to your queries intelligently.

Below is an example screenshot of a live session using client.py, where the model answers questions about Python packages using up-to-date metadata:

!Client Interaction Screenshot


Quick Start

1

Clone the repository

git clone https://github.com/cosmicishan/mcp_pypi
2

Install dependencies

cd mcp_pypi
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownercosmicishan
Repomcp_pypi
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation