# Danish addresses in Claude, Cursor and other AI tools with MCP

> Install @danadresse/mcp-server or use the hosted MCP server in Claude, Cursor and other clients, see the tools, and know the MCP quota.
>
> https://danadresse.dk/en/guides/mcp-server · verified 2026-11-02
The Model Context Protocol (MCP) is a standard that lets an AI assistant call tools. With `@danadresse/mcp-server`, Claude, Cursor and other MCP clients can look up Danish addresses, clean them, find the nearest address to a coordinate, and fetch administrative areas and property data.

The server runs locally on your machine through `npx` and calls our API with your key. You need Node 18.17 or newer. If you would rather not install anything, use the hosted server at `https://api.danadresse.dk/mcp` (see below).

## 1. Create and test a key

Create a *live* key under [Keys](/dashboard/keys). Do not use a test key or a domain-locked browser key. Both work for address lookups, but the tools for DAGI, property data, distance and quality score call `/api/v1/enrich/…`, and there they answer `403` (`sandbox_scope` or `browser_key_scope`).

Check the key before you configure the client:

```bash id=check-key run=live expect="forslagstekst"
curl -s "https://api.danadresse.dk/autocomplete?q=R%C3%A5dhuspladsen%201&per_side=1" \
  -H "X-Api-Key: $DANADRESSE_API_KEY"
```

## 2. Add the server to your client

The server reads three environment variables:

| Variable | Default | Purpose |
|---|---|---|
| `DANADRESSE_API_KEY` | – | Required. Without it every call gets `401` |
| `DANADRESSE_API_URL` | `https://api.danadresse.dk` | Only for testing against another address |
| `DANADRESSE_TIMEOUT_MS` | `15000` | Timeout per call in milliseconds |

### Claude Desktop

Edit `claude_desktop_config.json`. On macOS it is in `~/Library/Application Support/Claude/`, on Windows in `%APPDATA%\Claude\`:

```json id=claude-desktop run=syntax
{
  "mcpServers": {
    "danadresse": {
      "command": "npx",
      "args": ["-y", "@danadresse/mcp-server"],
      "env": {
        "DANADRESSE_API_KEY": "dawa_live_your_key"
      }
    }
  }
}
```

Restart Claude Desktop. `danadresse` should now be listed among the tools.

### Claude Code

Add the server from the terminal:

```bash id=claude-code-add run=no
claude mcp add danadresse \
  --env DANADRESSE_API_KEY=dawa_live_your_key \
  -- npx -y @danadresse/mcp-server
```

To share the setup with your team through the repository, put a `.mcp.json` in the project root. Claude Code fills in `${DANADRESSE_API_KEY}` from the environment, so the key does not end up in Git:

```json id=claude-code-mcp-json run=syntax
{
  "mcpServers": {
    "danadresse": {
      "command": "npx",
      "args": ["-y", "@danadresse/mcp-server"],
      "env": {
        "DANADRESSE_API_KEY": "${DANADRESSE_API_KEY}"
      }
    }
  }
}
```

### Cursor

Put the configuration in `~/.cursor/mcp.json` (for every project) or `.cursor/mcp.json` in a project:

```json id=cursor-mcp-json run=syntax
{
  "mcpServers": {
    "danadresse": {
      "command": "npx",
      "args": ["-y", "@danadresse/mcp-server"],
      "env": {
        "DANADRESSE_API_KEY": "dawa_live_your_key"
      }
    }
  }
}
```

Other clients that support MCP over stdio work the same way: the command is `npx -y @danadresse/mcp-server`, and the key is passed as an environment variable.

### Hosted server without installing anything

If you do not have Node, or you use Claude.ai, ChatGPT or n8n, connect the client directly to our hosted MCP server at `https://api.danadresse.dk/mcp`. It uses Streamable HTTP and only answers `POST`. Sign in with your own key in `X-Api-Key` or `Authorization: Bearer`. Clients that cannot set headers (the connector screens in Claude.ai and ChatGPT) can put the key in the URL as `?api_key=`. Create a separate key for that, so you can revoke it on its own.

In Claude Code:

```bash id=remote-claude-code run=no
claude mcp add --transport http danadresse https://api.danadresse.dk/mcp \
  --header "X-Api-Key: $DANADRESSE_API_KEY"
```

Check that the server answers with your key. `tools/list` does not count as a call:

```bash id=remote-tools-list run=live expect="quota_status"
curl -s -X POST "https://api.danadresse.dk/mcp" \
  -H "X-Api-Key: $DANADRESSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

The setup for Claude.ai, ChatGPT, Cursor, VS Code and n8n is on the [AI page](/en/ai).

## 3. Know the tools

The server gives the assistant eleven tools. The hosted server has the same ones plus a twelfth, `quota_status`, which shows the key's MCP and API usage this month:

| Tool | Does | Calls |
|---|---|---|
| `autocomplete_address` | Search addresses from partial text, tolerates typos | `/autocomplete` |
| `lookup_address` | Fetch an address by its id | `/adresser/{id}` |
| `validate_address` | Clean an address and give category A, B or C | `POST /datavask/adresser` |
| `reverse_geocode` | Find the nearest address to a coordinate (WGS84 or ETRS89) | `/adgangsadresser/reverse` |
| `enrich_with_dagi` | Parish, police district, court district, region and more for an adgangsadresse | `/api/v1/enrich/adresser/{id}/dagi` |
| `property_data` | Property data for an adgangsadresse: BFE, valuation, planning, energy label, elevation, BBR | `/api/v1/enrich/adresser/{id}/ejendom` |
| `distance_between` | Distance and bearing between two adgangsadresser | `/api/v1/enrich/distance` |
| `address_quality_score` | Score 0–100 for how complete and plausible a partial address is | `POST /api/v1/enrich/quality/score` |
| `list_postnumre` | Postcodes, search by name or number | `/postnumre` |
| `list_kommuner` | Municipalities, search by name or code | `/kommuner` |
| `list_vejnavne` | Street names across the country | `/vejnavne` |

`enrich_with_dagi`, `property_data` and `distance_between` need adgangsadresse ids. A suggestion from `autocomplete_address` is usually an adresse (with floor and door), and its adgangsadresse id is in `data.adgangsadresseid`. The assistant normally works this out, but mentioning it helps if it gets `404`.

## 4. Know the MCP quota

Calls from the MCP server have their own monthly quota, separate from the API quota. The server sends a `User-Agent` starting with `danadresse-mcp`, and that is what we count on. Calls through the hosted server count in the same quota:

| Plan | MCP calls per month |
|---|---|
| Hobby | 250 |
| Basis | 5,000 |
| Pro | 25,000 |
| Enterprise | 200,000 |

On Hobby the MCP quota is a ceiling. After the quota and a grace buffer of 20 %, the API answers `429 quota_exceeded` until next month, while your ordinary API calls carry on. One message to the assistant can lead to several tool calls, because it often searches first and then looks up or enriches.

The server retries `429`, `502`, `503` and `504` itself with backoff. If you still get errors, check usage in the [dashboard](/dashboard/usage).

## 5. Try it

Example messages that use the tools:

```text id=example-prompts run=no
Find the address Rådhuspladsen 1 in Copenhagen, and tell me which parish and police district it belongs to.

What is the nearest address to the GPS point 55.6761, 12.5683?

Clean this address from a CRM: "Raadhuspladsn 1, 1550 Kbh V". Is it safe enough to store?

How far is it in a straight line between Strandvejen 100, 2900 Hellerup and Rådhuspladsen 1, 1550 København V?

Which town has postcode 8000, and which municipality has code 0751?
```

The assistant picks the tools itself. In Claude Desktop and Claude Code you can see each call and its result before it is used in the answer.

## Next steps

- The MCP platform page: [/integrationer/mcp](/en/integrationer/mcp).
- Keep an eye on the quota: [Monitor usage](/en/guides/overvaag-forbrug).
- Change the key without downtime: [Rotate API keys](/en/guides/roter-noegler).
