商业注册数据查询服务

RIK MCP是一款为AI代理提供爱沙尼亚商业注册数据访问的服务,支持通过自然语言查询公司信息、财务报告、所有权结构和收入细分。

  • by margusliinev
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 margusliinev/estonian-business-register-mcp

使用说明

RIK MCP

MCP server that gives AI agents structured access to Estonian Business Registry data. Query company information, financial reports, ownership structures, and revenue breakdowns using natural language through any MCP-compatible client.

Tech Stack

  • Runtime — Bun >= 1.4.0
  • Language — TypeScript 7
  • Database — PostgreSQL
  • Query builder — Kysely
  • Validation — Zod
  • Tooling — Oxfmt and Oxlint

Prerequisites

Download open data

Download the public datasets from:

https://avaandmed.ariregister.rik.ee/et/avaandmete-allalaadimine

Place the unzipped files directly in the data/ folder at the project root. Ingest expects these filenames:

  • ettevotja_rekvisiidid__lihtandmed.xml
  • ettevotja_rekvisiidid__yldandmed.xml
  • ettevotja_rekvisiidid__kaardile_kantud_isikud.xml
  • ettevotja_rekvisiidid__kandevalised_isikud.xml
  • ettevotja_rekvisiidid__osanikud.xml
  • ettevotja_rekvisiidid__kasusaajad.xml
  • 1.aruannete_yldandmed_kuni_*.csv
  • 2.EMTAK_myygitulu_kuni_*.csv
  • 3.myygitulu_geograafiline_kuni_*.csv
  • 4.{year}_aruannete_elemendid_kuni_*.csv (one file per report year)

The kuni_* date suffix changes when RIK publishes a newer dump. Ingest automatically picks the latest matching file, so you can drop in updated CSVs without changing code.

Getting Started

git clone https://github.com/margusliinev/rik-mcp.git
cd rik-mcp
cp .env.example .env
bun install
docker compose up -d
bun run migrate
bun run ingest
bun run dev

The MCP endpoint is available at http://localhost:3001/mcp.

Use with Cursor

With the server running, add this to your Cursor MCP config (.cursor/mcp.json):

{
    "mcpServers": {
        "RIK": {
            "url": "http://localhost:3001/mcp"
        }
    }
}

Then restart MCP / reload Cursor so the RIK server shows up.

Available tools

Tool Description
get-company Get a company by id or registry code
get-person Get a person by id or person hash
get-annual-report Get an annual report with activity and market breakdowns
list-company-roles List people and companies linked to a company
list-person-roles List companies a person is linked to
list-annual-reports List annual reports for a company
search-companies Search and filter companies
search-persons Search persons by name
search-annual-reports Search annual reports by year, EMTAK, size, and revenue

Scripts

Command Description
bun run dev Start development server
bun run start Start production server
bun run migrate Apply database migrations
bun run ingest Load RIK data from data/ into Postgres
bun run format Format code
bun run lint Lint code
bun run typecheck Typecheck

License

MIT