license-guardian

license-guardian

Audits npm dependencies for license compatibility, catching copyleft and source-available traps before shipping.

Category
Visit Server

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.json for 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 a package.json, get a CLEAN / REVIEW / BLOCK verdict per dependency.
  • audit_dependencies — audit an explicit list of name / 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

  1. Parse the dependency list (prod + peer + optional by default; dev optional).
  2. For each name@version, fetch the real license string from registry.npmjs.org for that exact version.
  3. Normalize the (often messy) license string to a canonical SPDX id.
  4. Judge it against your project context using a curated compatibility table.
  5. 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured