Skip to content

Tools

Register lookup Beta

Beta: in use, and details can still change.

Register lookup is in Beta. It is an MCP server that lets your AI assistant look up public Danish registers: CVR, Retsinformation, Danmarks Statistik and Folketinget. Every tool reads; none of them changes data. Register lookups use no AI and do not count towards AI usage or the organisation's monthly AI spending cap.

Register lookup has its own address and is not part of api.komplai.dk, so it has no page in the API reference. It speaks the Model Context Protocol over Streamable HTTP.

  • Address: https://mcp.komplai.dk/mcp
  • Transport: MCP Streamable HTTP, with POST, GET and DELETE on the same address
  • Authentication: Authorization: Bearer with a personal API key (kp_live_...) that has the scope mcp:read

Before you start

  • Your organisation has Register lookup in its agreement, and an administrator has given you access to it under Organisation › People › Tool access in the hub.
  • You have a personal API key with mcp:read. In the hub, open Register lookup (/modules/mcp) and choose Create a key for Register lookup, or create the key on the API keys page at hub.komplai.dk/api-access. An organisation integration key (kp_org_...) is refused with integration_not_permitted.
  • Use test data only while Register lookup is in beta.

Connect VS Code

The Register lookup page in the hub shows the same configuration with a copy button. It contains no key.

  1. Create a personal key with mcp:read.
  2. In VS Code, run MCP: Open User Configuration and merge the configuration below into your existing settings.
  3. Start the server. VS Code asks for the key in a hidden field, so it never ends up in a file.
mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "komplai-api-key",
      "description": "komplai personal API key (mcp:read)",
      "password": true
    }
  ],
  "servers": {
    "komplai": {
      "type": "http",
      "url": "https://mcp.komplai.dk/mcp",
      "headers": {
        "Authorization": "Bearer ${input:komplai-api-key}"
      }
    }
  }
}

The configuration works in the VS Code extension host, not in Agent Host sessions. Other clients work if they support Streamable HTTP and a personal Bearer header; MCP clients covers them.

Try it with curl

An MCP client does these steps for you. With curl you can see each one.

Start a session with initialize. -i shows the response headers, where Mcp-Session-Id carries the session's id:

Shell
curl -i https://mcp.komplai.dk/mcp \
  -H "Authorization: Bearer $KOMPLAI_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-03-26", "capabilities": {}, "clientInfo": {"name": "curl", "version": "1"}}}'

Put the id in KOMPLAI_MCP_SESSION_ID, confirm the session with the initialized notification, and call a tool. This one searches Retsinformation:

Shell
curl https://mcp.komplai.dk/mcp \
  -H "Authorization: Bearer $KOMPLAI_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Mcp-Session-Id: $KOMPLAI_MCP_SESSION_ID" \
  -H "MCP-Protocol-Version: 2025-03-26" \
  -d '{"jsonrpc": "2.0", "method": "notifications/initialized"}'

curl https://mcp.komplai.dk/mcp \
  -H "Authorization: Bearer $KOMPLAI_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Mcp-Session-Id: $KOMPLAI_MCP_SESSION_ID" \
  -H "MCP-Protocol-Version: 2025-03-26" \
  -d '{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "retsinfo_search", "arguments": {"query": "forvaltningsloven", "limit": 3}}}'

The answer arrives as a server-sent event: a data: line with the JSON-RPC result, whose content holds the tool's result as JSON text. tools/list instead of tools/call lists every tool with its input schema.

Close the session when you are done. Closing a session does not revoke the key.

Shell
curl -X DELETE https://mcp.komplai.dk/mcp \
  -H "Authorization: Bearer $KOMPLAI_TOKEN" \
  -H "Mcp-Session-Id: $KOMPLAI_MCP_SESSION_ID" \
  -H "MCP-Protocol-Version: 2025-03-26"

Tools

ToolRegisterWhat it returnsWhere the lookup goes
cvr_lookupCVRA company by CVR number or name: name, address, industry code, employees, company type, bankruptcy flag and ownerscvrapi.dk
retsinfo_searchRetsinformationLaws, executive orders and circulars as citations: title, type, ministry, date and link. Not the text of the law.retsinformation.dk
dst_find_tablesDanmarks StatistikStatistics tables by keyword, with id, coverage, unit and periodapi.statbank.dk
dst_describe_tableDanmarks StatistikA table's variables and the value codes each one acceptsapi.statbank.dk
dst_get_dataDanmarks StatistikFigures from a table for the variable codes you chooseapi.statbank.dk
oda_search_casesFolketingetParliamentary cases by title: type, status, resolution and last updateoda.ft.dk
oda_get_entityFolketingetRows of Folketinget's open data: cases, documents, people and bodies, votes, sittingsoda.ft.dk
komplai_detectRedactPersonal data in a text, found with rules onlyWithin the service
komplai_redactRedactThe text with labels such as [CPR-1], and the list of labelsWithin the service
komplai_rehydrateRedactThe text with the originals put back from the list of labelsWithin the service
list_connectorsEvery connector on the server and where its data goes
  • CVR is a public register, but for small companies the registered contact details and owner names belong to private individuals: treat them as personal data. When marketing_protected is true, the company has opted out of marketing use.
  • The komplai_ tools also need redact:detect on the same key and access to Redact in your organisation. They use rules only, so they do not find names. The server does not keep the list of labels: komplai_rehydrate needs the list that komplai_redact returned. komplai_detect and komplai_redact take up to 50,000 characters per call. For names and longer texts, use Redact through the API.

Sessions and limits

  • Every request, also GET and DELETE, carries the personal key. A key in the address is refused: the URL may have no query string.
  • The first request is a POST with initialize. The session is bound to your organisation, to you and to the key; another key cannot use it. Revocation, expiry and withdrawn access are checked on every request and again when a tool runs.
  • At most 5 sessions per key and 500 on the server. A session ends after 30 minutes without activity.
  • A request body may have at most 4 MiB. The server has its own limit on HTTP requests per minute, and each tool call also counts against your account's request limits.

When a request is refused

Refusals come as a JSON body with error:

StatuserrorWhat to do
400query_credentials_not_supportedRemove the query string. Send the key in the Authorization header.
400initialize_requiredStart a session with a POST of initialize.
400invalid_sessionSend Mcp-Session-Id once.
401api_key_requiredSend Authorization: Bearer with your personal key.
401invalid_api_keyThe key is unknown, expired or revoked. Create a new one.
403integration_not_permittedUse a personal key, not an organisation integration key.
403insufficient_scopeUse a key with mcp:read.
403session_owner_mismatchThe session belongs to another key. Start a new session.
403origin_refusedThe request came from a web page on an origin the server does not accept.
404unknown_sessionThe session has ended. Start a new one with initialize.
429session_limitClose sessions you no longer use with DELETE, or wait for idle ones to end.
429rate_limitedWait a minute before you send more requests.
503account_access_unavailableKeys and access could not be checked. Try again shortly.

A tool call that your account may not make right now, for example because your access was withdrawn or your request limit is reached, returns a tool result with isError: true whose text names the reason.

Where data goes

  • The lookup parameters go to the register you query, at the address in the table above. Access follows your personal key.
  • The server runs on komplai's servers in Germany (EU). The komplai_ tools process text there, in memory.
  • Your organisation's Audit log holds the tool, who called it and usage metadata, never the lookup, the text, the list of labels or the key.
  • Register lookups use no AI and do not count towards AI usage.

Where data is processed describes every tool.

komplaidevelopers
Contact us

Search the documentation

Use the arrow keys to choose and Enter to open.