mcp-ledger-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-ledger-server What invoices are pending?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Księga jako narzędzia — serwer MCP dla agentów AI
Serwer Model Context Protocol, który wystawia system księgowy (kolejkę faktur, kontrolę duplikatów, rejestr VAT, historię kontrahentów i dziennik decyzji) jako narzędzia dla dowolnego agenta AI — Claude Code, inspektora MCP czy skryptu testowego.
Czym jest MCP, po ludzku
MCP to „USB dla agentów": jeden standard wtyczki między modelem a systemami firmy. Zamiast pisać integrację szytą na miarę pod każdą parę „agent ↔ system", system wystawia narzędzia raz — a korzysta z nich każdy klient mówiący protokołem. Ten projekt pokazuje to w praktyce: te same narzędzia księgi obsługują sesję Claude Code i automatyczny harness testowy.
Related MCP server: mcp-business-docs
Narzędzia (7)
Narzędzie | Rola |
| kolejka niezaksięgowanych faktur |
| pełne dane dokumentu (nagłówek, strony, pozycje, sumy) |
| deterministyczna kontrola rachunkowa (grosze, per pozycja) |
| czy numer został już zaksięgowany (duplikaty) |
| dominujący format numeracji i granica kwot odstających |
| status podatnika (mock białej listy) + suma kontrolna NIP |
| decyzja auto/eskalacja z uzasadnieniem w dzienniku audytowym |
Najciekawszy wynik: 9/10 → 10/10 → 40/40
Agent (Claude) przetwarzał 60 faktur z wstrzykniętymi wadami (7 typów — korpus i klucz odpowiedzi wspólne z projektem zespołu agentów n8n):
Partia | Wynik | Co się wydarzyło |
inv_001–010 | 9/10 | agent policzył arytmetykę „w głowie" i pomylił się o 90 zł — przepuścił wadę na inv_008 |
— | — | agent sam zaproponował narzędzie |
inv_011–020 | 10/10 | w tym wada stawki VAT wykryta poglądem na dane (8% i 23% na identycznym towarze) |
inv_021–060 | 40/40 | komplet: duplikaty, zły NIP, niezarejestrowany podatnik, obcy format numeru, kwoty odstające |
Bilans: 59/60 trafnych decyzji, a jedyny błąd pochodzi sprzed narzędzia
i dokładnie z tej klasy, którą narzędzie wyeliminowało. Lekcja projektu:
model ma wnioskować i decydować — liczyć ma narzędzie. Dziennik decyzji
z całego przebiegu: data/ledger-demo-60.db (tabela decisions).
Uruchomienie
npm install
npm run build-ledger # księga SQLite z korpusu (60 faktur + rejestr VAT)
npm test # harness MCP: 16 asercji wg klucza odpowiedziPodłączenie do Claude Code: repo zawiera .mcp.json — wystarczy otworzyć
katalog i zatwierdzić serwer ledger. Serwer przy starcie sam zasila pustą
księgę (stdio, node:sqlite — zero natywnych zależności).
Struktura
src/server.ts # serwer MCP: 7 narzędzi na stdio
src/verify.ts # kontrola rachunkowa (grosze, per pozycja) — wspólna dla MCP i CLI
scripts/build-ledger.ts# budowa księgi z korpusu
scripts/verify-totals.ts# to samo co narzędzie MCP, z linii poleceń
test/harness.ts # skryptowy klient MCP: 16 asercji wg klucza
data/answer_key.json # korpus 60 faktur z kluczem odpowiedzi
data/ledger-demo-60.db # dziennik 60 decyzji agenta z sesji demo (59/60)Available Tools
1 toolvat_registryRejestr VATB
Status kontrahenta w rejestrze podatników VAT (mock białej listy) + kontrola sumy kontrolnej NIP.
Inputs: nip (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of confusion between tools. The single tool has a clear, distinct purpose.
With a single tool, naming consistency is not an issue. The name 'vat_registry' follows a clear noun form, which is acceptable.
One tool is on the low end for a server, but it serves a narrow, specific purpose (VAT registry check). It is borderline but not extreme given the focused functionality.
The single tool adequately covers the intended domain: checking contractor status in the VAT taxpayer registry and validating NIP checksum. No obvious gaps exist for the stated purpose.
Maintenance
Related MCP Connectors
41 MCP tools for EU invoice evidence, supplier checks, market data and read-only chain queries
Ledger of record for AI spend: verifiable receipts, waste auditor & model arbitrage MCP.
Deterministic European sovereign engine with 90 tools across 20 vertical suites for AI agents: EU Tax/KYB, FatturaPA/Peppol, AI Act, GDPR, DORA, NIS2, Italian Tenders (D.Lgs 36/2023), CBAM, EUDR, and Labour Law. Zero-Data-Retention with verifiable SHA-256 PDF/A audit certificates.
Read-only finance and operations controls for AI agents with evidence and safe next actions.
Related MCP Servers
- AlicenseAqualityDmaintenanceAudit infrastructure for AI agents to log consequential decisions (invoice, GL, anomaly) and verify attestations via MCP tools.6MIT
- FlicenseNot gradedqualityCmaintenanceEnables MCP clients to search and inspect an invoice ledger, generate VAT summaries, run OCR on local documents, and use reusable prompts for chasing overdue invoices and reconciling entries.2-
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to query and reconcile electronic invoicing cases across multiple editors using six standardized MCP tools, with synthetic data and conformance checks.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible agents such as Claude Desktop and Cursor to process invoices, list pending reviews, retrieve case details and risk signals, decide approvals or rejections, access masked vendor master data, and view AP dashboard metrics while resuming paused LangGraph workflows.MIT