> ## Documentation Index
> Fetch the complete documentation index at: https://docs.courtrules.app/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP: Court Rules

> Connect AI agents to judge-specific filing rules and compliance checks using the Model Context Protocol.

# MCP: Court Rules

The Court Rules MCP server gives AI agents access to structured filing rules for 20+ courts and 630+ judges. Four tools let you list courts, search judges, retrieve rules, and generate compliance check parameters.

## What you get

Four court rules tools:

| Tool               | Purpose                                                                 |
| ------------------ | ----------------------------------------------------------------------- |
| `list_courts`      | List all courts with status and judge counts                            |
| `search_judges`    | Search judges by district, name, or type                                |
| `get_judge_rules`  | Get all rules for a specific judge (page limits, format, procedures)    |
| `check_compliance` | Generate compliance check parameters for the REST API (`/api/v1/check`) |

<Note>
  The same MCP server also provides three enforcement data tools for monitoring privacy enforcement
  actions across 21 jurisdictions. See [MCP: Enforcement Data](/guides/mcp-enforcement).
</Note>

## Quick start

Add the Court Rules MCP server to your client. Sample data works immediately, no API key needed.

### Claude Code

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
claude mcp add --transport http court-rules https://mcp.courtrules.app/mcp
```

### Claude Desktop

Add to your [Claude Desktop config](https://modelcontextprotocol.io/quickstart/user):

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "court-rules": {
      "url": "https://mcp.courtrules.app/mcp"
    }
  }
}
```

### Cursor

Add to `~/.cursor/mcp.json`:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "court-rules": {
      "url": "https://mcp.courtrules.app/mcp"
    }
  }
}
```

### VS Code

Add to `.vscode/mcp.json`:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "servers": {
    "court-rules": {
      "type": "http",
      "url": "https://mcp.courtrules.app/mcp"
    }
  }
}
```

### Codex CLI

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
codex mcp add court-rules --url https://mcp.courtrules.app/mcp
```

### Windsurf

Add to Windsurf MCP settings:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "mcpServers": {
    "court-rules": {
      "serverUrl": "https://mcp.courtrules.app/mcp"
    }
  }
}
```

Once connected, try asking your agent: *"What are Judge Amon's page limits for motions in EDNY?"*

## Sample vs Full access

The hosted MCP server has two access tiers:

|                   | Sample                      | Full                    |
| ----------------- | --------------------------- | ----------------------- |
| **Auth required** | No                          | OAuth 2.1               |
| **Court rules**   | 3 courts, 3 judges          | 20+ courts, 630+ judges |
| **Filters**       | Disabled                    | Full query support      |
| **Use case**      | Try before you authenticate | Production integration  |

Sample data is available immediately, no sign-up needed. Try any tool to see real court rules data before authenticating.

To upgrade to full access, sign in at [console.courtrules.app](https://console.courtrules.app) or contact [api@courtrules.app](mailto:api@courtrules.app). See [Authentication](/authentication#mcp-authentication) for setup details.

## Tool reference

### list\_courts

List all courts.

**Parameters:**

| Parameter | Type   | Description                                           |
| --------- | ------ | ----------------------------------------------------- |
| `status`  | string | Optional filter: "live", "preview", or "coming\_soon" |

**Example response:**

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
[
  { "district_id": "edny", "name": "Eastern District of New York", "judge_count": 47 },
  { "district_id": "sdny", "name": "Southern District of New York", "judge_count": 72 },
  { "district_id": "cdca", "name": "Central District of California", "judge_count": 47 },
  { "district_id": "ndca", "name": "Northern District of California", "judge_count": 43 },
  { "district_id": "sdfl", "name": "Southern District of Florida", "judge_count": 46 }
]
```

### search\_judges

Search for judges by district, name, or type.

**Parameters:**

| Parameter     | Type   | Description                                                 |
| ------------- | ------ | ----------------------------------------------------------- |
| `district_id` | string | District identifier (e.g., "edny", "sdny", "cdca")          |
| `name`        | string | Partial name match                                          |
| `judge_type`  | string | "district", "senior", "magistrate", "chief\_district", etc. |
| `limit`       | number | Max results (default 20)                                    |

**Example response:**

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
[
  {
    "judge_slug": "carol-bagley-amon",
    "judge_name": "Carol Bagley Amon",
    "judge_type": "senior",
    "district_id": "edny",
    "status": "active"
  },
  {
    "judge_slug": "frederic-block",
    "judge_name": "Frederic Block",
    "judge_type": "senior",
    "district_id": "edny",
    "status": "active"
  },
  {
    "judge_slug": "gary-r-brown",
    "judge_name": "Gary R. Brown",
    "judge_type": "district",
    "district_id": "edny",
    "status": "active"
  }
]
```

### get\_judge\_rules

Get all extracted rules for a specific judge.

**Parameters:**

| Parameter     | Type   | Required | Description                                                    |
| ------------- | ------ | -------- | -------------------------------------------------------------- |
| `judge_slug`  | string | Yes      | Judge identifier (e.g., "carol-bagley-amon", "frederic-block") |
| `district_id` | string | Yes      | District identifier (e.g., "edny")                             |

**Example response:**

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
[
  {
    "rule_id": "rule-001",
    "content": {
      "logic_type": "PageWordLimitRule",
      "summary": "Memoranda of law in support of or in opposition to motions shall not exceed 20 pages",
      "page_limit": 20,
      "trigger": { "document_type_set": ["brief_support", "brief_opposition"] },
      "source_citation": { "document": "Individual Rules", "section": "§2.B", "page": 3 }
    },
    "doc_kind": "standing_order",
    "document_date": "2024-06-15",
    "source_url": "https://www.nyed.uscourts.gov/..."
  },
  {
    "rule_id": "rule-002",
    "content": {
      "logic_type": "PageWordLimitRule",
      "summary": "Reply memoranda shall not exceed 10 pages",
      "page_limit": 10,
      "trigger": { "document_type_set": ["brief_reply"] },
      "source_citation": { "document": "Individual Rules", "section": "§2.B", "page": 3 }
    },
    "doc_kind": "standing_order",
    "document_date": "2024-06-15",
    "source_url": "https://www.nyed.uscourts.gov/..."
  },
  {
    "rule_id": "rule-003",
    "content": {
      "logic_type": "FormatConstraint",
      "summary": "All documents must be double-spaced with 12-point font and one-inch margins",
      "source_citation": { "document": "Individual Rules", "section": "§2.A", "page": 2 }
    },
    "doc_kind": "standing_order",
    "document_date": "2024-06-15",
    "source_url": "https://www.nyed.uscourts.gov/..."
  }
]
```

### check\_compliance

Generate compliance check parameters for the Court Rules REST API. This tool formats your check request; the actual compliance check runs at `api.courtrules.app/api/v1/check` (requires an API key).

**Parameters:**

| Parameter        | Type    | Required | Description                                                           |
| ---------------- | ------- | -------- | --------------------------------------------------------------------- |
| `judge_slug`     | string  | Yes      | Judge identifier                                                      |
| `district_id`    | string  | Yes      | District identifier                                                   |
| `document_scope` | string  | Yes      | Document type (brief\_support, brief\_opposition, brief\_reply, etc.) |
| `page_count`     | number  | Yes      | Total body pages                                                      |
| `word_count`     | number  | Yes      | Total word count                                                      |
| `motion_type`    | string  | No       | Motion type (Rule\_56, Rule\_12, etc.)                                |
| `is_pro_se`      | boolean | No       | Whether filer is pro se                                               |

This tool does not perform compliance checks directly. It generates the parameters and a curl example for calling the REST API.

**Example response:**

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "content": [
    {
      "type": "text",
      "text": "Compliance checking requires the REST API. Use https://api.courtrules.app/api/v1/check for live checks.\n\nYou can use the following parameters in your API call:\n{\n  \"judge_slug\": \"gary-r-brown\",\n  \"district_id\": \"edny\",\n  \"document_scope\": \"brief_support\",\n  \"page_count\": 25,\n  \"word_count\": 6500\n}\n\nExample:\ncurl -X POST https://api.courtrules.app/api/v1/check \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"judge_slug\":\"gary-r-brown\",\"district_id\":\"edny\",\"document_scope\":\"brief_support\",\"page_count\":25,\"word_count\":6500}'"
    }
  ]
}
```

## Integration patterns

### Pre-filing compliance

Check documents against judge-specific rules before filing:

```
1. get_judge_rules (judge_slug, district_id) -> show requirements during drafting
2. check_compliance (page_count, word_count, etc.) -> validate before filing
3. Surface failures and warnings in your document editor
```

This is the core workflow for legal tech platforms integrating filing compliance. Call `get_judge_rules` early in the drafting process so users see requirements before they finish writing, then call `check_compliance` as a final gate before submission.

## Error handling

MCP tool calls return errors as text content, not HTTP error codes. If a tool encounters an error (invalid parameters, database unavailable), the response will contain a descriptive error message in the `content` array:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "content": [
    {
      "type": "text",
      "text": "Error: No judge found with slug \"invalid-slug\" in district \"edny\"."
    }
  ]
}
```

Common error patterns:

* **Invalid judge\_slug**: `"No judge found with slug \"...\" in district \"...\"."`
* **Invalid district\_id**: `"No court found with ID \"...\"."`
* **Database error**: `"Error querying courts: ..."` or `"Error searching judges: ..."`

The hosted server at `mcp.courtrules.app` does not currently enforce rate limits on MCP tool calls.

## Next steps

* [REST API Quickstart](/quickstart) to run compliance checks directly via HTTP
* [Coverage Levels](/concepts/coverage-levels) to understand the three rule layers (FRCP, Local Rules, Standing Orders)
* [MCP: Enforcement Data](/guides/mcp-enforcement) for privacy enforcement tools on the same MCP server
