# California Code [Health: Active]

**Category:** ⚖️ Legal  
**Repository:** https://github.com/pipeworx-io/mcp-california-code  
**GitHub Stars:** 0  
**npm Downloads (last month):** 1016  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/california-code

## Description
California Codes — the text of California statutes, by citation.

## Tools
Capabilities this server exposes over MCP:

- **ca_code_section** — Get the FULL TEXT of a section of the California Codes — California state statutes — by citation. "Penal Code 187" is code "PEN", section "187". Returns the statutory text, where it sits in the code, and when it was last amended. Keyless. Use for "what does California Penal Code 187 say", "text of California Civil Code 1542", or to check a California statute a contract or case relies on.
- **ca_codes** — List the 29 California codes with their subjects — Penal Code is PEN, Vehicle Code is VEH, Labor Code is LAB, and so on. Keyless. Use when you know the subject area but not which code governs it, before calling ca_code_section.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "california-code": {
    "command": "npx",
    "args": ["-y","@pipeworx/mcp-california-code"]
  }
}
```

## Documentation

## What California Code does

California Code provides citation-based access to the text of California's 29 statutory codes through MCP. The underlying source is California Legislative Information at leginfo.legislature.ca.gov, and the statutes are public records. A request can identify a code such as `PEN` and a section such as `187`, returning the statute along with its position in the code and the section's amendment information.

The service retrieves sections directly instead of maintaining a local mirror of the state's bulk data. This makes it suitable for agents that need an individual provision or a code index while avoiding local corpus storage and scheduled bulk refreshes.

## How it works

The hosted MCP endpoint is:

```text
https://gateway.pipeworx.io/california-code/mcp
```

A client can also call the tools through the gateway's HTTP API. For local MCP clients, the `@pipeworx/mcp-california-code` npm package acts as a stdio bridge and forwards requests to the same hosted endpoint. The bridge needs network access and has no offline mode.

The pack endpoint lists its California Code tools by default. Pipeworx gateway meta-tools can be enabled for the local bridge with `PIPEWORX_META_TOOLS=1`; these include routing and discovery functions shared across the gateway. The full gateway endpoint is also available when an agent needs direct access to other data packs.

## Setup and configuration

For a remote MCP connection, add the hosted URL to the client's MCP configuration:

```json
{
  "mcpServers": {
    "california-code": {
      "url": "https://gateway.pipeworx.io/california-code/mcp"
    }
  }
}
```

The npm bridge can be configured with `npx`:

```json
{
  "mcpServers": {
    "california-code": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-california-code"]
    }
  }
}
```

Anonymous use is capped at 50 calls per day. A free Pipeworx account increases the allowance to 200 calls per day; pass the account key as `PIPEWORX_API_KEY`. Requests use a Bearer token when a key is configured. Behind an HTTPS proxy, Node's built-in fetch may require `NODE_USE_ENV_PROXY=1` on Node versions that support that option.

## Tools and capabilities

- `ca_code_section` accepts a code and section citation and returns the complete statutory text, its location in the code hierarchy, and the date or act associated with its last amendment.
- `ca_codes` lists all 29 codes with their subjects. Subject filtering can map a concept such as divorce to the Family Code identifier, `FAM`.
- The HTTP API exposes individual tool calls, including `ca_code_section`, without requiring an MCP client.

## Limitations and notes

California's upstream site can return a successful HTTP response containing page furniture instead of an error for a nonexistent section. California Code checks for the missing content container and reports `section_not_found` rather than treating that page as statutory text.

Subdivisions are not separate source documents. A request such as `187(a)` is reduced to section `187`, and the response indicates that normalization. Section numbers are also not continuous; repealed and reserved numbers create legitimate gaps.

The `last_affected` value applies to the individual section, providing section-level amendment information rather than only identifying an annual code edition. The integration is independent and unofficial, and is not affiliated with or endorsed by California's upstream publisher.

_Full upstream README: https://allmcps.com/mcp/california-code/readme_

