License Header Guardian MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install -e .
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add license-header-guardian -- node "<FULL_PATH_TO_MCP_LICENSE_HEADER_GUARDIAN>/dist/index.js"

Replace <FULL_PATH_TO_MCP_LICENSE_HEADER_GUARDIAN>/dist/index.js with the actual folder you prepared in step 1.

README.md

Deterministic, network-free, read-only MCP guardian for Python license headers

mcp-license-header-guardian

Deterministic, network-free, read-only MCP guardian that enforces license headers in tracked Python files (Tier 1).

What this repo is for

Use this repository as the starting point for new guardians.

It provides:

  • A frozen V1 contract (docs/V1_CONTRACT.md)
  • Canonical output examples (docs/EXAMPLE_OUTPUTS.md)
  • Determinism guardrails (pytest)

Invariants (do not violate under V1)

  • One tool only: check_license_header
  • Output schema keys are fixed
  • Fail-closed on invalid input or internal error
  • No timestamps, randomness, environment metadata
  • No network calls
  • No repo mutation / disk writes

If you need any of the above, declare V2.

Local development

Install editable:

python3 -m pip install -e .

Run tests:

pytest -q

Print canonical JSON output:

python3 -c "from mcp_license_header_guardian.server import check_license_header, canonical_json; print(canonical_json(check_license_header('.')))"

MCP server

Run:

mcp-license-header-guardian

Tools (1)

check_license_headerVerifies the presence and correctness of license headers in Python files.

Configuration

claude_desktop_config.json
{"mcpServers": {"license-header-guardian": {"command": "mcp-license-header-guardian"}}}

Try it

Check the license headers for all Python files in the current directory.
Verify if the license header in my project files complies with the standard.
Run a license header audit on the repository using the guardian tool.

Frequently Asked Questions

What are the key features of License Header Guardian?

Deterministic, network-free analysis. Read-only operation with no repository mutations. Enforces license headers in tracked Python files. Fail-closed design for invalid inputs or internal errors.

What can I use License Header Guardian for?

Automated compliance checking for open-source Python projects. Ensuring consistent license headers across a codebase without network access. Integrating license verification into secure, offline development environments.

How do I install License Header Guardian?

Install License Header Guardian by running: pip install -e .

What MCP clients work with License Header Guardian?

License Header Guardian works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep License Header Guardian docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare