Skip to main content

Estate Atlas: SD-MCP

The first and only Model Context Protocol server for the San Diego Municipal Code — built so any AI agent (Claude, Cursor, custom) can query SD's regulatory data with citations, freshness guarantees, and machine-readable structure that no government source publishes.

Status: v0.1 — pilot. Read-only. STDIO transport. Maintained by Estate Atlas. Powered by the same fresh data pipelines used by our property-intelligence product. Embeddings: Voyage AI voyage-4-large — Anthropic's embedding partner.


What you can ask it

> "What are the fence height rules for an RS-1-7 lot?"
> "Show me all the active permits on APN 535-095-05-00."
> "What's the rear setback for RM-1-1?"
> "Find bulletins about ADUs."
> "When was the municipal code last updated?"

Tools

Tool Purpose
search_municipal_code Semantic search across SDMC, bulletins, ordinances
get_code_section Fetch a specific section by number (e.g. 142.0610)
get_table_of_contents Browse the code structure
list_bulletins Discover DSD information bulletins
get_bulletin Fetch a specific IB by number
lookup_parcel Address or APN → zoning, overlays, lot, assessor
get_permits_for_parcel Permit history for a parcel
get_violations_for_parcel Code-enforcement cases for a parcel
get_setbacks_for_zone Setbacks, FAR, height limits by zone code
get_zone_info Higher-level zone summary
data_freshness Per-source last-update + SLA cadence
get_case_rulings (Stub — v2) Court rulings affecting SD land use

Every response includes a _meta envelope with source, data_as_of, freshness_sla, citations (with PDF page anchors where available), and license. This is the differentiator — no government source publishes machine-readable freshness or citations.


Install

Claude Desktop

Edit your Claude Desktop config at ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "sandiego-municipal-code": {
      "command": "uvx",
      "args": ["sandiego-municipal-code-mcp"],
      "env": {
        "SANDIEGO_MCP_DATABASE_URL": "postgresql://readonly@db.estateatlas.ai/sandiego_public",
        "SANDIEGO_MCP_VOYAGE_API_KEY": "pa-..."
      }
    }
  }
}

Restart Claude Desktop. You should see "sandiego-municipal-code" in the MCP indicator.

Claude Code

In ~/.claude/settings.json or a project .mcp.json:

{
  "mcpServers": {
    "sandiego-municipal-code": {
      "command": "uvx",
      "args": ["sandiego-municipal-code-mcp"],
      "env": {
        "SANDIEGO_MCP_DATABASE_URL": "postgresql://...",
        "SANDIEGO_MCP_VOYAGE_API_KEY": "pa-..."
      }
    }
  }
}

Cursor / Continue / Other MCP-aware tools

Use the same JSON above; check your editor's MCP docs for the config path.

From source (development)

git clone https://github.com/estate-atlas/sandiego-mcp
cd sandiego-mcp
uv venv --python 3.11
uv pip install -e ".[dev]"
.venv/bin/sandiego-municipal-code-mcp  # runs server over STDIO

Environment variables

Var Required Default Purpose
SANDIEGO_MCP_DATABASE_URL yes — Postgres connection string (read-only role). Falls back to DATABASE_URL.
SANDIEGO_MCP_VOYAGE_API_KEY yes — Voyage AI key for query embeddings (voyage-4-large). Falls back to VOYAGE_API_KEY. Get one free at voyageai.com.
SANDIEGO_MCP_EMBEDDING_MODEL no voyage-4-large Override the embedding model (must match the model the DB was re-indexed with).
SANDIEGO_MCP_EMBEDDING_DIM no 1024 Override the embedding dimension.
SANDIEGO_MCP_LOG_LEVEL no INFO DEBUG / INFO / WARNING / ERROR. Logs go to stderr (stdout is the MCP transport).

Public read-only database (coming soon)

The hosted endpoint db.estateatlas.ai/sandiego_public will provide free, rate-limited access to all the data this MCP server exposes. Until that ships, you can:

  1. Run your own Supabase replica with the schemas under david/backend/db/
  2. Email hello@estateatlas.ai for a private beta credential

Data sources + refresh cadence

Source Records Refresh
San Diego Municipal Code 1,966 docs / 27k chunks Monthly
Information Bulletins 456 docs Monthly
Building Permits 240k Weekly (Accela API)
Code Enforcement 17.4k Weekly
Parcels 1.09M Quarterly
Zoning Parcels varies Quarterly
Zone Setbacks 21 zones On ordinance change

Refresh is automated via GitHub Actions in the upstream Estate Atlas data repo. The MCP server source code lives at estate-atlas/sandiego-mcp.


Roadmap

  • v0.1 (now) — STDIO transport, 11 tools, read-only, BYO DB credentials
  • v0.2 — Public read-only hosted endpoint (free tier + rate limit)
  • v0.3 — Court rulings ingestion (CourtListener integration)
  • v1.0 — Hosted HTTP/SSE transport, bearer-token auth, billing tiers
  • v1.x — San Diego County → other CA cities → other states

License

MIT. Municipal data is public-domain (City of San Diego). The MCP envelope, citations layer, and freshness SLA are © Estate Atlas.

Citing

If your agent's output is consumed for any regulatory or legal decision, the _meta.citations[] field gives you the verifiable source. We recommend always surfacing source_pdf_url to the human consumer.

Metadata

Release files for sandiego-municipal-code-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sandiego-municipal-code-mcp 0.1.0
File Size Uploaded Provenance Actions
sandiego_municipal_code_mcp-0.1.0.tar.gz 39.8 kB Without provenance Details for sandiego_municipal_code_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sandiego-municipal-code-mcp 0.1.0
File Interpreter ABI Platform Actions
sandiego_municipal_code_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for sandiego_municipal_code_mcp-0.1.0-py3-none-any.whl

Total release size: 74.8 kB

Release files / sandiego_municipal_code_mcp-0.1.0.tar.gz

Download URL sandiego_municipal_code_mcp-0.1.0.tar.gz
Size 39.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d1c4a47bdaf59de8e343e6c3b0a8682b7c4db4f33f19c658e93ce43181d9bd8f
BLAKE2b-256 checksum
How to use checksums
ab5024d2602f6337d9e1fa1ad14f4fbc7d726fb0ef53767f09bdbc2d1de06273
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / sandiego_municipal_code_mcp-0.1.0-py3-none-any.whl

Download URL sandiego_municipal_code_mcp-0.1.0-py3-none-any.whl
Size 35.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e650e288782fb62f623ad318525a61443efc5cd37bb06701e498a42a31e24f87
BLAKE2b-256 checksum
How to use checksums
c480bd0863af90934d65bddedd7b707ee9f526fa3854b7326ccbf03ef2903586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for sandiego-municipal-code-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page