# OpenLaws MCP

> OpenLaws lets your AI client access massive, validated legal databases—statutes, regulations, and case law across 50+ jurisdictions. Use it to search laws by keyword (BM25), validate citations instantly, or track legislative changes over time. Stop jumping between government sites; get verifiable legal data directly through conversation.

## Overview
- **Category:** brain-trust
- **Price:** Free
- **Tags:** legal-research, statute-search, case-law, citation-validation, legislative-tracking

## Description

Look, forget jumping between government websites and trying to cross-reference sources manually. **OpenLaws lets your AI client connect directly to massive, validated legal databases—statutes, regulations, and case law across 50+ jurisdictions.** You'll use this server to search laws by keyword (BM25), validate citations instantly, or track legislative changes over time. This gives you verifiable legal data straight through conversation.

### **Searching Statutes Across Jurisdictions**

You need to know what the law says? Start with `search_statutes`. You can run a keyword search against federal and state statutes simultaneously, surveying all 50 states at once, or scope that search down if you only care about one region. Once you find an ID using `search_statutes`, you retrieve the full text of the law using `get_statute`. This tool gives you the complete statute content along with effective dates and annotations.

Tracking how laws change is crucial, too. If you need to see what was added or deleted between legislative sessions, use `get_redline_comparison` to compare two versions of a federal statute. For seeing every historical shift, `get_statute_history` pulls all the past versions and amendments for that specific federal statute ID.

### **Querying Case Law Opinions**

Want case law? You start by searching using `search_caselaw`, which takes keywords across millions of cases. You can narrow this down further, optionally filtering results by a court or circuit ID. Once you get the specific case ID, run `get_caselaw_opinion` to fetch the full text of that court opinion. That output includes details on the parties and any citations used.

For constitutional law, you have two options: search for keywords across The U.S. Constitution and all 50 state constitutions using `search_constitutions`, or if you already know the ID, grab the complete constitution content with `get_constitution`. 

### **Regulations and Compliance Checks**

If statutes aren't enough, you need regulations. Use `search_regulations` to query codes across multiple jurisdictions using keywords; remember you can filter results by jurisdiction ID if you want to focus your search. To get the full content of a specific state or federal regulation, use `get_regulation` with its unique ID. For compliance monitoring, `get_recent_updates` shows you recent legal changes and updates for an entire set of jurisdictions or just one specified federal/state area.

### **Validation and Jurisdiction Scope**

The most critical function is knowing if your source material is legit. You can't trust a citation just because it looks right. Use `validate_citation` to check if any given legal citation is formatted correctly and find its authoritative source document across all major jurisdictions.

Need to know what databases you're even working with? Run `list_jurisdictions`. This function lists every single available legal jurisdiction—federal, the 50 states, DC, PR—and gives you their required IDs. If you need details on one of those listed areas, use `get_jurisdiction` with an ID found through `list_jurisdictions`.

This server makes sure your AI agent never gets lost in a sea of outdated or incorrect legal documents.

## Tools

### get_caselaw_opinion
Fetches the full text of a court opinion using its ID, including details on parties and citations.

### get_constitution
Retrieves the complete content for a specific constitution provision by its ID, showing amendments history.

### get_jurisdiction
Returns details about a specific legal jurisdiction using an ID found through `list_jurisdictions`.

### get_recent_updates
Shows recent legal changes and updates for all or a specified federal/state jurisdiction, useful for compliance checks.

### get_redline_comparison
Compares two versions of a federal statute to show exactly what text was added or removed between legislative sessions.

### get_regulation
Gets the full content of a specific state or federal regulation using its ID, including citations and context.

### get_statute
Retrieves the complete text of a specific statute by its ID, showing effective dates and annotations.

### get_statute_history
Views all historical versions and amendments for a federal statute using its ID.

### list_jurisdictions
Lists every available legal jurisdiction—federal, 50 states, DC, PR—and their required IDs.

### search_caselaw
Searches for case law opinions using keywords across millions of cases. Optionally filter by court or circuit ID.

### search_constitutions
Searches the U.S. Constitution and all 50 state constitutions with a keyword, optionally filtering by jurisdiction ID.

### search_regulations
Searches regulations across multiple jurisdictions using keywords; filter results by jurisdiction ID if needed.

### search_statutes
Searches statutes for keywords, allowing you to survey all 50 states or scope the search to one region. Use this first.

### validate_citation
Checks if a given legal citation is correctly formatted and finds its authoritative source document across all major jurisdictions.

## Prompt Examples

**Prompt:** 
```
Search for data privacy statutes across all US states and summarize the key findings.
```

**Response:** 
```
I've searched statutes for 'data privacy' across all 53 jurisdictions. Found relevant statutes in 12 states including California Consumer Privacy Act (CCPA), Virginia Consumer Data Protection Act, Colorado Privacy Act, and Connecticut Data Privacy Act. Federal: no comprehensive federal data privacy statute currently exists. Top results include: CA Civ. Code § 1798.100, Va. Code § 59.1-575, Colo. Rev. Stat. § 6-1-1303. Would you like the full text of any specific statute?
```

**Prompt:** 
```
Validate these citations: '42 U.S.C. § 1983' and 'Roe v. Wade, 410 U.S. 113' and tell me if they're correct.
```

**Response:** 
```
I've validated both citations:

1. **42 U.S.C. § 1983** — ✅ VALID. Civil Rights Act, Section 1983 (Deprivation of rights under color of law). Federal statute. Source: USC Title 42, Chapter 21, Subchapter 1.

2. **Roe v. Wade, 410 U.S. 113 (1973)** — ✅ VALID. Supreme Court opinion. Citation confirmed: 410 United States Reports 113. Note: Overturned by Dobbs v. Jackson Women's Health Organization (2022). Original source: Supreme Court of the United States.

Both citations are correctly formatted and verified against government sources.
```

**Prompt:** 
```
Show me recent legislative updates in California employment law and any changes this month.
```

**Response:** 
```
I've retrieved recent updates for California jurisdiction. Found 8 recent updates in the past 30 days:

1. **CA Labor Code § 2810.5** — Updated notice requirements for new hires (effective 2024-01-01)
2. **CA Labor Code § 432.7** — Amendments to salary history ban provisions
3. **CA Gov. Code § 12950.1** — Expanded SB-551 training requirements for employers with 50+ employees
4. **CA Code of Regs. tit. 8, § 11040** — Updated wage order exemptions for professional workers
5. **AB 1234 (2024)** — New remote work expense reimbursement requirements

Would you like the full text of any of these updates, or shall I search for specific topics like 'remote work' or 'overtime'?
```

## Capabilities

### Search Statutes Across Jurisdictions
Run keyword searches against federal and state statutes simultaneously, or scope the search using `search_statutes`.

### Query Case Law Opinions
Find case law opinions by searching keywords with `search_caselaw`, then retrieve the full text using `get_caselaw_opinion`.

### Validate Legal Citations
Check if a legal citation is correct and find its original government source document using `validate_citation`.

### Find Specific Regulations
Query the Code of Federal Regulations (CFR) and state regulations via fast keyword search with `search_regulations`.

### Track Legal Changes Over Time
Generate redline comparisons between two versions of a federal statute using `get_redline_comparison` or view its full history via `get_statute_history`.

## Use Cases

### Analyzing Data Privacy Law Across States
A policy advisor needs a national overview of data privacy rules. They ask their agent, which runs `search_statutes` for 'data privacy' across all 50 states. The agent compiles the relevant statutes and provides top results like CCPA or CPRA.

### Verifying an Old Court Case Citation
A legal researcher receives a document with an old citation: '347 U.S. 483.' They run `validate_citation`. The agent confirms the citation, identifies the source court (Supreme Court), and verifies its status.

### Comparing Federal Law Changes
A compliance team needs to know exactly how a key federal statute changed between two Congresses. They run `get_statute_history` using the statute ID, then use `get_redline_comparison` to generate a clear, annotated comparison of the changes.

### Initial Research on Employment Law
A junior associate starts by running `search_regulations` for 'workplace safety' regulations. The agent returns key CFR sections and state-specific rules, allowing the associate to narrow down their focus before requesting a full text using `get_regulation`.

## Benefits

- Stop wasting time on manual research. Instead of opening dozens of government websites, you run `search_statutes` to survey laws across 50 states in one query.
- Get true verification. When a client sends an ambiguous citation, use `validate_citation`. It confirms if the source exists and links directly to the original document.
- Track change accurately. To understand how a law shifted over time, run `get_redline_comparison` on federal statutes—it shows exactly what text was added or removed.
- Deep dive into precedents. Use `search_caselaw` for keywords, then use `get_caselaw_opinion` to pull the full court record and details you need for a memo.
- Stay compliant effortlessly. Instead of monitoring dozens of state websites, run `get_recent_updates` on your target jurisdiction to see all new legislative changes.

## How It Works

The bottom line is: You talk naturally to your agent, and it calls the precise OpenLaws tools to build a complete legal answer.

1. First, tell your agent what you need—for example, 'What are the data privacy statutes in California?'
2. The OpenLaws server runs `search_statutes`, returning a list of relevant statutes and their IDs.
3. Then, if you need the full text or history, prompt for the specific tool action (e.g., 'Now use `get_statute` with ID X') to get the final document.

## Frequently Asked Questions

**How do I check if a citation is correct using OpenLaws? (validate_citation)**
You run `validate_citation` and provide the citation string. The tool verifies it against all 53 jurisdictions, confirming its format and finding the original authoritative government source.

**What's the difference between search_statutes and get_statute? (search_statutes, get_statute)**
`search_statutes` runs a broad keyword query across many laws to find IDs. `get_statute` takes one of those returned IDs and pulls the entire, complete text for that single statute.

**How do I see if federal law changed? (get_redline_comparison)**
You use `get_redline_comparison`. You must specify two version dates or IDs. The tool returns a side-by-side comparison showing exactly what text was removed and what new language was added.

**Do I need to know the jurisdiction ID first? (list_jurisdictions, get_jurisdiction)**
It's best practice to run `list_jurisdictions` first. This gives you all available IDs for states and federal bodies, which lets you scope searches accurately using `get_jurisdiction`.

**Can I search constitutions? (search_constitutions)**
Yes, use `search_constitutions`. You provide a keyword like 'free speech,' and the tool queries both the U.S. Constitution and all 50 state constitutions simultaneously.

**After running a search via `search_caselaw`, what tool do I use to get the full court opinion text? (get_caselaw_opinion)**
You call `get_caselaw_opinion` using the case ID. This returns the complete, rich-text opinion content along with court details and involved parties.

**How do I track recent legislative updates or compliance changes across different states? (get_recent_updates)**
Use `get_recent_updates`. You can limit the scope by jurisdiction ID, or check all federal and state levels. This is the fastest way to monitor legislative shifts.

**If I find a regulation using `search_regulations`, what tool do I use to access its full content? (get_regulation)**
Call `get_regulation` with the specific ID. This provides the entire text, citations, and regulatory context—far more detail than the search results give you.

**How do I get an OpenLaws API key and what authentication method is used?**
Visit [**openlaws.us/api**](https://openlaws.us/api/) and click **Get API Access** to register. Once approved, you'll receive a Bearer token. Include it in the Authorization header as `Authorization: Bearer YOUR_TOKEN`. The API uses standard Bearer token authentication for all v1 endpoints at `https://api.openlaws.us/api/v1/`.

**Can I search statutes across all 50 states simultaneously?**
Yes! Use the `search_statutes` tool without specifying a jurisdiction parameter to search all 53 jurisdictions (50 states + DC + Puerto Rico + federal) at once. This is perfect for 50-state surveys. Alternatively, scope your search to a specific jurisdiction by providing its ID (e.g., 'ca' for California, 'ny' for New York, 'us' for federal).

**How does citation validation work and what formats are supported?**
Use the `validate_citation` tool with any standard legal citation format. The API will identify the original government source, validate the citation accuracy, and flag malformed citations. It supports Bluebook format (e.g., '42 U.S.C. § 1983', '347 U.S. 483 (Brown v. Board)'), state citations for all 50 states, DC, and Puerto Rico. This is ideal for validating citations in legal documents, spreadsheets, and databases.

**What legal data sources does OpenLaws cover?**
OpenLaws covers ~4.3 million tracked sections across 53 jurisdictions with 100% federal statutes and regulations coverage. Data includes: United States Code (USC), Code of Federal Regulations (CFR), all 50 state statutes and regulations, DC and Puerto Rico laws, ~5-6 million case opinions (from Harvard CAP and CourtListener), US Constitution and all 50 state constitutions, and legislative history for federal laws.