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.

5 min Level: Beginner ✓ Code tested

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

Shell#check-key
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:

VariableDefaultPurpose
DANADRESSE_API_KEY–Required. Without it every call gets 401
DANADRESSE_API_URLhttps://api.danadresse.dkOnly for testing against another address
DANADRESSE_TIMEOUT_MS15000Timeout 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#claude-desktop
{
  "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:

Shell#claude-code-add
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#claude-code-mcp-json
{
  "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#cursor-mcp-json
{
  "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:

Shell#remote-claude-code
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:

Shell#remote-tools-list
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.

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:

ToolDoesCalls
autocomplete_addressSearch addresses from partial text, tolerates typos/autocomplete
lookup_addressFetch an address by its id/adresser/{id}
validate_addressClean an address and give category A, B or CPOST /datavask/adresser
reverse_geocodeFind the nearest address to a coordinate (WGS84 or ETRS89)/adgangsadresser/reverse
enrich_with_dagiParish, police district, court district, region and more for an adgangsadresse/api/v1/enrich/adresser/{id}/dagi
property_dataProperty data for an adgangsadresse: BFE, valuation, planning, energy label, elevation, BBR/api/v1/enrich/adresser/{id}/ejendom
distance_betweenDistance and bearing between two adgangsadresser/api/v1/enrich/distance
address_quality_scoreScore 0–100 for how complete and plausible a partial address isPOST /api/v1/enrich/quality/score
list_postnumrePostcodes, search by name or number/postnumre
list_kommunerMunicipalities, search by name or code/kommuner
list_vejnavneStreet 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:

PlanMCP calls per month
Hobby250
Basis5,000
Pro25,000
Enterprise200,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.

5. Try it

Example messages that use the tools:

Text#example-prompts
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

Related guides

Markdown source Spotted an error? Tell us API-reference (Swagger)

Try it with a free key

2,000 calls/month on the free plan. No credit card.

Create account →