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-agent Can 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: LegalContext
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").
Inputs: question (required), state, business_type. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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
Law firm management MCP: manage cases, clients, tasks, calendar and documents via Claude AI.
JusPronto is case-management software for Brazilian law firms. Its remote MCP server (OAuth 2.1 with PKCE, per-permission scopes, audit log) lets Claude and ChatGPT read the firm's own cases, deadlines, agenda, recent court movements and case files with the page cited. Write actions require the lawyer's approval. Requires a JusPronto account.
One-step legal compliance for vibe-coded apps: privacy, terms, cookie banner and EU AI Act check.
AI code governance and code review for Claude Code, Copilot and Cursor. Checks rules and security.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceConnects 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.356 npm28MIT
- AlicenseNot gradedqualityDmaintenanceEnables secure access to legal documents from Clio via Claude Desktop, with local processing and semantic search to ground AI responses in actual documents.29Mozilla Public 2.0
- AlicenseNot gradedqualityCmaintenanceEnables natural-language queries about US federal and New York privacy law obligations, returning citation-anchored answers with computed deadlines, usable from Claude Desktop or the command line.1Apache 2.0
- AlicenseAqualityBmaintenanceEnables checking US case citations from Claude Desktop, Claude Code, Cursor, and the OpenAI Agents SDK before filing a draft.1479 npmMIT