UNPKG MCP server
Commit Nov 9, 2026Provides AI agents with live npm and UNPKG data for package resolution, file lookups, dependency auditing, and security vulnerability checks.
Also known as unpkg/unpkg-mcp, unpkg-mcp
- Stars
- 1
- Tools
- 14
- Downloads, 30 days
- —
- Latest version
- 1.0.0
- Last commit
- Nov 9, 2026
- License
- MIT
What is UNPKG MCP?
UNPKG provides AI agents with live npm and UNPKG data for package resolution, file lookups, dependency auditing, and security vulnerability checks. It exposes 14 tools, such as resolve_package, search_packages, list_files.
Summary generated from the project's README
About UNPKG MCP server
Providing AI agents with accurate npm and UNPKG data is what this remote MCP server enables. It prevents common AI errors such as hallucinating non-existent package versions, incorrect file paths, or misidentifying Node entry points as browser modules. Developers can use it to resolve exact versions, list real files within a package, and validate import maps for web projects.
Users connect to the server via a remote URL, though it can also be run locally for development. The server includes specialized tools for auditing dependencies and estimating the bandwidth impact of migrating to UNPKG. Security is integrated through Shield, allowing for malware and CVE checks. While basic package safety checks are anonymous and limited to 25 calls per request, users can sign in via OAuth to access expanded limits and monitor packages across their own verified domains.
What you can do with it
- 1Verify package safetyCheck a specific package version for malware and known vulnerabilities to determine the necessary upgrade path.
- 2Audit project migrationsAnalyze a package.json file to see which dependencies are suitable for conversion to UNPKG.
- 3Estimate migration costsCalculate the potential bandwidth savings and cost reductions when moving to a UNPKG-based architecture.
Written from the project's README. Every use case is checked against a quote from it.
How to install UNPKG MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall UNPKG MCP in Claude Code
$ claude mcp add --transport http unpkg-mcp https://mcp.unpkg.com/mcpInstall UNPKG MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"unpkg-mcp": {
"url": "https://mcp.unpkg.com/mcp"
}
}
}Install UNPKG MCP in VS Code
.vscode/mcp.json
{
"servers": {
"unpkg-mcp": {
"type": "http",
"url": "https://mcp.unpkg.com/mcp"
}
}
}Install UNPKG MCP in VS Code CLI
$ code --add-mcp '{"name":"unpkg-mcp","type":"http","url":"https://mcp.unpkg.com/mcp"}'Install UNPKG MCP in Codex
$ codex mcp add unpkg-mcp --url https://mcp.unpkg.com/mcpInstall UNPKG MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.unpkg-mcp] url = "https://mcp.unpkg.com/mcp"
Install UNPKG MCP in Gemini CLI
$ gemini mcp add -s user --transport http unpkg-mcp https://mcp.unpkg.com/mcpInstall UNPKG MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"unpkg-mcp": {
"url": "https://mcp.unpkg.com/mcp",
"type": "http"
}
}
}UNPKG MCP tools 14
Detected from the READMEresolve_packagesearch_packageslist_filesbuild_file_urlaudit_dependenciesverify_urlgenerate_importmapcheck_importmapestimate_migration_impactshield_check_packagesshield_whoamishield_domain_packages
Show all 14 toolsShow fewer tools
shield_simulate_requestshield_watchlist_status
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachableunpkg/unpkg-mcp is public and reachablegithub.com/unpkg/unpkg-mcp ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-09github.com/unpkg/unpkg-mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model14 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeinitialize answered with protocol 2025-06-18 in 76 msPass
README
View on GitHubunpkg-mcp
A remote MCP server for UNPKG. It gives AI
agents live npm and UNPKG data for direct UNPKG file lookups:
https://unpkg.com/<package>@<version>/<file>.
Agents often recall npm details incorrectly — versions that don't exist, file paths that were never published, Node entry points offered as browser modules. This server resolves versions, lists real package files, audits projects for UNPKG conversion, validates import maps, and checks packages for malware and CVEs, all from live data.
Deployed at https://mcp.unpkg.com (landing page at /, MCP endpoint at
/mcp).
Tools
| Tool | Purpose |
|---|---|
resolve_package |
Resolve an exact version, tag, or range to a real version and its browser entry points |
search_packages |
Search npm, with results annotated for browser readiness |
list_files |
List the real files in a package version, via the ?meta API |
build_file_url |
Build a canonical file URL with a version policy (preserve, exact, patch, or range) |
audit_dependencies |
Classify a package.json dependency map (convert_now / convert_carefully / keep_bundled / needs_review / not_found), with suggested URLs, an import map, and framework detection; packages already loading from UNPKG are reported separately from conversion candidates |
verify_url |
Check that a UNPKG URL resolves |
generate_importmap |
Generate an import map from bare specifiers |
check_importmap |
Validate an import map as a whole: resolution, file existence, version consistency, and framework-managed packages |
estimate_migration_impact |
Estimate bandwidth offload for a migration as a range with stated assumptions |
shield_check_packages |
Malware verdicts and CVEs for exact package versions. Anonymous (25 per call; Shield login raises the limit to 200) |
shield_whoami |
(Shield login) Account, organization, and entitlements for the connected user |
shield_domain_packages |
(Shield login) Packages observed on your verified domains, optionally annotated with malware verdicts and CVEs ranked by traffic |
shield_simulate_request |
(Shield login) Preview Shield's pin/block decision for a package version |
shield_watchlist_status |
(Shield login) Your monitored packages, blocklist, and pin policies |
Package safety checks
Every package the server resolves can also be checked against Shield's security data, in two ways:
- Named packages.
shield_check_packagestakes exact package@version pairs and returns, for each one, a malware verdict with its review state (confirmed or provisional), the CVEs that affect that version, and the first patched version to upgrade to. Verdicts and CVE matches are computed for the exact version asked about — a clean result never comes from checking a different version. - Inside audits.
audit_dependenciesattaches the same verdict and CVE data to every version it resolves, so a flagged package is visible in the audit result next to its conversion recommendation.
No account is needed for either: named-package checks are anonymous (25 per call), and audit enrichment works the same signed out. A provisional verdict is reported as provisional; it is not presented as confirmed malicious.
With a Shield login, the checks extend to your own estate:
shield_domain_packages (with threats enabled) returns the packages
observed on your verified domains annotated with verdicts and CVEs,
ranked by each domain's traffic, so the packages that matter most
surface first.
Example prompts:
- "Is
lodash@4.17.20safe to load? Check it for malware and CVEs, and tell me what to upgrade to." - "Check the packages in this audit for known compromises or CVEs before we convert anything."
- (Shield login) "Which packages on my domains have CVEs or malware verdicts, worst first?"
Shield login
The general tools are anonymous. With a Shield account approved from the
beta waitlist, your MCP client can also sign in via OAuth and the
shield_* account tools unlock, scoped to your own organization.
Package-safety checks are not login-gated: shield_check_packages works
anonymously for packages you name, and audit_dependencies includes
verdicts and CVEs either way. Signing in adds your own domains,
watchlist, and edge simulation.
Prompts, resources, and skill
- Prompts:
audit_project_for_unpkg,convert_this_page,find_browser_package. - Resources: the conversion playbook and version-specifier policy
(
unpkg://guidance/…), also served atGET /playbook.md. - Skill:
skill/unpkg/SKILL.mdprovides the same guidance to agents without MCP.
Connect a client
Clients connect by URL. Per-client configuration is in
examples/clients.md and in the picker on the
landing page at https://mcp.unpkg.com/.
Claude Code:
claude mcp add --transport http unpkg https://mcp.unpkg.com/mcp
For agents without MCP, copy skill/unpkg/ into the client's skills
directory. At the project level, you can also paste
examples/AGENTS.snippet.md into your
project's AGENTS.md.
Try it out
With an agent connected, some useful prompts:
- "Resolve
react@^18with the UNPKG MCP — what's the resolved version and browser entry point? Now try a version ofreactthat doesn't exist." - "List the files in
preact@10.26.4/dist, build a patch-policy URL for the module file, and verify it resolves." - "Audit this project for UNPKG conversion."
- "Check this import map with the UNPKG MCP: …" (paste a map)
- "Is
lodash@4.17.20safe to load? Check it for malware and CVEs, and tell me what to upgrade to." - "Based on the audit, estimate the migration impact for a site with 1M page views a month at $0.09/GB."
The server reports what it can verify and declines what it can't: import maps are validated as a system, audits keep framework-managed packages bundled, and estimates come back as ranges with assumptions rather than a single figure.
MCP Registry
server.json in this repo is the listing manifest for the official
MCP Registry, under the namespace io.github.unpkg/unpkg-mcp.
Publishing (maintainers): install the mcp-publisher CLI from the
MCP Registry project, then from this repo:
mcp-publisher login github
mcp-publisher publish
Note: the organization namespace requires an owner-level GitHub
credential — the interactive device flow only grants your personal
namespace. Use a classic PAT with read:org scope (see the MCP
Registry authentication docs), and revoke it afterwards.
Releasing
The server is a remote endpoint, so most channels update themselves: connected clients see new tools as soon as the Worker deploys, Glama re-crawls this repo and the endpoint, skills.sh serves the skill from GitHub, and directory listings (awesome lists, mcp.so) are static entries that only change if the URL or description changes.
For a version release:
- Bump the version everywhere it appears, keeping all of them equal:
package.json,src/version.ts,server.json,plugin/.claude-plugin/plugin.json,plugin/plugin.json,plugin/.codex-plugin/plugin.json, and the plugin entry in.claude-plugin/marketplace.json. (Tests fail if any of these drift.) - Deploy the Worker (
wrangler deploy). - Tag the release on GitHub (
vX.Y.Zwith release notes). - Republish the registry manifest:
mcp-publisher publish. Downstream directories (PulseMCP, Smithery, and others) ingest from the official MCP Registry, so this is the step that updates them. - If the plugin changed, publish the new plugin version in the
Claude developer portal; marketplace users get it via
claude plugin marketplace update.
Claude plugin
This repo is also a Claude Code plugin (and its own plugin marketplace).
The plugin lives in plugin/ and bundles the MCP server above with the
unpkg skill, so one install gives Claude Code both:
claude plugin marketplace add unpkg/unpkg-mcp
claude plugin install unpkg@unpkg
Connecting the plugin is the same anonymous-by-default server at
https://mcp.unpkg.com/mcp; Shield tools still sign in only when used.
Run it locally
pnpm install
pnpm dev # HTTP Worker on http://localhost:8787
- Landing page: http://localhost:8787/
- Health: http://localhost:8787/health
- MCP endpoint: http://localhost:8787/mcp
- Server card: http://localhost:8787/.well-known/mcp.json
For local client setup, use the same configurations as above with
http://localhost:8787/mcp in place of the production URL.
Develop
pnpm test # unit, golden-project, and MCP protocol tests
pnpm typecheck # tsc --noEmit
pnpm build # wrangler deploy --dry-run (production bundle check)
Layout: src/clients/ (npm, UNPKG, and Shield API clients),
src/domain/ (audit, import-map checking, estimation, guidance),
src/server.ts (MCP wiring). Golden projects in
test/fixtures/projects/ pin audit classification behavior.
Environment (wrangler.jsonc vars): UNPKG_ORIGIN, NPM_REGISTRY,
SHIELD_API_ORIGIN, OAUTH_ISSUER, OAUTH_RESOURCE, OAUTH_ENABLED.
Estimating impact
audit_dependencies reports entry-file byte totals.
estimate_migration_impact turns those, plus a traffic figure, into a
bandwidth-offload range (and a dollar range when a $/GB rate is
supplied). It does not forecast latency: where a site already serves
from a capable CDN, latency is usually unchanged, and the practical
gains are bundle size, cacheability, and how quickly patched versions
reach users.
UNPKG MCP questions
How do I add UNPKG MCP to Claude Code?
Run claude mcp add --transport http unpkg-mcp https://mcp.unpkg.com/mcp in your terminal. Add --scope user to make it available in every project.
How do I add UNPKG MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does UNPKG MCP provide?
It exposes 14 tools, including resolve_package, search_packages, list_files, build_file_url, audit_dependencies.
Can I check packages for malware and CVEs without an account?
Yes, package-safety checks are not login-gated. You can use shield_check_packages anonymously for up to 25 calls per request.
What does the audit_dependencies tool do?
It classifies a package.json dependency map, suggests URLs, generates import maps, and detects frameworks while attaching malware and CVE data.
How can I use Shield features for my own domains?
By signing in via OAuth with a Shield account, you can access tools to view packages observed on your verified domains and simulate request decisions.
Does the server estimate latency improvements during migration?
No, it estimates bandwidth offload and cost, but it does not forecast latency changes.