π° Estonia AI Kit πͺπͺ
Photo by Ilya Orehov on Unsplash, modified with AI
πͺπͺ The Digital Nation's AI Toolkit
Build AI-powered applications with Estonia's world-leading digital infrastructure
[!NOTE] This is a community-driven open source project and is not affiliated with, endorsed by, or connected to the Estonian government or any official Estonian institutions.
π The Estonian Digital Revolution
Picture this: A country where 99% of government services are online. Where you can establish a company in 18 minutes. Where blockchain secures healthcare records, and every citizen has a digital identity that works seamlessly across all services. This isn't science fictionβthis is Estonia today.
Since the early 1990s, Estonia has transformed itself into one of the world's most digitally advanced societies. Starting fresh with modern infrastructure and forward-thinking policies, the country built its services digital-first from the ground up. Today, Estonia stands as a model for digital governance:
- 3 minutes to file taxes online (with 98% of citizens doing so) 1
- 2% of GDP saved annually through digital governance 2
- 120,000+ e-Residents from 170+ countries running EU companies remotely 3
- 99.9% of banking transactions happen online 4
- X-Road data exchange platform processes 900+ million transactions yearly 5
π What is Estonia AI Kit?
Estonia AI Kit connects your AI applications directly to Estonian government services, open data, and digital infrastructure. This SDK provides everything you need to build MCP servers for Claude, create data pipelines, develop analytical tools, or integrate with X-Road services.
The toolkit follows Estonia's core digital principles: transparent APIs, comprehensive documentation, and reliable infrastructure. Every component is fully typed, thoroughly tested, and production-ready.
π― What is MCP?
Model Context Protocol (MCP) is an open protocol that standardizes how AI applications connect with external data sources and tools. Estonia AI Kit implements MCP servers for various Estonian government services, making them accessible to AI models like Claude, GPT, and others.
[!IMPORTANT] This project is constantly evolving as we work to integrate more Estonian government services and improve existing implementations. Current functionality varies by package:
Package Status Data Source Ready for Use? RIK (Business Register) πΆ WIP Real open data files (daily snapshots) πΆ Partial - requires data download EMTA (Tax & Customs) π΄ POC Mock data (POC demonstration) π΄ No - X-Road auth needed Open Data Portal πΆ WIP Statistics Estonia API (real data) πΆ Partial - curated tables only For RIK Package Users:
- Run
bun run download-datain the RIK package to fetch real data files- Data is from daily snapshots (not real-time)
- Personal ID numbers are removed for privacy (since Nov 2024)
This is experimental software intended for:
- Learning and experimentation
- Development reference
- Community contribution
- Testing MCP server implementations
For development/experimental purposes only.
β‘ Technical Stack
Built with modern TypeScript and the Model Context Protocol (MCP) SDK:
| Component | Technology | Purpose |
|---|---|---|
| MCP Servers | TypeScript, @modelcontextprotocol/sdk | AI assistant integration |
| API Clients | Axios, native fetch | HTTP/REST communication |
| Data Processing | CSV parsing, JSON streaming | Handle large datasets efficiently |
| Caching | node-cache | Reduce API calls and improve performance |
| Type Safety | TypeScript strict mode | Full type coverage for reliability |
| Monorepo | Nx workspace | Consistent tooling and code sharing |
π¦ Packages
| Package | Description | NPM | Status |
|---|---|---|---|
@estonia-ai-kit/rik-mcp-server | Estonian Business Register API | πΆ WIP | |
@estonia-ai-kit/emta-mcp-server | Tax and Customs Board API | π΄ POC | |
@estonia-ai-kit/open-data-mcp-server | Open Data Portal API | πΆ WIP | |
@estonia-ai-kit/shared | Shared utilities and types | β Ready | |
rag/riigiteataja | Estonian Legal Document RAG | N/A | πΆ WIP |
π οΈ Installation
Using Bun (Recommended)
bun add @estonia-ai-kit/rik-mcp-server
bun add @estonia-ai-kit/emta-mcp-server
bun add @estonia-ai-kit/open-data-mcp-server
Using npm
npm install @estonia-ai-kit/rik-mcp-server
npm install @estonia-ai-kit/emta-mcp-server
npm install @estonia-ai-kit/open-data-mcp-server
π¦ Quick Start
1. Configure MCP in Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"estonia-rik": {
"command": "node",
"args": ["/path/to/estonia-ai-kit/mcp/rik/dist/index.js"]
},
"estonia-emta": {
"command": "node",
"args": ["/path/to/estonia-ai-kit/mcp/emta/dist/index.js"]
},
"estonia-open-data": {
"command": "node",
"args": ["/path/to/estonia-ai-kit/mcp/open-data/dist/index.js"]
}
}
}
Note: Run
npm run buildin each MCP directory before first use.
2. Use in Your AI Application
import { RIKClient } from '@estonia-ai-kit/rik-mcp-server';
const client = new RIKClient();
const company = await client.searchCompany({
registryCode: '10000000',
});
π Estonian Government Resources
- ποΈ e-Business Register - Official business registry portal
- πΌ EMTA (Tax & Customs) - Estonian Tax and Customs Board
- π Open Data Portal - Estonian government open data
- π X-Road - Estonian data exchange platform
- πͺπͺ e-Estonia - Digital society overview
- π RIK Developer Portal - Business registry API documentation
π§βπ» Development
Prerequisites
Setup
# Clone the repository
git clone https://github.com/yourusername/estonia-ai-kit.git
cd estonia-ai-kit
# Install dependencies
bun install
# Build all packages
bun run build
# Run tests
bun run test
# Start development mode
bun run dev
Project Structure
estonia-ai-kit/
βββ mcp/ # MCP server packages
β βββ rik/ # Business Register server
β βββ emta/ # Tax & Customs server
β βββ open-data/ # Open Data Portal server
βββ packages/ # Shared packages
β βββ shared/ # Common utilities and types
β βββ src/
β βββ mcp/ # MCP-specific utilities
βββ .github/ # GitHub workflows
βββ docs/ # Documentation
π§ͺ Testing
Each package includes comprehensive tests:
# Run all tests
bun run test
# Run tests for specific package from root
npx nx test rik-mcp-server
npx nx test emta-mcp-server
npx nx test open-data-mcp-server
npx nx test shared
# Run tests for affected packages only
npx nx affected --target=test
# Watch mode for specific package
npx nx test rik-mcp-server --watch
# Run with coverage
npx nx test rik-mcp-server --coverage
π€ Contributing
PRs and issues welcome.
Fork β Branch β Commit β Push β PR
βοΈ License
This open-source project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This means:
- β You can use, modify, and distribute this software
- β If you modify and distribute it, you must release your changes under AGPL-3.0
- β If you run a modified version on a server, you must provide the source code to users
- π See the LICENSE file for full details
For commercial licensing options or other licensing inquiries, please contact stefano@amorelli.tech.
Copyright Β© 2025 Stefano Amorelli
Released under the GNU Affero General Public License v3.0
amorelli.tech β’ stefano@amorelli.tech
Made with β€οΈ in Tallinn for Estonia's digital future πͺπͺ
Enjoy! π