PyPI Query MCP Server is an MCP server that provides tools for querying the Python Package Index, analyzing package dependencies, and verifying Python version compatibility. It connects MCP-compatible development assistants directly to PyPI, secondary mirrors, or private package indexes via HTTP APIs. Python developers, DevOps engineers, and software architects use it to evaluate package quality, trace transitive dependency trees, and plan framework migrations. The server enables users to check compatible Python versions, pull historical download statistics, examine recent release trends, and download entire dependency bundles locally. It also offers dedicated prompt templates that guide language models through security audits, package comparisons, and dependency conflict resolution without manual web scraping.
Category: Developer Tools & Code Intelligence
Tags: dependencies, package-management, pypi, python
uv are installed on your machine. 2. In Claude Desktop, open your configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%/Claude/claude_desktop_config.json on Windows). 3. Add pypi-query to your mcpServers object: json { "mcpServers": { "pypi-query": { "command": "uvx", "args": ["--from", "pypi-query-mcp-server", "pypi-query-mcp"], "env": { "PYPI_INDEX_URL": "https://pypi.org/pypi", "PYPI_CACHE_TTL": "3600" } } } } 4. For Claude Code, run claude mcp add pypi uvx pypi-query-mcp-server -s user in your terminal. 5. Restart your client to start querying PyPI.Part of MCP Servers
PyPI Query MCP Server enables AI clients to inspect PyPI packages, retrieve available versions, inspect requirements, test Python version compatibility, and recursively resolve dependency trees. It also delivers download trends over 180 days, tracks top packages, downloads package wheels locally, and provides prompt templates for migration checklists and package audits.
You can run it directly using uvx with the command uvx pypi-query-mcp-server or install it with pip install pypi-query-mcp-server. For Claude Desktop, Windsurf, Cline, or Cursor, configure the server in your client configuration file using uvx to execute pypi-query-mcp.
The server works with any client supporting the Model Context Protocol, including Claude Code, Claude Desktop, Cursor, Cline, and Windsurf.
Yes. It supports custom indexes and private registries through environment variables, including PYPI_PRIVATE_PYPI_URL, PYPI_PRIVATE_PYPI_USERNAME, and PYPI_PRIVATE_PYPI_PASSWORD, alongside custom mirror URLs like PYPI_INDEX_URLS.
Yes, PyPI Query MCP Server is open source and hosted on GitHub under an open source repository at https://github.com/loonghao/pypi-query-mcp-server.