California Code logo

California Code

Look up California statutes by code and section, including statutory text, code location, and section amendment history.

Install California Code

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "california-code": {
      "command": "npx",
      "args": [
        "-y",
        "@pipeworx/mcp-california-code"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 2 tools correctly (9d ago).

Overview

California Code connects MCP clients to California Legislative Information for citation-based statute lookups. Its two primary tools list the state's 29 codes and retrieve a section's full text, position in the code, and latest section-level amendment record. Reach for it when an agent needs primary California statutory text rather than case law or bulk corpus search. Hosted MCP and local npm bridge options are available, with no authentication required for anonymous use.

Use cases

  • Retrieve the text of a California statute by citation
  • Find the code identifier for a subject such as divorce
  • Check where a section appears in the California code hierarchy
  • Inspect the latest amendment information for a section
  • Validate whether a cited California section exists

Key features

  • Citation-based California statute lookup
  • Full statutory text retrieval
  • Code hierarchy and section location
  • Per-section amendment metadata
  • Subject-filterable index of 29 codes
  • Hosted MCP and local stdio access

Tools2

What California Code lets your agent do. Expand a tool for its parameters.

Verified live~335 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

9/9 checks healthy over the last 44d

What it can do

From the 2 tools this server returned when we ran it; 2 declare their own safety hints.

Makes network requests · 2Read-only tools · 2
Network at startup4 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age40 days
Maintainers1

Observed 2026-11-03 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 14d ago via OSV.dev · @pipeworx/mcp-california-code (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads1kPackage downloads in the last 30 days.
Last commit3d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed2Callable tools this server registers over MCP.

How California Code works

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:

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

The npm bridge can be configured with npx:

config.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.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about California Code

California Code is an MCP server that connects AI clients to California Legislative Information and exposes tools for listing the state's 29 codes and retrieving statutory sections. Its main tools, `ca_codes` and `ca_code_section`, support subject filtering, full text, code location, and section-level amendment details.

Add the hosted MCP URL to your client, or run the npm bridge with `npx -y @pipeworx/mcp-california-code`. The hosted endpoint is `https://gateway.pipeworx.io/california-code/mcp`; the local bridge forwards calls to it and requires network access.

Yes, California Code can be added to Cursor using the hosted MCP URL or the local npm stdio configuration. Anonymous access requires no key and is limited to 50 calls per day; a Pipeworx API key raises the allowance to 200 calls per day.

Call `ca_code_section` with the code and section, such as `{ "code": "PEN", "section": "187" }`. The result includes the full text, its location in the code, and the section's latest amendment information.

Yes, use `ca_codes` with a subject filter. A search for a subject such as divorce can identify the Family Code identifier, `FAM`, which you can then use with `ca_code_section`.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCalifornia Code AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/california-code?style=directory)](https://allmcps.com/mcp/california-code)
HTML Embed
<a href="https://allmcps.com/mcp/california-code"><img src="https://allmcps.com/api/badge/california-code?style=directory" alt="California Code on AllMCPs" /></a>