# Claude Code + Cadastre

> Connect Claude Code to Cadastre's real-estate data through the remote MCP server: setup, sign-in, example prompts and troubleshooting.

Anthropic's agentic coding tool, in the terminal. Connect it to Cadastre, the data source for real-estate data except listings, and it can screen and rank all 393 U.S. metro areas, read metro profiles and compare them, with every figure's source attached.

Works with Cadastre through: the MCP server, the API with a key, and the Cadastre CLI.

## Quick start

### 1. Install Claude Code

Install it with Anthropic's [setup guide](https://code.claude.com/docs/en/setup).

### 2. Add the Cadastre MCP server

Run this in a terminal. It adds the server for the current project; for every project, put `--scope user` before the URL.

```sh
claude mcp add --transport http cadastre https://getcadastre.com/mcp
```

That is all: no account or sign-in is needed for Cadastre's public datasets, at 30 requests a minute. For higher limits, see [Sign in for higher limits](#sign-in-for-higher-limits).

### 3. Ask

Start `claude` in any folder and ask, for example:

```text
Use Cadastre to find metros with population over 500K, manufacturing share of GDP over 8% and unemployment under 5.5%. Rank them on manufacturing share and cite the sources.
```

## Sign in for higher limits

Optional. To sign in, connect through the server's sign-in address in place of `https://getcadastre.com/mcp` (MCP clients sign in only when the server asks them to):

```text
https://getcadastre.com/mcp?auth=required
```

Start `claude`, run `/mcp`, choose **cadastre** and follow the steps in your browser. Or sign in from the shell:

```sh
claude mcp login cadastre
```

Your browser opens Cadastre's **Connect an app** page. Sign in to Cadastre (or [join](https://getcadastre.com/signup) first), choose the account Claude Code should work in, and select **Approve**. Claude Code keeps its own access and renews it: there is no API key to copy.

The higher limits need API access turned on for the account: the page marks any account without it, and it cannot be chosen. Write to support@getcadastre.com to ask for it.

## MCP configuration

| Setting | Value |
| --- | --- |
| Server URL | `https://getcadastre.com/mcp` |
| Sign-in URL | `https://getcadastre.com/mcp?auth=required` (optional, for higher limits) |
| Transport | Streamable HTTP |
| Sign-in | None needed for the public datasets; OAuth 2.1 in the browser for higher limits, no API keys to manage |
| Access | Read only: datasets, measures, metro figures, screens and rankings |

If you sign in, the sign-in is for one account, which needs API access turned on for the higher limits: if you belong to several, you choose which one Claude Code works in. It can read data and run screens and rankings; it cannot open your projects or change anything in your account. It stops working if you leave that account, and until you accept updated Terms of Service. Disconnect it any time in [Settings](https://getcadastre.com/account) under **Authorized apps**. The tools the server offers are described on the [MCP server](https://getcadastre.com/docs/mcp) page.

## Use the CLI or the API instead

Claude Code can also run the Cadastre CLI, `cadastre`, in a terminal: it screens, ranks and compares metros and prints every answer's attribution, and `--json` gives the API's own answer. Install it; it works without signing in, and `cadastre login` (in the browser) gives higher limits:

```sh
curl -fsSL https://raw.githubusercontent.com/waratuman/cadastre-cli/main/install.sh | sh
cadastre metros --state TX
```

`cadastre mcp add claude-code` prints a setup for Claude Code, and with `--write` makes it for you. See the [CLI docs](https://getcadastre.com/docs/cli).

Or call the API directly from a script or the shell, with no credential at all:

```sh
curl "https://getcadastre.com/api/v1/metros/compare?ids=26620,48620,46140"
```

For higher limits, make an API key in [Settings](https://getcadastre.com/account) under **API keys**, keep it in an environment variable rather than in a file the agent might share, and send it as a bearer token:

```sh
export CADASTRE_API_KEY=cad_key_...
curl -H "Authorization: Bearer $CADASTRE_API_KEY" "https://getcadastre.com/api/v1/metros/compare?ids=26620,48620,46140"
```

The [API reference](https://getcadastre.com/docs/api) lists every endpoint. The higher limits need API access turned on for the account, as for the MCP server.

## Example prompts

### Shortlist metros for a plant

```text
Shortlist US metros for an aerospace assembly plant: at least 500K people, manufacturing at least 8% of GDP, unemployment under 5.5% and industrial power under 10 cents per kWh. Rank the survivors on manufacturing share and unemployment, and list the sources with their retrieval dates.
```

### Compare three metros on labor

```text
Compare Huntsville, AL, Wichita, KS and Tulsa, OK on labor: unemployment rate, manufacturing employment growth, labor force growth and population. Make a table with each figure's vintage and source, and say which figures Cadastre computed.
```

### Cheap power, growing manufacturing

```text
Which metros have the lowest industrial electricity price and growing manufacturing employment? Show the ten best with the price, the employment growth and the years it covers.
```

### Profile one metro

```text
Give me Cadastre's profile of the Wichita, KS metro: population, GDP, manufacturing share, unemployment, power price and natural hazard risk, each with its source.
```

## Common workflows

- **Shortlist, then rank.** Screen the metros on hard requirements first (the funnel says how many each one removes), then rank the survivors on weighted criteria. Ask the agent to show the funnel so you can see which requirement bites.
- **Compare a shortlist.** Give the agent three to five metros by name or CBSA code and the measures you care about; it reads them side by side and can put them in a table for a client.
- **Look up before you ask.** When a measure is ambiguous (growth over which years? which unemployment rate?), ask the agent to search the measures first and tell you which one it will use.
- **Draft a client note.** Have the agent write up a shortlist with every figure's source, vintage and retrieval date, and Cadastre's computed values labelled as such, then check the figures against the answers before you send it.

## Tips

- **Carry the attribution.** Every answer lists the credit, licence and notices its sources require, and `retrieved_at`, when Cadastre last retrieved the data. Ask Claude Code to keep them with the figures in anything it writes for you; the [Terms of Service](https://getcadastre.com/terms#api) make it a condition, and [Rights and attribution](https://getcadastre.com/docs/rights) explains each source.
- **Label Cadastre's computed values.** A value marked `computed_by_cadastre` (such as a metro figure built from county figures) is Cadastre's, credited as "Source: Cadastre, computed from" the publisher's data.
- **Check before you rely on it.** An assistant can misread or misstate a figure or a credit. Compare what it tells you with the tool's own answer before you pass it on.
- **Mind the rate limits.** Without a sign-in, 30 requests a minute and 2,000 a day for each network address. Signed in, 60 requests a minute and 10,000 a day for each app you connect, and 50,000 a day for the account. Ask for a comparison or a screen in one go rather than metro by metro.
- **Name metros precisely.** "Wichita, KS" or its CBSA code (48620) avoids a wrong match.
- `claude -p` (non-interactive) cannot open the sign-in: sign in once in an interactive session first.
- `claude mcp logout cadastre` forgets the sign-in; `claude mcp remove cadastre` removes the server.

## FAQ

### What data does Cadastre have?

Public market, labor, demographic, infrastructure, hazard and health datasets from U.S. federal agencies, for the 393 U.S. metro areas, many also for counties and states. [Datasets](https://getcadastre.com/docs/datasets) lists each one with its publisher, licence, period and measures. Only datasets whose terms allow it are served to agents.

### Does it have listings or parcels?

No listings: Cadastre does not carry them. Parcel data is not available yet; the launch is metro-level.

### Can it return boundaries or maps?

No. Answers carry names and codes (CBSA codes, FIPS), never boundaries, points or lines.

### What does it cost?

The API and the MCP server are in beta and free while they are. The public datasets need no account; for higher limits, [join now](https://getcadastre.com/signup), then write to support@getcadastre.com to ask for API access, which may become part of a paid plan later.

### What may I do with the answers?

Use them in your own work and for your clients, with the attribution carried, and not to rebuild Cadastre's data as a product of your own. See the [Terms of Service](https://getcadastre.com/terms#api).

## Troubleshooting

| What you see | What to do |
| --- | --- |
| 401, or the server shows as needing sign-in | Sign in again (see Sign in for higher limits), or connect through `https://getcadastre.com/mcp` without signing in. Access lapses if you disconnect the app, change your password or leave the account, after 30 days without use, and 90 days after you approved it. |
| 403 `terms_required` (some clients show it as needing sign-in again) | Cadastre's Terms of Service were updated. Sign in at https://getcadastre.com in a browser and accept them; the agent works again at once. |
| 429 `rate_limited` | Over a rate limit. Wait for the time the answer gives (`Retry-After`), and ask for fewer, larger requests. Without a sign-in, sign in for higher limits; signed in but still at the lower limits, the account needs API access: write to support@getcadastre.com. |
| A metro or measure is not found | Ask the agent to search for it first (by name, CBSA code or measure label); a dataset not served to agents is absent. |
| No Cadastre tools appear | Check the server URL is exactly `https://getcadastre.com/mcp`, then restart Claude Code. |

Still stuck? Write to support@getcadastre.com.

## Related agents

- [Codex](https://getcadastre.com/agents/codex): OpenAI's coding agent: the Codex CLI, the IDE extension and the ChatGPT desktop app share one MCP configuration.
- [Cursor](https://getcadastre.com/agents/cursor): An AI code editor with an agent that can call MCP tools.
- [GitHub Copilot in VS Code](https://getcadastre.com/agents/vscode): Copilot's agent in Visual Studio Code.
- [Claude](https://getcadastre.com/agents/claude): Anthropic's assistant on claude.ai and in the Claude desktop app, through a custom connector.
- [ChatGPT](https://getcadastre.com/agents/chatgpt): OpenAI's assistant, through a custom MCP server added as a plugin on the web.
- [Gemini CLI](https://getcadastre.com/agents/gemini-cli): Google's open-source AI agent for the terminal.
- [OpenCode](https://getcadastre.com/agents/opencode): An open-source AI coding agent for the terminal.

## Sources

This guide's setup steps follow Claude Code's own documentation. If a step no longer matches, theirs is current:

- [Claude Code: Connect to tools via MCP](https://code.claude.com/docs/en/mcp)
- [Claude Code: Set up](https://code.claude.com/docs/en/setup)
