PyPI Query
A Model Context Protocol (MCP) server for Python package intelligence, providing structured queries for PyPI packages and GitHub repositories. Features include dependency analysis, version tracking, and package metadata retrieval for LLM interactions
What is PyPI Query?
PyPI Query is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server for python package intelligence, providing structured queries for pypi packages and github repositories. features include dependency analysis, version tracking, and...
A Model Context Protocol (MCP) server for Python package intelligence, providing structured queries for PyPI packages and GitHub repositories. Features include dependency analysis, version tracking, and package metadata retrieval for LLM interactions
This server falls under the Developer Tools and Search & Data Extraction categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A Model Context Protocol (MCP) server for Python package int
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx pypi-queryConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use PyPI Query
PyPI Query MCP Server gives AI assistants structured, queryable access to Python package intelligence from PyPI and GitHub, exposing tools for package metadata retrieval, dependency resolution, Python version compatibility checking, download statistics, and security auditing. It connects directly to the PyPI JSON API and supports private repositories through configurable index URLs and credentials. Python developers and AI coding agents use it to make informed decisions about package selection, plan dependency upgrades, detect conflicts, and audit security risks without leaving their AI chat interface.
Prerequisites
- Python 3.10+ with pip or uvx installed
- Internet access to the PyPI API (https://pypi.org/pypi) or a configured private PyPI index
- Optional: private repository credentials (PYPI_PRIVATE_PYPI_URL, PYPI_PRIVATE_PYPI_USERNAME, PYPI_PRIVATE_PYPI_PASSWORD) if using a private index
- An MCP-compatible client such as Claude Desktop or Claude Code CLI
Install via uvx (recommended)
The quickest way to run PyPI Query MCP Server is via uvx, which handles Python environment isolation automatically.
uvx pypi-query-mcp-serverAlternative: install via pip
Install the package into your Python environment and run the server module directly.
pip install pypi-query-mcp-server
python -m pypi_query_mcp.serverAdd via Claude Code CLI
If using Claude Code CLI, register the server at project or user scope with a single command.
# Project scope:
claude mcp add pypi uvx pypi-query-mcp-server -s local
# User scope (available across all projects):
claude mcp add pypi uvx pypi-query-mcp-server -s userAdd the server to your MCP client configuration
Register PyPI Query in your claude_desktop_config.json with any desired environment variable overrides for cache TTL, request timeout, or private index settings.
{
"mcpServers": {
"pypi-query": {
"command": "uvx",
"args": ["pypi-query-mcp-server"],
"env": {
"PYPI_INDEX_URL": "https://pypi.org/pypi",
"PYPI_CACHE_TTL": "3600",
"PYPI_DEPENDENCY_MAX_DEPTH": "5",
"PYPI_ENABLE_SECURITY_ANALYSIS": "true"
}
}
}
}Restart your MCP client and test package queries
Restart your client and verify the PyPI Query tools appear. Run a test query to fetch metadata for a well-known package to confirm connectivity.
PyPI Query Examples
Client configuration
Example claude_desktop_config.json entry for PyPI Query MCP Server using uvx with security analysis enabled.
{
"mcpServers": {
"pypi-query": {
"command": "uvx",
"args": ["pypi-query-mcp-server"],
"env": {
"PYPI_INDEX_URL": "https://pypi.org/pypi",
"PYPI_CACHE_TTL": "3600",
"PYPI_REQUEST_TIMEOUT": "30.0",
"PYPI_DEPENDENCY_MAX_DEPTH": "5",
"PYPI_ENABLE_SECURITY_ANALYSIS": "true"
}
}
}
}Prompts to try
Example prompts for Python package intelligence queries through your AI assistant.
- "Get the latest version and metadata for the requests package on PyPI"
- "Resolve all dependencies for fastapi==0.110.0 up to depth 3"
- "Check if numpy 1.24.0 is compatible with Python 3.12"
- "Compare pydantic and marshmallow for data validation use cases"
- "Find trending Python packages in the data engineering category this week"Troubleshooting PyPI Query
Package queries time out or fail with connection errors
Increase PYPI_REQUEST_TIMEOUT from the default 30.0 seconds. If behind a corporate proxy, set the standard HTTP_PROXY and HTTPS_PROXY environment variables. For private indexes, configure PYPI_PRIVATE_PYPI_URL with credentials.
Security analysis results are empty even with PYPI_ENABLE_SECURITY_ANALYSIS=true
Security analysis is disabled by default (set to 'false'). Confirm the environment variable value is the string 'true' in your MCP config. The analysis queries additional data sources and may be slower than standard metadata queries.
Dependency resolution hits a recursion depth limit on deep dependency trees
Reduce PYPI_DEPENDENCY_MAX_DEPTH (default 5) or increase PYPI_DEPENDENCY_MAX_CONCURRENT to speed up parallel resolution. For very large dependency graphs, consider resolving one major dependency at a time.
Frequently Asked Questions about PyPI Query
What is PyPI Query?
PyPI Query is a Model Context Protocol (MCP) server that model context protocol (mcp) server for python package intelligence, providing structured queries for pypi packages and github repositories. features include dependency analysis, version tracking, and package metadata retrieval for llm interactions It connects AI assistants to external tools and data sources through a standardized interface.
How do I install PyPI Query?
Follow the installation instructions on the PyPI Query GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with PyPI Query?
PyPI Query works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is PyPI Query free to use?
Yes, PyPI Query is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
PyPI Query Alternatives — Similar Developer Tools Servers
Looking for alternatives to PyPI Query? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up PyPI Query in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use PyPI Query?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.