packagist-mcp
Provides read-only tools for the Packagist registry: package search and profiles, release histories, dependency and platform requirements, security advisories, download statistics, package listings, and auditing composer.json constraints against Packagist metadata.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@packagist-mcp Show symfony/console's latest version, its dependencies, and any security advisories"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
packagist-mcp
A Model Context Protocol server for Packagist, the main registry for PHP and Composer packages. It needs no API key and is read-only.
The tools are shaped around common dependency questions rather than one tool per endpoint. get_package merges three endpoints (package metadata, download counts, security advisories) into one trimmed profile instead of the 200 KB raw package document. audit_requirements takes a whole composer.json and reports, per package, the latest stable release, the newest release your constraint allows, whether an update is blocked by a major version, abandoned status with the replacement, and known advisories that affect the version you would actually get. Packagist's minified version metadata is expanded for you, and Composer constraint syntax (^, ~, wildcards, ranges, ||) is evaluated locally.
Setup
Requires Python 3.12+ and uv.
git clone https://github.com/Ankur1911/packagist-mcp && cd packagist-mcp
uv sync
uv run packagist-mcp # stdio transportAdd it to any MCP client that launches stdio servers:
{
"mcpServers": {
"packagist": {
"command": "uv",
"args": ["run", "--directory", "/path/to/packagist-mcp", "packagist-mcp"]
}
}
}For HTTP instead of stdio: MCP_TRANSPORT=streamable-http MCP_HOST=127.0.0.1 MCP_PORT=8000 uv run packagist-mcp.
Related MCP server: Dependency Health MCP
Tools
All tools are read-only.
Tool | What it returns |
| Keyword search with optional |
| One-call profile: latest stable version with date and age, newer pre-release if any, abandoned status and replacement, licence, keywords, repository and support links, PHP and extension requirements, runtime dependencies, download totals, version counts, and security advisories (total, those affecting the latest stable release, most recent). |
| Release history, newest first: version, date, PHP constraint, and the IDs of advisories that affect that exact version. Pre-releases hidden unless requested. |
| Requirements of one version (latest stable by default): PHP and extensions, runtime packages, conflicts, replaces, provides; |
| Advisories for 1 to 100 packages in one call. Write |
| Audit a whole |
| Total, monthly and daily counts plus a series (monthly or daily, all versions or one version). |
| Package names for a vendor ( |
Configuration
All optional environment variables:
Variable | Default | Meaning |
|
| Packagist API root (for a mirror) |
|
| Composer metadata host |
|
| Request timeout in seconds |
|
| Retries on HTTP 429, 502, 503, 504 and timeouts |
|
| Maximum simultaneous requests |
|
| Seconds to cache identical requests in memory ( |
|
| Responses longer than this are cut with a notice |
|
|
|
Limits
Public packages on packagist.org only. Private repositories and Private Packagist need credentials, which this server does not handle.
audit_requirementsworks from constraints, notcomposer.lock, so the version your project has installed may differ from the "newest allowed" version reported. Constraints that use branches, aliases or stability flags (dev-main,1.x-dev,^1.0 as 2.0) are not analysed; only the latest-release facts are shown. It checks at most 60 packages per call and considers stable releases only.Constraint matching covers the common Composer syntax. Unusual constraints may be reported as not analysed rather than guessed.
Advisory data comes from Packagist's database (GitHub Security Advisories and FriendsOfPHP). No advisories found does not mean a package is safe. Advisory ranges are shortened in output when very long.
Packagist is a free public service. The server identifies itself with a User-Agent, limits concurrency and caches briefly, but it does not queue requests. Download counts are updated by Packagist on its own schedule.
Response size is capped (see
PACKAGIST_MAX_CHARS).
Development
uv sync
uv run pytestTests mock all HTTP traffic with respx; no network access is needed.
Licence
MIT. Author: Ankur Kapuriya. Not affiliated with or endorsed by Packagist or Private Packagist. Check Packagist's terms of use before heavy automated use.
Available Tools
8 toolsaudit_requirementsARead-onlyIdempotent
Audit a project's dependencies in one call. Pass the text of a composer.json (or a mapping of package to constraint). For each package it reports the latest stable version, the newest version your constraint allows, whether an update is available or blocked by a major-version constraint, whether the package is abandoned (and its replacement), and known security advisories that affect the newest allowed version. Problem packages are listed first. Platform requirements (php, ext-*) are listed separately. Constraints with branches or aliases (dev-main, 'x as y') are not analysed. It reads constraints, not composer.lock, so installed versions may differ. Capped at 60 packages.
Inputs: include_dev, requirements, composer_json.
download_statsARead-onlyIdempotent
Download counts for a package: all-time, monthly and daily totals plus a time series. Series is for all versions, or one version if given, with daily or monthly points (most recent N). Useful for adoption trends and for how fast a new release is rolling out.
Inputs: name (required), period, points, version.
get_dependenciesARead-onlyIdempotent
Requirements of one package version: PHP version and extensions (platform), runtime packages (require), conflicts, replaces and provides; require-dev and suggestions with extended=true. Defaults to the latest stable release; pass a version such as '2.9.1' for another. Use it to check PHP compatibility or what installing a package pulls in.
Inputs: name (required), version, extended.
get_packageARead-onlyIdempotent
One-call profile of a Composer package: description, latest stable version with release date and age in days, any newer pre-release, abandoned status (with replacement), licence, keywords, repository and support links, PHP/extension requirements, runtime dependencies, download totals (total/monthly/daily), version counts and security advisories (total, those affecting the latest stable release, and the most recent). Combines three Packagist endpoints and avoids the very large raw package document. Use list_versions for release history.
Inputs: name (required).
list_packagesARead-onlyIdempotent
List package names by vendor ('symfony', 'laravel') or by Composer package type ('phpstan-extension', 'composer-plugin'), with repository URL and abandoned flag. Use it to survey a vendor's packages; for keyword discovery use search_packages.
Inputs: type, limit, vendor.
list_versionsARead-onlyIdempotent
Release history of a package, newest first: version, release date, PHP constraint, and the IDs of any security advisories that affect that exact version (or an abandoned marker). Pre-releases are hidden unless requested. Use it to choose a safe version or to see how often a package ships.
Inputs: name (required), limit, include_prereleases.
search_packagesARead-onlyIdempotent
Search Packagist for PHP/Composer packages by keyword. Returns name, short description, repository URL, total downloads, favourites and an abandoned flag (true, or the replacement package name), sorted by relevance. Optional filters: type (e.g. 'library', 'symfony-bundle', 'composer-plugin', 'wordpress-plugin') and tags. Use get_package for the full profile of one result.
Inputs: query (required), page, tags, type, +1 more.
security_advisoriesARead-onlyIdempotent
Known security advisories for one or many packages in one call (title, CVE, severity, affected version range, report date, link). Append '@version' to a package, e.g. 'monolog/monolog@2.9.0', and the advisories are split into those that affect that version and a count of others, using Composer's range syntax. Data comes from Packagist's advisory database (GitHub Security Advisories and FriendsOfPHP). An empty result means no known advisories, not proof of safety.
Inputs: packages (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a clearly distinct aspect of the Packagist domain: search, package profile, versions, dependencies, advisories, project audit, download trends, and vendor/type listing. Although get_package summarizes some data also available from security_advisories or download_stats, its role as a one-call profile is clear and the descriptions explicitly direct agents to the specialized tools for detail.
The set is consistently snake_case and mostly follows a verb_noun pattern such as search_packages, get_package, list_versions, get_dependencies, audit_requirements, and list_packages. The two noun-oriented names security_advisories and download_stats are minor deviations but remain readable and predictable.
Eight tools is well-scoped for a read-only package registry server. Each tool covers a meaningful workflow area without excessive fragmentation.
The surface covers discovery, package details, release history, dependency inspection, vulnerability lookup, project auditing, download statistics, and vendor/type listing. For a read-only Packagist metadata server, this is a complete lifecycle of information needs with no obvious dead ends.
Maintenance
Related MCP Connectors
Free CVE lookup, dependency vulnerability checks, and CVE updates. No signup or API key.
Scan packages and lockfiles (npm, PyPI, Go, Maven, Cargo, NuGet) for vulnerabilities and malware.
Verify PyPI and npm packages, symbols, and version diffs against real artifacts. Free, no account.
Free CVE lookups, package checks and patch priorities from public sources. No account or API key.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables users to look up package versions, scan for vulnerabilities, and analyze dependencies across multiple registries (npm, Maven, PyPI, etc.) using exact version recommendations for security.5MIT
- AlicenseNot gradedqualityDmaintenanceEnables checking whether software packages are deprecated, archived, stale, active, or unknown with supporting evidence, auditing dependency manifests, and looking up runtime support and end-of-life dates.MIT
- AlicenseAqualityCmaintenanceEnables keyless, read-only package intelligence across multiple ecosystems, including metadata lookup, dependency graphs, vulnerability advisories, lockfile audits, license checks, scorecards, and package comparisons. Supports stdio and local stateless Streamable HTTP transports.10MIT
- AlicenseAqualityBmaintenanceEnables read-only search and exploration of Artifact Hub's cloud-native packages, including package details, security reports, changelogs, chart values, and repositories, without requiring an API key.6MIT