lockshield-mcp
lockshield-mcp — Offline Multi-Lockfile SPDX, Supply-Chain & CycloneDX 1.5 SBOM MCP Server, CLI & GitHub Action
Zero-dependency, 100% offline Model Context Protocol (MCP) Server, CLI, and GitHub Action enabling AI coding agents (Claude Desktop, Claude Code, Cursor, Windsurf, Antigravity) and pull-request CI pipelines to audit package-lock.json (v1/v2/v3), pnpm-lock.yaml, Cargo.lock, poetry.lock, and uv.lock for deal-blocking SaaS / On-Prem copyleft & source-available contamination (AGPL-3.0, SSPL-1.0, BUSL-1.1, FSL-1.1, Commons-Clause, CC-BY-NC), postinstall supply-chain traps & ecosystem typosquats, and deterministic EU Cyber Resilience Act (CRA) CycloneDX 1.5 JSON SBOM generation.
MCP Tools Exposed (stdio)
Tool | Purpose | Safety Annotations |
| Parses |
|
| Evaluates single or compound SPDX boolean expressions ( |
|
| Detects |
|
| Emits deterministic |
|
Related MCP server: license-guardian
Quick Start (MCP Client & Local CLI)
# Start MCP server over stdio (supports both NDJSON and Content-Length framing)
npx -y github:z121245017-ai/lockshield-mcp
# List MCP tool schemas from terminal
npx -y github:z121245017-ai/lockshield-mcp --list
# Audit a lockfile in SaaS mode and emit a CycloneDX 1.5 JSON SBOM (exits 2 on blocking findings)
npx -y github:z121245017-ai/lockshield-mcp --lockfile ./package-lock.json --mode saas --sbom ./bom.cdx.json
# Invoke any MCP tool directly via --cli
npx -y github:z121245017-ai/lockshield-mcp --cli evaluate_spdx_expression_policy '{"expression":"(MIT OR GPL-3.0-only)","deploymentMode":"saas"}'Claude Desktop / Cursor / Windsurf / Antigravity Config
{
"mcpServers": {
"lockshield": {
"command": "npx",
"args": ["-y", "github:z121245017-ai/lockshield-mcp"]
}
}
}Docker (node:22-alpine, non-root USER node)
docker build -t lockshield-mcp .
docker run -i --rm lockshield-mcpGitHub Action (z121245017-ai/lockshield-mcp@v1)
Block AGPL-3.0, SSPL-1.0, BUSL-1.1, postinstall hooks, and typosquats in pull requests while automatically generating a deterministic CycloneDX 1.5 SBOM artifact:
name: LockShield License & Supply-Chain Gate
on:
pull_request:
paths:
- '**/package-lock.json'
- '**/pnpm-lock.yaml'
- '**/Cargo.lock'
- '**/poetry.lock'
- '**/uv.lock'
permissions:
contents: read
jobs:
lockshield:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Audit lockfiles & generate CycloneDX 1.5 SBOM
uses: z121245017-ai/lockshield-mcp@v1
with:
paths: '.'
deployment-mode: 'saas'
sbom-output: 'bom.cdx.json'3-Mode SPDX Deployment Policy Matrix
License Family | Examples |
|
|
|
Permissive |
|
|
|
|
Weak Copyleft |
|
|
|
|
Strong Copyleft |
|
|
|
|
Network Copyleft |
|
|
|
|
Source-Available |
|
|
|
|
Non-Commercial |
|
|
|
|
Commercial Air-Gapped Browser Workbench & DevSecOps Suite
Need a zero-install Bilingual Air-Gapped Browser Workbench (connect-src 'none') for M&A legal counsel, procurement security questionnaires, 1080×1440 compliance sign-off cards, and Excel BOM inventory exports without touching the command line?
Explore LockShield Pro Workbench and our full offline DevSecOps & developer utility catalog at https://z121245017-ai.github.io/.
Verification
npm testLicense
MIT License — 0 external npm dependencies, 0 network calls, 100% local deterministic execution.
Available Tools
4 toolsaudit_lockfile_complianceBRead-onlyIdempotent
Parses package-lock.json (v1/v2/v3), pnpm-lock.yaml, Cargo.lock, poetry.lock, or uv.lock offline and evaluates transitive SPDX copyleft/SaaS license contamination and supply-chain hazards.
Inputs: includeDev, filenameHint, lockfilePath, deploymentMode, +4 more.
evaluate_spdx_expression_policyBRead-onlyIdempotent
Evaluates single or compound SPDX boolean license expressions (OR, AND, WITH, parentheses) across SaaS, Commercial Binary, and Internal Tool deployment modes.
Inputs: expression (required), deploymentMode.
generate_cyclonedx_sbomARead-onlyIdempotent
Generates a deterministic CycloneDX 1.5 JSON Software Bill of Materials (SBOM) with canonical Package URLs (purl), hex SHA-512/SHA-256 digests, and SPDX license objects.
Inputs: excludeDev, filenameHint, lockfilePath, applicationName, +4 more.
scan_supply_chain_hazardsARead-onlyIdempotent
Scans lockfile dependencies specifically for preinstall/postinstall lifecycle hooks, cleartext HTTP or unpinned Git origins, deprecated SHA-1 hashes, and ecosystem typosquats.
Inputs: filenameHint, lockfilePath, allowedPackages, lockfileContent.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a recognizable core action (audit lockfile, evaluate SPDX expression, scan hazards, generate SBOM), so selection is mostly clear. However, audit_lockfile_compliance's description also claims to evaluate "supply-chain hazards," which overlaps directly with scan_supply_chain_hazards, and its license-contamination check blurs with evaluate_spdx_expression_policy.
All four names follow a strict verb_noun snake_case pattern (audit_…, evaluate_…, scan_…, generate_…) with descriptive domain objects. No mixed conventions or vague one-word verbs.
Four tools is lean but each maps to a distinct stage of lockfile analysis, so nothing feels redundant. It sits at the low end of the ideal range, leaving little room for supporting operations.
The analysis-to-SBOM pipeline is covered, but there is no way to inspect or list raw resolved dependencies, no diff/compare between two lockfiles, and no remediation or policy-configuration tool despite policy evaluation being a core feature. Agents would have to work around these gaps for a full audit workflow.
Maintenance
Related MCP Connectors
Supply-chain security & CVE audit for npm, PyPI, and Cargo packages via OSV.dev.
Scan packages and lockfiles (npm, PyPI, Go, Maven, Cargo, NuGet) for vulnerabilities and malware.
Detect malicious or vulnerable npm packages: registry search, OSV.dev and GitHub advisory lookups
Audit a dependency list for known vulnerabilities, licenses and outdated versions.
Related MCP Servers
- AlicenseBqualityDmaintenanceAudits package lockfiles for vulnerabilities, supporting npm, yarn, and pnpm. Runs via CLI or as an MCP server over stdio.113 npm73MIT
- -licenseNot gradedqualityBmaintenanceAudits npm dependencies for license compatibility, catching copyleft and source-available traps before shipping.-
- AlicenseNot gradedqualityAmaintenanceEnables auditing npm, Yarn, and pnpm lockfiles from local project directories or remote Git repositories, returning vulnerability results in text or JSON with configurable thresholds and dev-dependency skipping.13 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables auditing npm, Yarn, and pnpm lockfiles from local project directories or remote Git repositories and returning unified vulnerability reports with configurable severity thresholds, dev-dependency skipping, and text or JSON output.13 npmMIT