MCP Legal Doc Analyzer

by dbsectrainer

Not rated
GitHub

About

Domain-specific MCP tooling for legal document workflows — extract clauses, check compliance, flag risks

Details

Author
dbsectrainer
Categories
Productivity, Other, Security

Setup

Install MCP Legal Doc Analyzer in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/dbsectrainer/mcp-legal-doc-analyzer

Follow the installation instructions in the repository README, then restart your MCP client.

Domain-specific MCP tooling for legal document workflows — extract clauses, check compliance, flag risks

Domain-specific MCP tooling for legal document workflows. Extract key clauses from contracts, flag risky provisions against configurable rule templates, compare document versions at the clause level, and check compliance against standard checklists — all locally, without documents leaving your machine.

Tool reference|Configuration|Contributing|Troubleshooting

- Clause extraction: Identifies and labels clause boundaries (termination, liability, IP, governing law, and more) from PDF, DOCX, and plain-text files.
- Risk flagging: Checks extracted clauses against YAML rule templates and returns severity-ranked findings.
- Compliance checking: Validates documents against structured checklists (NDA, employment agreement, SaaS terms) with pass/fail per requirement.
- Version diffing: Compares two versions of a document at the clause level — not raw text lines.
- Configurable templates: Rule sets are YAML files that legal professionals can review and edit without writing code.
- Local-only processing: All parsing and analysis runs on-device; documents are never transmitted externally.

mcp-legal-doc-analyzeris an analysis aid, not legal advice. Outputs should be reviewed by a qualified legal professional before making decisions. Clause extraction uses pattern matching and heuristics; results may be incomplete or incorrect for non-standard document formats. Low-confidence extractions are flagged explicitly.

Document contents are processed locally and stored in a local SQLite database. Do not share database exports containing confidential documents.

Add the following config to your MCP client:

{ "mcpServers": { "legal-analyzer": { "command": "npx", "args": ["-y", "mcp-legal-doc-analyzer@latest"] } } }

To load custom compliance templates from a directory:

{ "mcpServers": { "legal-analyzer": { "command": "npx", "args": ["-y", "mcp-legal-doc-analyzer@latest", "--templates=~/legal/my-templates"] } } }

Amp · Claude Code · Cline · Cursor · VS Code · Windsurf · Zed

Provide a PDF or DOCX contract file, then enter:

Extract the key clauses from this NDA and flag any risky provisions.

Your client should return a list of extracted clauses and a risk report ranked by severity.

- extract_clauses— identify and label clause boundaries with confidence scores; supports .pdf, .docx, .txt
- flag_risks— severity-ranked risk findings against a compliance template
- check_compliance— structured pass/fail checklist validation per rule
- summarize_terms— plain-English bullet-point summary of key provisions

- compare_versions— clause-level diff between two document versions

- list_templates— enumerate all available compliance templates

- export_analysis_report— self-contained HTML report with clause table and risk findings; suitable for printing
- export_audit_log— export the analysis audit log in JSON or CSV format with optional date-range filtering
- bulk_analyze— process a portfolio of contract files in batch with progress notifications

Nine compliance templates are included out of the box:
- NDA
- Employment Agreement
- SaaS Customer Agreement
- Software License Agreement
- Vendor Agreement
- Consulting Agreement
- Data Processing Agreement
- IP Assignment
- Loan Agreement

Uselist_templatesto enumerate all available templates at runtime, including any custom templates loaded via--templates.

Directory to load custom YAML compliance rule templates from. Templates in this directory are merged with the built-in set.

Path to the SQLite database file used to store document analysis history.

Minimum confidence score (0–1) for extracted clauses to be included in results. Extractions below this threshold are flagged as low-confidence.

Disable storing document analysis results in the local database.

Path to a YAML file defining custom clause detection patterns. Seecustom-clause-patterns.example.yamlin the source tree for the schema.

Number of files to process in parallel when usingbulk_analyze.

Enable OCR fallback for scanned PDFs that contain no extractable text layer. Requires the optional peer dependenciestesseract.js,pdfjs-dist, andcanvas.

Start the server in Streamable HTTP mode on the given port instead of stdio. When set, the server accepts HTTP connections suitable for shared team deployments.

Pass flags via theargsproperty in your JSON config:

{ "mcpServers": { "legal-analyzer": { "command": "npx", "args": [ "-y", "mcp-legal-doc-analyzer@latest", "--confidence-threshold=0.8", "--templates=~/legal/templates" ] } } }

Before publishing a new version, verify the server with MCP Inspector to confirm all tools are exposed correctly and the protocol handshake succeeds.

Runnpm run buildfirst so the packaged templates indist/templatesare present during verification.

npm run build && npm run inspect
# List all tools npx @modelcontextprotocol/inspector --cli node dist/index.js --method tools/list # List resources and prompts npx @modelcontextprotocol/inspector --cli node dist/index.js --method resources/list npx @modelcontextprotocol/inspector --cli node dist/index.js --method prompts/list # Call a tool (example — replace with a relevant read-only tool for this plugin) npx @modelcontextprotocol/inspector --cli node dist/index.js \ --method tools/call --tool-name list_templates # Call a tool with arguments npx @modelcontextprotocol/inspector --cli node dist/index.js \ --method tools/call --tool-name list_templates --tool-arg key=value

Run before publishing to catch regressions in tool registration and runtime startup.

Compliance rule templates live insrc/templates/as YAML files and can be contributed without touching code. Clause extraction tests must use synthetic or anonymized documents only — never include real contracts in the repository. Never log document content.

ClearPolicy is a document signing and compliance tracking tool for organizations. Once connected, your AI assistant can import documents, send signature requests, track who has and hasn't signed, and manage your contacts — all by prompt.

Docsie MCP lets you create, manage, and publish documentation, convert videos to docs, run compliance analysis, and search your knowledge base - all from your AI assistant

EU VAT validation, GDPR articles, EUR-Lex regulations, and VAT rates for all 27 EU states. 5 tools, free, no API key.

Check workplace safety compliance against OSHA General Industry standards (29 CFR 1910) with cited regulation sections and corrective actions.

AI-powered regulatory compliance checking for financial marketing content across multiple jurisdictions.

Verified, tier-0 regulatory data for your AI: connect Claude, ChatGPT or Cursor to 850+ official sources across 50+ jurisdictions.

EXIF for AI. AKF embeds trust scores, source provenance, and compliance metadata into every file your AI touches — DOCX, PDF, images, code, and 20+ formats. 9 MCP tools: stamp, inspect, trust, audit, scan, embed, extract, detect. Audit against EU AI Act, SOX, HIPAA, NIST in one command.

Tamper-evident audit logging for AI decisions. Three tools (record_decision, verify_decision, list_decisions) write to a regulator-grade ledger built on AWS S3 Object Lock with 7-year retention. Designed for EU AI Act Article 12 and FCA SS1/23 evidence requirements. Try zero-config: npx audit-ledger-mcp boots in sandbox mode against a public hosted tenant.

Connect to your CISO Adapt workspace to search, analyse, export, and manage risks and policies with natural language

City hiring-compliance MCP server with regulation search and full audit risk scoring.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.