Skip to main content
Glama
OSS License Auditor

OSS License Auditor

by vinkius-labs

πŸ” OSS License Auditor

MCP server that audits open-source package licenses against corporate policy β€” detects viral (GPL, AGPL, SSPL) and unknown licenses before they enter the codebase. Built with Vurb.ts.

TypeScript Vurb.ts License

Why This Exists

A single GPL or AGPL dependency can legally contaminate your entire codebase, forcing you to open-source your proprietary code. Most developers don't check licenses before running npm install.

This MCP server gives any LLM client a deterministic license firewall β€” call license.audit before adding any dependency. The classification is SPDX-based lookup (no regex, no hallucination), resolved live from the npm registry.

Related MCP server: repo-guardian

Architecture

Agent reads package.json
        ↓
Sends dependencies to MCP
        ↓
MCP fetches license metadata from npm registry (parallel, 8s timeout)
        ↓
Normalises SPDX β†’ classifies into 5 categories β†’ applies corporate policy
        ↓
Returns audit report: BLOCKED ❌ / WARNING ⚠️ / ALLOWED βœ…
        ↓
Agent presents verdict with Mermaid distribution chart

Deterministic core β€” live data: The classification logic is a pure SPDX lookup table (no AI, no drift). The only network call is to the npm registry for license metadata.

License Categories

Category

Examples

Verdict

Permissive

MIT, ISC, Apache-2.0, BSD

βœ… Allowed

Public Domain

Unlicense, CC0-1.0, WTFPL

βœ… Allowed

Weak Copyleft

LGPL, MPL-2.0, EPL

⚠️ Warning β€” legal review needed

Strong Copyleft

GPL-2.0, GPL-3.0

❌ Blocked β€” viral, incompatible with proprietary code

Network Copyleft

AGPL-3.0, SSPL, EUPL

❌ Blocked β€” strongest viral, applies over network use

Unknown

Unrecognised SPDX

⚠️ Warning β€” manual review required

Tools

Tool

Verb

Description

license.audit

query

Audit all deps from a package.json against corporate policy

license.check

query

Check a single package before npm install

license.policy

query

List the full corporate license policy (cached)

license.tree

query

Direct + first-level transitive deps with license annotations

Usage Examples

❌ Example 1 β€” Detecting a Viral Dependency

User: "Audit the dependencies of my project before we ship."

The LLM reads package.json and calls license.audit:

{
  "dependencies": "{\"express\":\"^4.18.0\",\"lodash\":\"^4.17.21\",\"@ffmpeg-installer/ffmpeg\":\"^1.1.0\"}"
}

Result:

total_packages: 3
allowed_count:  2
blocked_count:  1

@ffmpeg-installer/ffmpeg β€” GPL-2.0-only
  ❌ BLOCKED: strong copyleft β€” requires derivative works to be
  distributed under the same license. Incompatible with proprietary software.

The Presenter renders a Mermaid pie chart and urgently suggests removing or replacing the blocked package.


βœ… Example 2 β€” Checking Before Installing

User: "Is it safe to add sequelize to our project?"

The LLM calls license.check:

{ "package": "sequelize" }

Result:

sequelize@6.x β€” MIT
βœ… ALLOWED: permissive β€” safe for commercial use.

⚠️ Example 3 β€” Scanning a Mixed Project

User: "Audit all deps including devDependencies."

{
  "dependencies": "{\"react\":\"^18.0.0\",\"axios\":\"^1.6.0\"}",
  "dev_dependencies": "{\"vitest\":\"^1.0.0\",\"webpack\":\"^5.0.0\"}"
}

Result:

total_packages: 4
allowed_count:  4  βœ… No issues β€” all permissive

πŸ” Example 4 β€” Tracing a Transitive License

User: "Show me the full license tree including transitive deps."

The LLM calls license.tree β€” resolves each direct dep's own dependencies (one level deep) and annotates all with their license verdict.

Deploy

Vinkius Cloud β€” One Command ⚑

The fastest path to production. vurb deploy publishes your server to Vinkius Cloud's global edge β€” zero infrastructure, built-in DLP, kill switch, audit logging, and a managed MCP token:

npm install
vurb deploy

No Dockerfile, no CI/CD pipeline, no servers to manage. You get a connection token that works with any MCP client β€” Cursor, Claude Desktop, Claude Code, Windsurf, Cline, VS Code + Copilot.

# Deploy with a custom name
vurb deploy --name oss-license-auditor

πŸ’‘ Tip: Install the Vinkius extension to manage your deployed server directly from VS Code, Cursor, or Windsurf β€” live connections, requests, P95 latency, token management, tool toggling, logs, and deployment history.

Connect Your MCP Client

After deploying, share the managed token with any MCP-compatible client:

Claude Desktop / Cursor / Windsurf

{
  "mcpServers": {
    "oss-license-auditor": {
      "url": "https://edge.vinkius.com/your-token/mcp"
    }
  }
}

Self-Hosted Alternatives

The same ToolRegistry runs anywhere β€” no code changes required:

Platform

Adapter

Vercel Edge Functions

@vurb/vercel

Cloudflare Workers

@vurb/cloudflare

Any Node.js server

Stdio / HTTP+SSE transport

Full deployment guides: Production Server Β· Vercel Adapter Β· Cloudflare Adapter

Running Locally via stdio

If you prefer to run the server locally and connect via stdio β€” the native MCP transport used by Claude Desktop, Cursor, and Windsurf:

# 1. Install dependencies
npm install

# 2. Build
npm run build

# 3. Test it directly (optional)
node dist/server.js

Then add it to your MCP client config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "oss-license-auditor": {
      "command": "node",
      "args": ["/absolute/path/to/oss-license-auditor/dist/server.js"]
    }
  }
}

Or run without cloning via npx (after the package is published):

{
  "mcpServers": {
    "oss-license-auditor": {
      "command": "npx",
      "args": ["-y", "@vinkius/oss-license-auditor"]
    }
  }
}

Note: The classification logic is fully offline β€” only the npm registry fetch requires network. The SPDX lookup table and policy engine have no external dependencies.

Development

# Install dependencies
npm install

# Development server with HMR
vurb dev

# Type-check
npm run typecheck

# Run tests
npm test

Project Structure

src/
β”œβ”€β”€ data/              ← License policy and SPDX classification
β”‚   β”œβ”€β”€ types.ts
β”‚   └── license-policy.ts   47 SPDX identifiers + alias normalization + OR/AND expressions
β”œβ”€β”€ engine/            ← npm registry resolution and audit logic
β”‚   β”œβ”€β”€ npm-registry.ts     Batch fetch, 10 concurrent, 8s timeout, graceful fallback
β”‚   └── audit-engine.ts     fetch β†’ classify β†’ apply policy β†’ build report
β”œβ”€β”€ models/            M β€” defineModel()
β”‚   └── index.ts
β”œβ”€β”€ views/             V β€” definePresenter()
β”‚   └── index.ts
β”œβ”€β”€ agents/            A β€” Tool definitions
β”‚   └── license/
β”‚       β”œβ”€β”€ audit.tool.ts
β”‚       β”œβ”€β”€ check.tool.ts
β”‚       β”œβ”€β”€ policy.tool.ts
β”‚       └── tree.tool.ts
β”œβ”€β”€ vurb.ts            Shared Vurb instance
└── server.ts          Bootstrap

Built with Vurb.ts

Feature

Usage

defineModel()

Domain models with guidance labels

definePresenter()

Dynamic rules based on blocked count, Mermaid charts, suggestActions

f.query()

All tools are read-only β€” no state mutation

.concurrency()

5 active / 20 queued for audit, 3/10 for tree

.egress()

2MB guard on audit, 4MB on tree

.stale()

Real-time β€” npm registry data must not be cached

.cached()

Static policy rules for license.policy

f.error()

Self-healing errors with recovery suggestions

.instructions()

AI-first guidance: "call BEFORE npm install"

agentLimit

Results truncated at 50 with pagination guidance

Explicit tool imports

V8-safe bootstrap β€” no filesystem access at runtime

Get started with Vurb.ts β†’ Β· Documentation β†’

License

Apache 2.0 β€” See LICENSE for details.

Available Tools

4 tools
license_auditA
Read-only

[INSTRUCTIONS] Call this with the dependencies from a package.json to check for license compliance. Pass the dependencies object (and optionally devDependencies) as JSON strings. The tool resolves each package from the npm registry, classifies the license, and applies corporate policy. BLOCKED packages MUST be removed or replaced. WARNING packages need legal review. Use license.check for a single package before adding a new dependency.

Audit all dependencies from a package.json against the corporate license policy β€” detects viral (GPL, AGPL) and unknown licenses [READ-ONLY]

Inputs: dependencies (required), dev_dependencies, include_transitive.

license_checkA
Read-only

[INSTRUCTIONS] Call this to quickly verify if a specific package is compliant with the corporate license policy. Provide the package name and optionally the version. Returns the license, category, and verdict (allowed/warning/blocked). Use this proactively before running npm install on a new package.

Check a single npm package license against corporate policy β€” use BEFORE adding a new dependency [READ-ONLY]

Inputs: name (required), version.

license_policyA
Read-only

[INSTRUCTIONS] Call this to understand the current license compliance rules. Returns all known SPDX licenses grouped by verdict. Use this as a reference when reviewing audit results or choosing alternative packages.

List the corporate license policy β€” shows which SPDX licenses are allowed, warned, or blocked [READ-ONLY]

Inputs: no named parameters.

license_treeA
Read-only

[INSTRUCTIONS] Call this for a detailed view of direct and their immediate dependencies with licenses. Resolves one level of transitive dependencies β€” useful for tracing which parent pulls in a problematic license. For a faster summary without transitive deps, use license.audit instead.

Show direct + first-level transitive dependencies with license annotations [READ-ONLY]

Inputs: dependencies (required), dev_dependencies.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool maps to a distinct scope: batch audit of a package.json, single-package check, static policy reference, and a one-level transitive dependency tree. The only real overlap is audit vs. license_tree, but the descriptions explicitly steer users (tree = transitive tracing, audit = fast summary), which resolves most confusion.

    Naming Consistency5/5

    All four tools use a uniform snake_case `license_<noun/verb>` pattern (audit, check, policy, tree) with no style deviations. Minor cosmetic issue: descriptions refer to tools as `license.check`/`license.audit` with dots, which doesn't match the actual underscore names, but the naming convention itself is consistent.

    Tool Count5/5

    Four tools is well-scoped for a narrow license-auditing domain, and each one covers a genuinely different need (bulk audit, pre-install check, policy lookup, transitive tracing). No filler or redundant tools.

    Completeness4/5

    The surface covers the core lifecycle: check a candidate package, audit a whole manifest, inspect transitive origins, and reference the policy that drives verdicts. Gaps are minor β€” the policy is read-only with no way to override/configure it, there's no remediation suggestion tool (e.g. finding an allowed alternative) and it's npm-only, but agents can work around these via the existing tools.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables LLM agents to enforce security policies by authorizing tool calls, scanning for prompt injection, checking memory writes, redacting PII, and accessing audit trails through MCP.
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI coding agents to audit Python and npm dependency licenses against your distribution context before shipping, returning CLEAN, REVIEW, or BLOCK verdicts with plain-language reasons and supporting notice generation.
      3
      1
      MIT