license-guardian
Audits npm dependencies for license compatibility, catching copyleft and source-available traps before shipping.
README
license-guardian ⚖️
Audit the license of every npm dependency before you ship — and catch the copyleft / source-available traps an LLM won't.
An AI agent just added a dependency. Is it AGPL? BUSL? unlicensed? Licenses change between versions, and "the source is on GitHub" does not mean "free to ship in a closed product." license-guardian resolves each dependency's real license from the live npm registry and tells you whether it is compatible with how you distribute.
It's part of the guardian set:
- import-guardian — catches hallucinated imports (packages that don't exist) in AI-generated code.
- npm-guardian — audits a chosen package for CVEs and supply-chain malware.
- lockfile-guardian — audits the resolved
package-lock.jsonfor integrity tampering and risky install scripts. - license-guardian (this) — audits the legal compatibility of the licenses you're about to ship.
Why an MCP server (the moat)
A coding agent does not reliably know:
- the exact license a specific version of a package shipped with (packages relicense — MongoDB → SSPL, Redis → BUSL, many tools → AGPL),
- which licenses are source-available but not open source (BUSL, Elastic, SSPL — they look free on GitHub and aren't),
- the compatibility rules (AGPL in a closed SaaS backend, GPL in a proprietary binary, a missing license = all-rights-reserved).
license-guardian pairs a curated SPDX knowledge base with the live license string from npm for the exact version, and judges it against your distribution context. That's data + rules the agent can't fabricate.
What it catches
| 🔴 Network copyleft | AGPL / SSPL — serving it over your API can force you to open-source your whole backend. The #1 SaaS trap. |
| 🟠 Source-available | BUSL / Elastic — looks open on GitHub, but production/commercial use is restricted. |
| 🟠 Strong copyleft | GPL in a closed-source product = a license violation when you distribute. |
| 🔵 Weak copyleft | LGPL / MPL — usable, but with linking / source-for-modifications obligations. |
| 🔴 No license | a dependency with no license is all-rights-reserved — you have no legal right to ship it. |
Use as an MCP server (free)
{
"mcpServers": {
"license-guardian": { "command": "npx", "args": ["-y", "license-guardian-mcp"] }
}
}
Tools:
audit_package_json— paste apackage.json, get a CLEAN / REVIEW / BLOCK verdict per dependency.audit_dependencies— audit an explicit list ofname/name@version.explain_license— resolve and explain one package's real license (SPDX id, obligations, copyleft strength, commercial risk).
Each tool takes a context: proprietary (default), saas-backend, permissive, or copyleft-ok.
Use as an HTTP API
POST /audit { "package_json": "{…}", "context": "saas-backend" } # free, 30/h/IP
POST /deps { "names": ["express","mongodb@5.0.0"], "context": "proprietary" }
GET /license?name=next@13.0.0 # explain one
POST /mcp # MCP-over-HTTP
Live: https://license-guardian-psi.vercel.app — try /license?name=express.
Pay-per-call (x402)
The /pro/* routes are gated by x402. Your agent pays $0.02 USDC per call automatically — no sign-up, no API key. Settles on-chain (USDC on Base). The server holds no private key; payTo is a public receiving address only.
POST /pro/audit { "package_json": "…", "context": "…" } # 402 → pay → result, no rate limit
How it works
- Parse the dependency list (prod + peer + optional by default; dev optional).
- For each
name@version, fetch the real license string fromregistry.npmjs.orgfor that exact version. - Normalize the (often messy) license string to a canonical SPDX id.
- Judge it against your project context using a curated compatibility table.
- Return per-dependency verdicts + a roll-up + a license-category breakdown.
Runtime dependencies: only @modelcontextprotocol/sdk (the HTTP/x402 stack is a build-time concern). Fast npx, nothing heavy on install.
License
MIT © 2026. This tool provides automated guidance, not legal advice — for high-stakes compliance, confirm with counsel.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.