Skip to main content

MCP server exposing ClauseKeeper's deterministic compliance scanner to agents.

Project description

ClauseKeeper MCP Server

clausekeeper-mcp exposes ClauseKeeper's deterministic compliance scanner as Model Context Protocol (MCP) tools for Claude Desktop, Cursor, and other MCP hosts.

It is a thin wrapper around a vendored copy of the real ClauseKeeper scanner in clausekeeper_core/scanner.py and rule library in clausekeeper_core/clause_rules.py:

  • no LLM calls
  • no API keys
  • no paid services
  • stdio transport via the official Python mcp SDK

Tools

  • scan_policy_text(text: str) — scans pasted policy/legal text with the vendored ClauseKeeper scanner and returns the score, grade, counts, categories, and missing/stale clause checklist.
  • scan_policy_url(url: str) — fetches a URL, strips HTML with ClauseKeeper's html_to_text, then scans the visible text.
  • list_clause_rules() — returns the vendored clause rules and categories.

Run locally

From the main ClauseKeeper repository:

cd mcp
uv run clausekeeper-mcp

uv run creates/uses the local project environment and installs the mcp SDK dependency automatically. Because this is a stdio MCP server, uv run clausekeeper-mcp waits for an MCP client on stdin/stdout.

You can also install it into an explicit virtual environment:

cd mcp
uv venv
uv pip install --python .venv/bin/python -e .
.venv/bin/clausekeeper-mcp

Or run it directly:

cd /path/to/clausekeeper/mcp
uv run python server.py

MCP host configuration

Use an absolute path to this mcp directory.

Claude Desktop

Add this to your Claude Desktop MCP configuration file:

{
  "mcpServers": {
    "clausekeeper": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/clausekeeper/mcp",
        "run",
        "clausekeeper-mcp"
      ]
    }
  }
}

Cursor or other MCP hosts

Use the same server definition in your MCP settings:

{
  "mcpServers": {
    "clausekeeper": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/clausekeeper/mcp",
        "run",
        "clausekeeper-mcp"
      ]
    }
  }
}

If your host does not support uv --directory, use the installed console script from a virtual environment instead:

{
  "mcpServers": {
    "clausekeeper": {
      "command": "/absolute/path/to/clausekeeper/mcp/.venv/bin/clausekeeper-mcp",
      "args": []
    }
  }
}

Keeping the vendored scanner in sync

The clausekeeper_core/ package is vendored from the main app's app/scanner.py and app/clause_rules.py so the MCP package is self-contained for PyPI/registry installs. When the scanner or clause rules change in app/, update the matching vendored files here and re-run the MCP self-containment and parity checks.

Publishing metadata

No server.json is included here because the current OSS MCP Community Registry / GitHub MCP Registry metadata format should be confirmed against the registry documentation at publication time. When publishing, add the registry-required metadata file with the package name, description, license, repository URL, runtime command, and tool list.

Main project

See the main ClauseKeeper project at ../README.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clausekeeper_mcp-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clausekeeper_mcp-0.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file clausekeeper_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: clausekeeper_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for clausekeeper_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 816c72c3979d0c685fc0236071869b547f847f623ca0aba09758f201e89ce197
MD5 f9fa80ca155711181ffce95659eaf22e
BLAKE2b-256 470a30fcd60bc1835bbbea3cdcc33af135f25148578edb85ff3e705efb8899df

See more details on using hashes here.

File details

Details for the file clausekeeper_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: clausekeeper_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for clausekeeper_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e08ac097cfc81287da8771b6bfb7b65b035916cbcd1853aed0f12167d4b502f2
MD5 a2590d74ad7e5918ed0650e1acf95d59
BLAKE2b-256 f52d2b953cf05c2a01b02b65b07730b7b33518180cf2dacf952c9dc19d18ba3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page