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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。