Skip to main content
Glama
kimhjort

aria-mcp-cvr-dk

by kimhjort
README.md
# aria-mcp-cvr-dk

A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that looks up Danish companies in CVR (Det Centrale Virksomhedsregister) via [cvrapi.dk](https://cvrapi.dk). Built for [ARIA](https://github.com/kimhjort/aria) and shareable with the community.

Use-case: ARIA resolves a company from an invoice, email, or contract — *"hvem er CVR 12345678"* or *"find firmaet Netcompany"*.

## Data Source & Attribution

| Source | What | Attribution |
|--------|------|-------------|
| [cvrapi.dk](https://cvrapi.dk) | Danish company data from CVR (Det Centrale Virksomhedsregister) | cvrapi.dk / CVR (Erhvervsstyrelsen). Free tier: ~50 lookups/day. |

**Important:** A descriptive `User-Agent` header is required by cvrapi.dk's terms of service. This server sets it automatically:

```
aria-mcp-cvr-dk/1.0.0 (https://github.com/kimhjort/aria-mcp-cvr-dk)
```

The free tier allows approximately **50 requests per day**. For higher volume, see [cvrapi.dk](https://cvrapi.dk) for commercial options.

## Install & Run

```bash
npx aria-mcp-cvr-dk
```

Or install globally:

```bash
npm install -g aria-mcp-cvr-dk
aria-mcp-cvr-dk
```

Requires Node.js 20 or later.

## Tools

### `lookup_company({ query })`

Look up a Danish company by **CVR number**, **company name**, or **phone number**.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `query` | string | **Yes** | Company name, CVR number (8 digits), or phone number. |

**Returns (found):**

```json
{
  "found": true,
  "query": "Novo Nordisk",
  "company": {
    "cvr": "24256790",
    "name": "NOVO NORDISK A/S",
    "address": "Novo Alle 1",
    "zipcode": "2880",
    "city": "Bagsværd",
    "phone": "44448888",
    "email": null,
    "industry_code": 212000,
    "industry_description": "Fremstilling af farmaceutiske præparater",
    "company_type_code": 60,
    "company_type": "Aktieselskab",
    "active": true,
    "start_date": "28/11 - 1931",
    "end_date": null,
    "employees": 30074,
    "credit_bankrupt": false
  }
}
```

**Returns (not found):**

```json
{
  "found": false,
  "query": "nonexistent company",
  "message": "No company found for query \"nonexistent company\" in CVR. Try an exact CVR number (8 digits) or a different spelling."
}
```

---

### `search_companies({ name })`

Search for Danish companies by name.

**Note:** cvrapi.dk returns a **single best match** per query, not a paginated list of results. This tool returns that one match and documents this behaviour explicitly. For an exact lookup by CVR number, use `lookup_company` instead.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | string | **Yes** | Company name or partial name to search for. |

**Returns:**

```json
{
  "found": true,
  "query": "Netcompany",
  "note": "cvrapi.dk returns a single best match per query, not a paginated list. This is that best match.",
  "match_count": 1,
  "companies": [{ "cvr": "...", "name": "...", "..." : "..." }]
}
```

## Company Result Fields

| Field | Type | Description |
|-------|------|-------------|
| `cvr` | string | CVR number (8 digits) |
| `name` | string | Legal company name |
| `address` | string \| null | Street address |
| `zipcode` | string \| null | Postal code |
| `city` | string \| null | City |
| `phone` | string \| null | Phone number |
| `email` | string \| null | Email address |
| `industry_code` | number \| null | Danish industry code (DB07) |
| `industry_description` | string \| null | Danish industry description |
| `company_type_code` | number \| null | CVR company type code |
| `company_type` | string \| null | Company type (e.g. "Aktieselskab", "Anpartsselskab") |
| `active` | boolean | `true` if the company has no end date (still active) |
| `start_date` | string \| null | Registration start date |
| `end_date` | string \| null | Registration end date (null = still active) |
| `employees` | number \| null | Number of employees (if available) |
| `credit_bankrupt` | boolean \| null | Whether the company is bankrupt |

## ARIA MCP Config

Add to your ARIA credentials / MCP config to use with ARIA:

```json
{
  "Name": "CVR",
  "Command": "npx",
  "Args": ["-y", "aria-mcp-cvr-dk"]
}
```

No environment variables required — cvrapi.dk is keyless.

## Development

```bash
git clone https://github.com/kimhjort/aria-mcp-cvr-dk
cd aria-mcp-cvr-dk
npm install
npm run build
npm test
```

## License

MIT — see [LICENSE](LICENSE).

Company data is sourced from CVR (Det Centrale Virksomhedsregister) via [cvrapi.dk](https://cvrapi.dk). Please respect cvrapi.dk's [terms of service](https://cvrapi.dk) and the ~50 requests/day free-tier limit.

TDQS

A4.3/5.0

Scored across 2 tools

Disambiguation4/5

Both tools interact with the CVR register, but descriptions clearly differentiate: lookup_company accepts CVR number, name, or phone, while search_companies is specifically for name search and warns it returns only one match. Minor overlap exists since both can search by name, but the descriptions help agents choose correctly.

Naming Consistency5/5

Both tool names follow the consistent verb_noun snake_case pattern: lookup_company and search_companies. No deviations or mixed conventions.

Tool Count3/5

With only 2 tools, the server feels thin for a dedicated CVR lookup service. While the domain is narrow, a typical minimal set might include more variations (e.g., search by address or industry), so the count is borderline.

Completeness3/5

The server covers basic lookup and name search, but lacks other common operations like industry code lookup, paginated search, or filtering. Core functionality is present, but there are notable gaps for a comprehensive company registry tool.

Maintenance

ActivityMaintained
ResponsivenessSyncing