MCP server for the Estonian e-arveldaja (RIK e-Financials) REST API.
e-arveldaja MCP Server
MCP server for the Estonian e-arveldaja (RIK e-Financials) REST API. 89 tools, 10 workflow prompts, 12 resources. Works with any MCP client — Claude Code, Codex CLI, Gemini CLI, Cursor, Windsurf, Cline, and others.
Disclaimer
This is an experimental, unofficial project. It is not affiliated with, endorsed by, or in any way officially connected to RIK (Registrite ja Infosüsteemide Keskus) or the e-arveldaja / e-Financials service.
Use entirely at your own risk. This software interacts with live financial data and can create, modify, confirm, and delete accounting records (invoices, journal entries, transactions, etc.). The authors accept no responsibility for any data loss, incorrect bookings, or other damages resulting from the use of this software.
By using this software you acknowledge that:
- You are solely responsible for verifying all data and operations
- You should test thoroughly on the demo server before using with live data
- This is experimental software with no warranty of any kind
Getting an API Key
- Log in to e-arveldaja
- Go to Seadistused → Üldised seadistused → Lisa uus juurdepääsuluba (Settings → General settings → Add new access token)
- Enter any name for the token
- Find your public IP address (e.g. at api.ipify.org) and enter it in the allowed IP field. Multiple IPs can be separated by
; - Save — download the
apikey.txtfile and place it in the working directory where you run your AI assistant
If you don't have a static IP address, you will need to update the allowed IP in e-arveldaja settings whenever your IP changes.
If requests later start failing with 401 Unauthorized, the most common cause is that your public IP changed and no longer matches the allowed IP list. Check the current public IP yourself in a browser (for example, https://api.ipify.org) and update the whitelist in e-arveldaja if needed.
Never commit the apikey.txt file to git.
For the demo server, set the environment variable EARVELDAJA_SERVER=demo.
Setup
1. Add the MCP server
Most AI assistants can set this up for you — just ask:
"Add the e-arveldaja-mcp npm package as an MCP server"
If you prefer to do it manually:
Claude Code:
claude mcp add e-arveldaja -- npx -y e-arveldaja-mcp
Other tools (Cursor, Windsurf, Cline, Gemini CLI, Codex CLI, Antigravity) — add to your MCP config:
{
"mcpServers": {
"e-arveldaja": {
"command": "npx",
"args": ["-y", "e-arveldaja-mcp"]
}
}
}
Config file locations by tool
| Tool | Config file |
|---|---|
| Claude Code | ~/.claude/settings.json or project .claude/settings.json |
| Codex CLI | ~/.codex/config.toml (TOML format) |
| Gemini CLI | ~/.gemini/settings.json |
| Google Antigravity | MCP Store UI → Manage MCP Servers → raw config |
| Cursor | .cursor/mcp.json in your project |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
| Cline | VS Code settings under cline.mcpServers |
2. Place your API key
Put the downloaded apikey.txt in the working directory where you run your AI assistant. That's it — the server finds it automatically.
For multiple companies, place multiple files (apikey.txt, apikey-company2.txt, etc.) and use list_connections / switch_connection to switch between them.
Alternative: environment variables
export EARVELDAJA_API_KEY_ID=...
export EARVELDAJA_API_PUBLIC_VALUE=...
export EARVELDAJA_API_PASSWORD=...
Building from source
git clone https://github.com/iseppo/e-arveldaja-mcp.git
cd e-arveldaja-mcp
npm install && npm run build
# Then use: "node", "/path/to/e-arveldaja-mcp/dist/index.js" instead of npx
Workflows (MCP Prompts)
The server includes 10 built-in workflow prompts that any MCP client can discover and use. These guide the AI through multi-step accounting tasks:
| Prompt | Description |
|---|---|
book-invoice |
Book a purchase invoice from PDF: extract, validate, resolve supplier, preview, create, upload, confirm |
receipt-batch |
Scan a receipt folder, preview auto-bookable items, then batch-create after approval |
import-camt |
Parse CAMT.053 XML, preview imported bank transactions, then create after approval |
import-wise |
Preview Wise CSV import results, fees, duplicates, and Jar skips before execution |
classify-unmatched |
Group unmatched bank transactions, preview suggested booking actions, then apply after approval |
reconcile-bank |
Match bank transactions to invoices, auto-confirm or review manually |
month-end-close |
Blockers, missing docs, duplicates, trial balance, P&L, balance sheet |
| `new-su |
Tools (2)
list_connectionsLists available API connections for different companies.switch_connectionSwitches the active API connection to a specific company.Environment Variables
EARVELDAJA_SERVERSet to 'demo' to use the e-arveldaja demo server.EARVELDAJA_API_KEY_IDAPI key ID for authentication.EARVELDAJA_API_PUBLIC_VALUEAPI public value for authentication.EARVELDAJA_API_PASSWORDAPI password for authentication.Configuration
{"mcpServers": {"e-arveldaja": {"command": "npx", "args": ["-y", "e-arveldaja-mcp"]}}}