Skip to main content
Glama
mcp-license-header-guardian

mcp-license-header-guardian

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)

Related MCP server: CodeAudit MCP

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

Available Tools

1 tool
check_license_headerA

Deterministic, network-free, read-only Tier 1 guardian.

Checks .py files tracked by git to ensure the first 5 lines contain "Copyright" OR "SPDX-License-Identifier".

Inputs: repo_path (required). Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is singular and clearly defined.

    Naming Consistency5/5

    A single tool inherently has perfect naming consistency, as there are no other tools to compare against. The name 'check_license_header' follows a clear verb_noun pattern.

    Tool Count2/5

    One tool is too few for the server's apparent purpose of license header management, as it only provides a read-only check without any complementary tools for fixing, updating, or managing headers across files.

    Completeness2/5

    The tool surface is severely incomplete for license header management, lacking essential operations such as adding, removing, or modifying headers, which are necessary for a full workflow in this domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers