UNPKG MCP

UNPKG, inside your AI agent.

Live npm and UNPKG data for direct file lookups — https://unpkg.com/<package>@<version>/<file> — so agents resolve real versions and files instead of guessing from memory, audit projects for conversion, and validate import maps before they land.

POST https://mcp.unpkg.com/mcp

Connect

Pick your client. The general tools need no account and no login.


Anonymous vs Shield login

Two tiers, same server. Anonymous is the default and never requires an account. Shield login is optional and only adds your own account's data.

Anonymous — no account

  • All 9 general tools: resolution, file discovery, search, audits, import maps, estimates
  • Package-safety checks for packages you name: malware verdicts and CVEs with patched versions
  • Works in any MCP client that supports remote (HTTP) servers
  • Best for: evaluating a conversion, one-off pages, CI checks

Shield login — approved account

  • Everything anonymous has, plus the 5 shield_* tools
  • Your domains' packages annotated with verdicts and CVEs, ranked by your traffic
  • Scoped to your organization only, via OAuth at shield.unpkg.com
  • Best for: Shield customers who want edge decisions and compromise state in-agent

Shield login

Login is OAuth, run by your MCP client — there is no token to copy and paste. Your account must be email-verified and approved from the Shield beta waitlist.

  1. Connect this server as https://mcp.unpkg.com/mcp (see Connect above). Logins cannot complete against a localhost server, because tokens are issued for the production address.
  2. Run your client's login action:

  1. Your browser opens at shield.unpkg.com. Sign in and review the consent screen — client name, scopes in plain language, redirect host — then Approve.
  2. Ask the agent to run shield_whoami to confirm. To disconnect later, use the logout for this server shown above; revoking there ends the grant.

Discovery for client software: protected-resource metadata · server card · health

Example prompts

Paste these into your agent once connected. Start with your project; add Shield login only when you want your own domains in the picture.

Start with your project Anonymous

“Check my current project and audit what makes sense to convert to UNPKG.”

Classifies every runtime dependency, separates what already loads from UNPKG from candidates, and refuses framework-managed packages.

“Convert this page to load its imports from UNPKG and prove it runs.”

Generates and validates the import map, then verifies execution — not just HTTP 200s.

“Find me a small date-picker package that actually works as a browser import.”

Search results annotated with browser readiness, with CJS-only results rejected openly.

“If I move these packages to UNPKG, roughly what bandwidth do I offload at my traffic level?”

A range with stated assumptions. It will not invent a latency or dollar figure.

Tools

ToolAccessPurpose
resolve_packageAnonymousResolve exact, tag, or range specs to a real version with browser entry points
search_packagesAnonymousSearch npm for a need, annotated with browser readiness
list_filesAnonymousReal file listing for a package version — never guess paths
build_file_urlAnonymousCanonical UNPKG file URL with a deliberate version policy
audit_dependenciesAnonymousClassify a project's dependencies, separating what already loads from UNPKG from what could convert
verify_urlAnonymousConfirm a UNPKG URL resolves before it lands in a project
generate_importmapAnonymousReady-to-paste import map from bare specifiers, subpaths resolved
check_importmapAnonymousValidate a whole import map: resolution, peers, version skew, CJS entries
estimate_migration_impactAnonymousRange-based bandwidth estimate with explicit assumptions — never a single savings figure
shield_whoamiShield loginYour Shield account, organization, and entitlements
shield_simulate_requestShield loginPreview Shield's pin/block decision for one package@version under your rules
shield_check_packagesAnonymousMalware verdicts and CVEs for exact package versions you name (login raises the per-call cap)
shield_domain_packagesShield loginPackages observed on your verified domains, optionally annotated with malware verdicts and CVEs
shield_watchlist_statusShield loginYour monitored packages, blocklist, and pin policies

Plus three guided prompts (audit_project_for_unpkg, convert_this_page, find_browser_package) and the conversion playbook resource.