MCP server
GoCodebook in your AI assistant
GoCodebook's MCP server lets an AI assistant read California building codes (Title 24) and city and county zoning ordinances straight from the Code Library. Section text comes back verbatim, with a citation and a link to the full section, so the answer can be checked against the law.
Building GoCodebook into your own software instead? Use the API, which has its own prepaid balance rather than account credits.
Connect
The server is a remote MCP server using the streamable HTTP transport. Add this address wherever your assistant accepts a remote MCP server:
https://gocodebook.com/api/mcp- Claude: in Claude, open Customize → Connectors → Add custom connector and paste the address.
- Other MCP clients: add a remote server of type streamable HTTP with the same address.
The two lookup tools work immediately and need no account. The search tool asks you to connect a GoCodebook account the first time it is used — see Account and credits.
Tools
lookup_california_code_section
Free, no account
Returns the verbatim text of one section by its number — for example CRC R602.10.2.3, CBC 1004 or § 17.60.090 — with its citation, edition and a link to the full section.
Inputs: section (required), jurisdiction (a city or county slug, optional), code_edition (current, 2022 or 2019, optional)
list_california_code_documents
Free, no account
Lists the codes and local ordinances held, statewide or for one city or county, and what is not covered.
Inputs: jurisdiction (optional)
search_california_codes
Needs a GoCodebook account · 1 credit per search
Finds sections by topic when you do not have a section number — for example "minimum attic access opening" or "ADU setbacks in San Jose". Returns ranked excerpts with citations and links.
Inputs: query (required), jurisdiction, sources (federal, state, local), code_edition (all optional)
Examples
- “What does CRC R602.10.2.3 say?” uses
lookup_california_code_section. - “Does San Jose publish its municipal code here, and which documents?” uses
list_california_code_documents. - “What is the minimum attic access opening?” uses
search_california_codes.
Account and credits
Searching by topic uses 1 credit from your GoCodebook account, the same as a search on gocodebook.com — including a search that finds nothing. Reading a section by its number costs nothing. The first search opens a sign-in window; you approve access to your account email and nothing else, and you can disconnect GoCodebook in your assistant at any time. If your account has no credits, the tool says so and where to add them, and nothing is charged. Credits are an allowance of searches on your account; no payment is taken by this server.
Editions and coverage
Title 24 is read in the current edition by default. Set code_edition to 2022 or2019 to read an earlier cycle; California enforces the edition in force when the permit application was submitted, and results for an earlier edition say so. Local ordinances read the same at any date. list_california_code_documents reports exactly which codes are held and what is not covered, so a missing code is reported as missing rather than guessed.
What it does not do
- It returns code text. It does not decide whether a particular building, lot or design complies; that depends on the jurisdiction, the parcel and the other requirements that apply.
- It does not write to your account or change anything except deducting search credits.
- It does not read your conversation. The server receives only the arguments of the tool call.
Privacy
Lookups by section number are not stored. Topic searches are recorded with your account, like searches on the site. Details are in the Privacy Policy under “AI Assistant Connectors (MCP)”.
Support
Questions, problems or corrections: support@gocodebook.comor the contact page. See also how GoCodebook sources and checks its text.