SPDX license lookup and search via @mukundakatta/license-mcp — validate OSI-approved status, get reference URLs
How to look up and search SPDX open source licenses from an MCP server — get license metadata (name, OSI-approved, URL) by exact SPDX ID or fuzzy search by keyword.
@mukundakatta/license-mcp v0.1.0 — SPDX license lookup and search. 2 tools: lookup ({id}) returns {id, name, osiapproved, url} or {id, found:false}; search ({query, limit?}) returns {matches: [{id, name, osiapproved, url}]}. 22 calls, 100% success, p50=0.4ms. KEY GOTCHAS: (1) case-insensitive lookup — "mit" finds MIT; (2) unknown IDs return {found:false} not MCP error; (3) empty query returns first 25 licenses alphabetically (full catalog browse); (4) search is substring on both ID and name ("creative commons" matches all CC licenses); (5) limit 1-200, default 25; (6) CC licenses are NOT OSI-approved (osi_approved:false); (7) deprecated SPDX IDs (GPL-1.0 without -only/-or-later) still present; (8) sub-millisecond after 7ms first-call JIT. Install: npm install @mukundakatta/license-mcp. Entry: dist/server.js. Tested licenses: MIT, Apache-2.0, GPL-3.0-only, BSD-3-Clause, ISC, MPL-2.0, LGPL-2.1-only, CC-BY-4.0, Unlicense, 0BSD, AGPL-3.0-only, Artistic-2.0.
{ "server": "@mukundakatta/license-mcp", "version": "0.1.0", "transport": "stdio", "tools": ["lookup", "search"], "calls": 22, "success_rate": 1, "p50_ms": 0.4, "traces": [ { "tool": "lookup", "args": { "id": "MIT" }, "result": { "id": "MIT", "name": "MIT License", "osi_approved": true, "url": "https://opensource.org/license/mit/" }, "ms": 1.1 }, { "tool": "lookup", "args": { "id": "Apache-2.0" }, "result": { "id": "Apache-2.0", "name": "Apache License 2.0", "osi_approved": true }, "ms": 0.4 }, { "tool": "lookup", "args": { "id": "GPL-3.0-only" }, "result": { "id": "GPL-3.0-only", "name": "GNU General Public License v3.0 only", "osi_approved": true }, "ms": 0.3 }, { "tool": "lookup", "args": { "id": "UNKNOWN-LICENSE-XYZ" }, "result": { "id": "UNKNOWN-LICENSE-XYZ", "found": false }, "ms": 0.5 }, { "tool": "lookup", "args": { "id": "mit" }, "result": { "id": "MIT", "name": "MIT License", "osi_approved": true }, "ms": 0.6, "note": "case-insensitive" }, { "tool": "lookup", "args": { "id": "CC-BY-4.0" }, "result": { "id": "CC-BY-4.0", "name": "Creative Commons Attribution 4.0 International", "osi_approved": false }, "ms": 0.4 }, { "tool": "lookup", "args": { "id": "Unlicense" }, "result": { "id": "Unlicense", "name": "The Unlicense", "osi_approved": true }, "ms": 0.1 }, { "tool": "lookup", "args": { "id": "" }, "result": { "id": "", "found": false }, "ms": 0.1 }, { "tool": "search", "args": { "query": "MIT" }, "result_count": 8, "first": { "id": "MIT", "name": "MIT License" }, "ms": 7.1 }, { "tool": "search", "args": { "query": "apache" }, "result_count": 3, "ms": 0.6 }, { "tool": "search", "args": { "query": "creative commons" }, "result_count": 25, "ms": 0.6, "note": "hit default limit" }, { "tool": "search", "args": { "query": "GPL", "limit": 5 }, "result_count": 5, "ms": 0.4 }, { "tool": "search", "args": { "query": "BSD" }, "result_count": 25, "ms": 0.6 }, { "tool": "search", "args": { "query": "zzzznonexistent" }, "result_count": 0, "ms": 0.4 }, { "tool": "search", "args": { "query": "" }, "result_count": 25, "ms": 0.9, "note": "empty query returns first 25 alphabetically" } ] }