Skip to content
fewtokensai
Case study · inFakt

inFakt — MCP server, AutoX, PKD AI: products that wire accounting into LLMs

I lead the AI Engineering team. Three flagship products built by the team: a Model Context Protocol server (launched, with read and write tools), the AutoX automated bookkeeping system (300k+ invoices/month, 90%+ accuracy), and the PKD AI classifier for Polish business registration. Plus a modern AWS data architecture. Docs: infakt.ai.

300k+
invoices / month
90%+
OCR + NLP accuracy
−40%
data processing cost
30%
projected efficiency gain

Context

inFakt is a Polish SaaS platform for accounting and invoicing, serving tens of thousands of small businesses and 800+ accountants running their clients’ books on the platform. I recently joined as AI Engineering Manager with a mandate to build a team and deliver AI-first capabilities into the core product.

What I found

  1. No coordinated AI practice — scattered AI initiatives across the backend, no shared direction.
  2. Manual invoice processing — despite an existing OCR-based automation, a meaningful share of documents still required human correction. Capping the scale of an accountant’s work.
  3. No AI assistant integration — clients were increasingly asking “can I plug ChatGPT into my inFakt?”, the answer was “no.”
  4. Data architecture — legacy monolith with Postgres as single source of truth, expensive to scale, limiting analytics.

What we deliver

AI Engineering team

I built and lead the AI Engineering team at inFakt. Together we deliver the company-wide AI roadmap — from strategy and architecture through to concrete deployments. We’ve adopted agile methodology, code review standards, on-call rotation, weekly tech sessions and individual development paths. I work directly with each team member and across departments (product, compliance, legal, support).

MCP (Model Context Protocol) server

Together with the team we designed and shipped the production MCP server, letting AI assistants (Claude, ChatGPT, Cursor and others) securely connect to user inFakt accounts. Supports both read operations and write tools — e.g. creating invoices, clients, and accounting books. Full docs: infakt.ai. I drive the architectural decisions and technical direction.

Stack and architectural calls negotiated with the business and compliance:

  • OAuth2 scoped tokens instead of blanket auth — every tool has a declarative scope manifest.
  • Per-call audit log — every tool invocation (parameters, response, latency, error code) goes to dedicated storage with GDPR-aligned retention. Write-through before execution; logging fail = call fail.
  • Per-user rate limits — protect the backend from looping agents.
  • Idempotency keys for write-side calls — agent retries don’t duplicate.
  • Graceful degradation — when the backend goes down, MCP returns structured errors, the agent decides what to do.
  • Deploy: AWS Lambda + Cloud Run fallback, observability via OpenTelemetry.

This isn’t a demo. It’s distributed-systems engineering with an LLM as a client. More: post “Why MCP servers fail in production”.

AutoX — automated bookkeeping

The existing OCR-driven workflow at inFakt we rebuilt with the core engineering team into a full AutoX system that turns a raw document (photo, PDF, email with an invoice) into a ready-to-post bookkeeping entry — matched against the chart of accounts, with counterparty identification, VAT classification, and anomaly flagging.

Pipeline:

  1. OCR layer — text extraction from documents in many formats.
  2. NLP normalization — supplier data, dates, amounts, VAT rates.
  3. LLM verification — match against the user’s historical patterns, detect unusual transactions.
  4. Human-in-the-loop for low-confidence cases — the accountant confirms, the system learns.

Outcome: 300,000+ invoices monthly at 90%+ accuracy, tangible workload reduction for the 800+ accountants on the platform. Per-invoice processing time from minutes to seconds.

PKD AI — Polish business activity classifier

Every company in Poland has to declare a PKD code (Polska Klasyfikacja Działalności) at registration. The classification has thousands of entries, is inconsistent, and full of legal/tax pitfalls.

We built an AI assistant that, from a free-text business description (e.g., “I build websites and run Google Ads for clients”), proposes fitting PKD codes with rationale and warnings about tax consequences. Works in new company registration and when updating existing client records.

Stack:

  • Retrieval over a structured PKD database + GUS (statistics office) interpretations.
  • LLM reasoning layer with explicit chain-of-thought (auditable by compliance).
  • Confidence scoring — when the model isn’t sure, escalation to the accountant; never guessing.

It’s the first AI decision assistant in inFakt products whose output has real legal consequences for the user. Everything went through Compliance and Legal review.

Modern AWS data architecture

Together with the team we designed and are rolling out a modern layered architecture: operational data systems → data lake on S3 → transformation layer in dbt → analytics layer on Redshift. We’ve established data governance policies, monitoring frameworks, scalable ETL pipelines. 40% reduction in data processing costs. Real-time analytics across all business units.

AI strategy & change management

I lead the AI adoption initiative: stakeholder interviews, requirement analysis, AI vision, 12-month roadmap, governance framework, success metrics. Close collaboration with Compliance to ensure GDPR-compliance of all solutions. 6+ automation initiatives identified with projected 30% efficiency gains.

What I learned

  • MCP in production needs much more than the spec — backpressure, idempotency, observability. The Anthropic SDK is just the starting point.
  • Internal AI adoption is a management problem, not a technical one — most of the time goes into conversations with compliance, legal, product, support teams.
  • Mature OCR + modern NLP beats pure LLM — a hybrid at 90%+ accuracy is cheaper and more deterministic.
  • A good team is a multiplier, not an adder — the best results show up when each senior owns a slice and a manager removes blockers.
Let's talk about your AI

Let's talk.

30 minutes, no obligation. Tell me where your AI initiative is stuck or what you're planning — you'll leave with concrete next steps.