PyPI Query

v1.0.0Developer Toolsstable

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

pypi-querymcpai-integration
Share:
18
Stars
0
Downloads
0
Weekly
0/5

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

Query Python package metadata from PyPI and GitHub. Analyze package dependencies and version history. Track PyPI package information for project planning.
loonghao

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 3, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx pypi-query

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-server
2

Alternative: 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.server
3

Add 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 user
4

Add 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"
      }
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "pypi-query": { "command": "npx", "args": ["-y", "pypi-query"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides