Precedent
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., "@PrecedentSearch public contracts for a non-compete precedent with favorable terms."
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.
Precedent
A retrieval-first contract-intelligence agent, architecturally modeled on DeepJudge's platform: a permission-aware hybrid search index, reusable Agent Skills, a verifying agent loop, and an MCP server so any MCP client (Claude Desktop, Claude Code, a browser chat) can use it. Domain data is public — the CUAD dataset (510 commercial contracts, 13k+ expert-labeled clauses, CC BY 4.0) plus SEC EDGAR filings — so it's safe to build, demo, and put in a portfolio.
Architecture
CUAD + EDGAR --> ingest (clause-aware chunking, taxonomy tags)
--> hybrid index (Postgres + pgvector: vectors + keywords + access_group)
--> 3 Agent Skills (find-precedent / negotiation-check / risk-flag)
--> agent harness (Claude: route -> retrieve -> verify -> cite -> log)
--> MCP server --> Claude Desktop / Claude Code / web chat
(governance & eval log runs alongside every step)Why each layer exists is explained in CLAUDE.md. Read that before making changes —
it's the project's memory, not just a config file.
Related MCP server: contract-sentinel
Prerequisites
Python 3.11+
Docker (for local Postgres + pgvector)
An Anthropic API key (console.anthropic.com)
A Voyage AI API key (dash.voyageai.com) — the first 50M tokens on
voyage-law-2are free, which covers this entire corpus many times over
Setup
# 1. Environment
cp .env.example .env
# edit .env: add ANTHROPIC_API_KEY and VOYAGE_API_KEY
# 2. Local database
docker compose up -d
python scripts/init_db.py # applies db/schema.sql
# 3. Dependencies
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# 4. Verify the scaffold before touching data
pytest tests/ -q
# 5. Ingest data (takes a few minutes; well inside free API tiers)
python scripts/ingest_cuad.py
# 6. Evaluate retrieval quality against CUAD's own labels
python eval/run_eval.py
# 7. Run the MCP server
python -m src.precedent.mcp_serverLicense note
CUAD is CC BY 4.0 (free for commercial and non-commercial use). SEC filings are public record. No confidential data is used anywhere in this project.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP access to the U.S. federal procurement graph: contracts, opportunities, entities, and more.
Connect AI to millions of laws and court cases with the Lawstronaut MCP.
Search U.S. case law, fetch opinions, and ask matter-aware legal questions over your documents.
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Related MCP Servers
- AlicenseAqualityBmaintenanceA production-quality MCP server that exposes the official eCFR API as structured tools for AI-driven contract compliance, enabling retrieval of relevant Code of Federal Regulations by clauses extracted from contracts.8Academic Free v1.1
- FlicenseAqualityBmaintenanceEnables LLMs to ingest and analyze legal agreements, compute risk scores, and monitor non-compliant clauses through MCP tools like ingest, fetch_contracts, and run_analysis.4-
- AlicenseBqualityAmaintenanceEnables searching and filtering federal contract opportunities by keyword, agency, set-aside, NAICS, and more from any MCP client. Analyzes solicitations for small-business fit and risk, and provides reference lookups for NAICS codes, set-asides, and federal thresholds.9MIT
- FlicenseNot gradedqualityBmaintenanceEnables automated labor and service contract risk review through MCP, supporting single or batch contract analysis, risk knowledge base queries, and regional regulation lookups.-