legal-review-agent
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@legal-review-agentCan I record sales calls with prospects in Texas?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Legal Review Agent
An AI-powered legal risk classifier for small business decisions. Describe what you're about to do in plain English — get back a structured GREEN/YELLOW/RED verdict with statute citations, reasoning, and the compliant way to do it.
Works as a CLI tool, a Claude Desktop tool (MCP), or a Claude Code tool — so you can get a legal gut-check right inside the conversation where you're planning the decision.
Built for small business owners who can't afford to run every decision past a lawyer, but also can't afford to get it wrong.
This tool provides legal research, not legal advice. It is not a substitute for a licensed attorney. Always consult a professional before acting on high-stakes decisions.
How It Works
You ask a question. The agent classifies it into one of three risk levels:
GREEN — Safe to proceed
YELLOW — Proceed only with specific conditions
RED — Do not proceed
Every verdict comes with the specific law behind it, a compliant alternative, and a call on whether you actually need a lawyer for this one.
Related MCP server: clio-mcp
Example
$ python legal_review.py --state MA "Can I record sales calls with prospects?"⚠️ This tool provides legal research, not legal advice. Consult a licensed attorney before acting.
🔴 RED — Do not proceed
WHY: Massachusetts is a strict all-party-consent wiretap state (M.G.L. c. 272 §99).
Recording any call — including sales calls — without explicit verbal consent from ALL
parties is a criminal offense, not just a civil matter. Commonwealth v. Hyde (2001)
upheld criminal conviction for secret recording even of police officers.
COMPLIANT ALTERNATIVE:
1. At the start of every call, say: "Just so you know, this call may be recorded for
quality purposes. Is that okay with you?"
2. Wait for a spoken "yes" before proceeding
3. If they decline, do not record — take written notes instead
4. Store consent logs (date, time, caller, confirmation)
NEEDS A REAL PROFESSIONAL? No — the rule is clear-cut. Just follow the script above.
Sources:
- M.G.L. c. 272 §99 — Massachusetts wiretap statute
- Commonwealth v. Hyde, 434 Mass. 610 (2001)Installation
Requirements: Python 3.10+
# Clone the repo
git clone https://github.com/jack-nolan-dev/legal-review-agent.git
cd legal-review-agent
# Create a virtual environment and install dependencies
python3 -m venv .venv
.venv/bin/pip install -r requirements.txtFor CLI mode only (MCP mode doesn't need an API key):
Get an API key from console.anthropic.com and set it:
# Option 1: environment variable
export ANTHROPIC_API_KEY=your-key-here
# Option 2: .env file (recommended — persists across sessions)
echo "ANTHROPIC_API_KEY=your-key-here" > .envUsage
Single question
python legal_review.py "Can I scrape Google reviews and put them on my client's website?"With state context
python legal_review.py --state CA "Can I hire a freelancer to work 40hrs/week exclusively for me?"With business type
python legal_review.py --business-type "restaurant" "Do I need to post calorie counts on my menu?"Interactive mode
python legal_review.py --interactive --state MARaw JSON output
python legal_review.py --raw "Can I send cold emails to local businesses?"See the full system prompt
python legal_review.py --verbose "question"Use a different model
# Use Opus for more complex analysis
python legal_review.py --model claude-opus-4-6 "complex multi-jurisdictional question"Use with Claude Desktop or Claude Code (MCP)
This is the easiest way to use the tool — no API key needed. It works as an MCP server, which means you can add it as a tool inside Claude Desktop or Claude Code. Then you just ask Claude to review a business decision and it calls the tool automatically.
No API key required. The tool provides the legal knowledge base and analysis framework to the Claude session that's already running — your existing Claude Desktop or Claude Code subscription does the reasoning.
Setup (do this first)
git clone https://github.com/jack-nolan-dev/legal-review-agent.git
cd legal-review-agent
python3 -m venv .venv
.venv/bin/pip install -r requirements.txtClaude Desktop
Open your Claude Desktop config file:
Mac:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add the mcpServers block (or add to it if one already exists):
{
"mcpServers": {
"legal-review": {
"command": "/absolute/path/to/legal-review-agent/.venv/bin/python",
"args": ["/absolute/path/to/legal-review-agent/mcp_server.py"]
}
}
}Replace
/absolute/path/to/legal-review-agentwith the actual path where you cloned the repo. Use absolute paths, not~.
Restart Claude Desktop. Then just ask:
"Use the legal-review tool to analyze: Can I scrape Google reviews and put them on my client's website?"
Claude Code
claude mcp add legal-review -- /absolute/path/to/legal-review-agent/.venv/bin/python /absolute/path/to/legal-review-agent/mcp_server.pyRestart Claude Code, then ask about any legal question and it'll use the tool.
Architecture
legal-review-agent/
├── legal_review.py # CLI entry point (Click)
├── mcp_server.py # MCP server for Claude Desktop / Claude Code
├── agent/
│ ├── prompt.py # System prompt construction
│ ├── client.py # Anthropic SDK wrapper
│ └── formatter.py # Terminal output formatting
├── knowledge/
│ └── legal_base.md # Core legal knowledge base
├── examples/
│ └── sample_queries.md # 10 example queries with expected verdicts
├── pyproject.toml # Package config
└── requirements.txt # anthropic, click, python-dotenv, mcpHow the prompt works:
prompt.pyloads the legal knowledge base fromknowledge/legal_base.mdIt constructs a system prompt that instructs Claude to analyze the question, identify the legal domain, cite real statutes, and return a structured verdict
Optional state and business-type context is injected into the prompt
client.pysends the question to Claude via the Anthropic SDKformatter.pycolor-codes the terminal output based on the verdict
The knowledge base covers 12 legal areas common to small businesses: wiretapping, CAN-SPAM, TCPA, ROSCA, copyright, trademark, right of publicity, consumer protection (93A, UCL, etc.), entity/liability, contracts, data privacy, and employment classification.
Legal Domains Covered
Domain | Key Laws |
Call Recording | 18 U.S.C. §2511, state wiretap statutes |
Cold Email | CAN-SPAM Act (15 U.S.C. §7701) |
Cold Calls | TCPA (47 U.S.C. §227), FTC TSR |
Subscriptions | ROSCA (15 U.S.C. §8401), state auto-renewal laws |
Copyright | 17 U.S.C. §101 et seq. |
Trademark | Lanham Act (15 U.S.C. §1051) |
Right of Publicity | State statutes (CA §3344, NY §50-51) |
Consumer Protection | MA 93A, CA UCL, NY GBL §349 |
Business Entity | State LLC/partnership law |
Contracts | UCC, common law |
Data Privacy | CCPA/CPRA, COPPA, state privacy laws |
Employment | IRS classification, DOL tests, CA AB 5 |
Limitations
Not legal advice. This is a research tool, not a lawyer. The disclaimer is there for a reason.
Not a substitute for an attorney. For entity formation, contracts, tax strategy, or anything with potential criminal liability — get a real professional.
Knowledge base is not exhaustive. It covers common small-business scenarios, not every area of law.
No web search. The tool cannot verify that statutes are current. It flags uncertainty when it's unsure about effective dates or recent amendments.
US-focused. Federal + state law only. No international coverage.
Model limitations. Claude can hallucinate citations. The prompt instructs it not to, and to flag uncertainty — but always verify citations independently before relying on them.
Tech Stack
Python 3.10+
Anthropic SDK — Claude API client
Click — CLI framework
python-dotenv — Environment variable loading
MCP SDK — Model Context Protocol server for Claude Desktop / Claude Code integration
Claude Sonnet 4.6 — Default model (swap to
claude-opus-4-6via--modelfor deeper analysis)
License
MIT — see LICENSE.
Available Tools
1 toollegal_reviewA
Evaluate a business decision for legal risk.
Call this tool when a user asks whether a business action is legal, wants to know the legal risk of a decision, or needs to understand compliance requirements.
The tool returns a legal analysis framework with a knowledge base. Use it to produce a structured GREEN/YELLOW/RED verdict with statute citations, compliant alternatives, and whether the user needs a real attorney.
Args: question: A plain-English description of the business decision being considered. Example: "Can I scrape Google reviews and put them on my client's website?" state: Optional US state abbreviation for state-specific analysis (e.g., "MA", "CA", "NY"). When provided, the analysis prioritizes that state's laws alongside federal law. business_type: Optional business type for industry-specific context (e.g., "restaurant", "web agency", "healthcare startup").
| Name | Required | Description | Default |
|---|---|---|---|
| state | No | ||
| question | Yes | ||
| business_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden, and it does: it discloses the return shape ('legal analysis framework with a knowledge base'), the verdict format ('structured GREEN/YELLOW/RED verdict with statute citations'), and the output elements ('compliant alternatives' and 'whether the user needs a real attorney'). This is substantive disclosure beyond the bare schema. Only minor gaps like latency or failure modes are absent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Reasonably lean and well-ordered: purpose first, then when-to-use, then output behavior, then parameter docs. Each sentence earns its place. It is slightly long, but the length is justified by the 0% schema coverage, which forces the description to carry parameter documentation that would otherwise live in the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Complete for a moderately complex tool with three parameters and an output schema. Purpose, invocation cues, response format, and all parameters are covered. The presence of an output schema means return values need not be fully restated, and the description's mention of the verdict structure complements rather than duplicates it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must fully compensate, and it does. The Args section documents all three parameters with plain-English meaning, concrete examples ('Can I scrape Google reviews...', 'MA', 'restaurant'), and behavioral notes: state 'prioritizes that state's laws alongside federal law' and business_type adds 'industry-specific context.' This exceeds what the bare schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Opens with a specific verb+resource pairing: 'Evaluate a business decision for legal risk.' This is unambiguous and distinct. With no sibling tools present, no differentiation is needed, and the description fully establishes what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to call: 'Call this tool when a user asks whether a business action is legal, wants to know the legal risk of a decision, or needs to understand compliance requirements.' This is clear context for invocation. However, no when-not-to-use or alternative routing is given, though no siblings exist to exclude, so this is not a meaningful gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
legal_review
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusing it with another tool. The purpose of legal_review is clearly defined and distinct by default.
A single tool named legal_review uses a clear, descriptive snake_case format. There are no other tools to create naming inconsistencies.
One tool is on the thin side, but it is reasonably appropriate for a narrowly-scoped legal review agent. The tool is parameterized enough to handle different questions, states, and business types.
The tool fully covers the stated domain of evaluating legal risk for a business decision. It handles jurisdiction and business-type context and returns actionable next steps, so there are no obvious dead ends.
Maintenance
Related MCP Connectors
Pre-action allow/deny for AI agents. 24 statutes, 13 jurisdictions: EU AI Act, GDPR, DPDP.
Law firm management MCP: manage cases, clients, tasks, calendar and documents via Claude AI.
One-step legal compliance for vibe-coded apps: privacy, terms, cookie banner and EU AI Act check.
Classify any AI system under the EU AI Act: risk tier + binding Articles, verbatim from the law.
Related MCP Servers
- AlicenseCqualityCmaintenanceEnables AI-powered automated testing, security scanning, code review, and maintenance tasks directly within Claude Code or desktop.124MIT
- AlicenseNot gradedqualityAmaintenanceConnects Claude to Clio practice management, enabling AI-assisted access to matters, contacts, documents, tasks, and billing with audit logging and encryption for law firm compliance.88 npm24MIT
- AlicenseNot gradedqualityCmaintenanceEnables secure access to legal documents from Clio via Claude Desktop, with local processing and semantic search to ground AI responses in actual documents.33 npm29Mozilla Public 2.0

BitsBound MCP Serverofficial
AlicenseAqualityDmaintenanceEnables AI-powered contract analysis with partner-level redlines and real OOXML Track Changes for Claude Desktop and Claude.ai.12207 npmMIT