Labsco
MCP SERVER

PyPI Query MCP Server

by loonghao

Check whether a PyPI package accepts the Python version you are on, resolve its full transitive dependency tree, and download that tree to a directory for offline installation.

Package Registries & Dependency Supply ChainVerified
Summary
The dependency question gets answered before the install, not by the install failing.

check_package_python_compatibility and resolve_dependencies answer the two things a lockfile only tells you after the fact: whether the package accepts your interpreter, and what the tree actually pulls in at a given depth with extras on or off. download_package then writes that resolved set to a directory with checksums verified, which is the piece that makes an air-gapped install possible. Nothing here installs into an environment or edits a requirements file — the server reads the index and writes files to a path you name.

What it is

A query layer over PyPI covering package metadata, Python-version compatibility, recursive dependency resolution, bulk download and download statistics.

What you get
  • Package metadata, the full version list with release details and distribution formats, and dependencies for a named version or the latest
  • A compatibility verdict for a package against a target Python version, and the reverse — which Python versions a package accepts, with recommendations
  • Recursive dependency resolution across the whole tree, with switches for target Python version, extras, dev dependencies and maximum depth
  • Download of a package and its resolved dependencies into a local directory, wheel-preferred, with checksum verification
  • Download counts for a day, week or month, a 180-day trend series with or without mirrors, and the current most-downloaded list
Requirements

Reachable package index. Four environment variables are read — PYPI_INDEX_URL and PYPI_INDEX_URLS to point at an index other than the default, PYPI_CACHE_TTL and PYPI_LOG_LEVEL — and no account or token is configured for any of them.

Setup effort

One command — uvx pypi-query-mcp-server