The problem
For an accounting firm, we're developing an AI automation stack for financial administration: incoming invoices via email or webhook are parsed, matched to suppliers, equipped with a booking proposal, and — depending on policy — automatically posted or routed to an operator for review. The accounting software in question is Yuki.
While designing the stack we kept running into the same question: how do you give an AI agent controlled access to the Yuki API without each agent building its own integration layer? Yuki's SOAP API is powerful but traditionally consumed by fixed applications — not by agents that need to decide for themselves which tool to call.
The approach
We isolated the Yuki integration layer from the broader automation stack and rebuilt it as a standalone Model Context Protocol (MCP) server. MCP is an open standard from Anthropic that lets AI agents call tools, resources, and prompts via a single standardized protocol.
The result is a Node.js package that hides the full Yuki SOAP API — authentication, sessions, XML envelopes, field-name differences between web services — behind a set of clear tools per domain:
- Administrations:
get_administrations,get_administration_id,reload_keys - Relations:
search_relations,upsert_contact - Invoices:
get_sales_invoices,process_sales_invoice,get_purchase_invoices,process_purchase_invoice,get_missing_invoices - Documents:
upload_document,upload_document_from_path,search_documents,download_document - Backoffice:
get_workflow,get_outstanding_questions
With multi-administration support: a dedicated API key can be configured per administrationId, and a reload_keys tool reloads new keys without restarting — essential for accounting firms with dozens of client administrations.
What it delivers
For our client: the AI agents in their automation stack now have a standardized, auditable interface to Yuki. No bespoke integration code per agent, no accidental API misuse — only tools that are explicitly exposed.
For the community: a reusable building block for anyone working with Yuki and AI agents — accounting firms, finance teams, automation partners. The package is published as @codemill-solutions/yuki-mcp on npm and the source code lives on GitHub.
For CodeMill: a flagship project that surfaces our MCP expertise and serves as a blueprint for similar integrations on other accounting and ERP platforms.
Iterating on feedback
Publishing open source means feedback arrives fast. A user asked for support for missing invoices — payments Yuki detects in bank statements but for which no purchase invoice has been delivered yet. An important control point for accountants. We shipped the get_missing_invoices tool in v1.4.0.
Combined with upload_document and process_purchase_invoice this enables an end-to-end workflow: the agent flags missing invoices, asks whether a PDF is available, uploads it, and processes the purchase invoice. Exactly where an MCP layer adds value — not fully automating accounting without oversight, but making recurring administrative signals faster to spot and easier to act on.
Stack and approach
| Layer | Choice |
|---|---|
| Runtime | Node.js 20+, TypeScript |
| MCP | @modelcontextprotocol/sdk (official SDK) |
| HTTP | axios |
| XML | fast-xml-parser |
| Validation | zod |
| Auth | Session caching per Yuki API key |
| Distribution | npm (scoped public package), GitHub |
We deliberately kept no client- or company-specific assumptions in the server. All policy, fuzzy matching, and human-in-the-loop logic lives in the broader automation stack on top of it. That keeps the MCP server clean and broadly applicable.
Who is this relevant for?
- Accounting firms wanting to accelerate client processes with AI
- Finance teams automating monthly close, receivables follow-up, or supplier management
- Software partners building on Yuki who want to offer modern AI interfaces
- Other companies with a SOAP API evaluating how to make it accessible to AI agents — the architecture generalizes
Further reading
- 📘 Technical blog post: Yuki MCP — connecting AI agents to your accounting
- 🐙 GitHub: CodeMill-Solutions/yuki-mcp
- 📦 npm: @codemill-solutions/yuki-mcp
- 🧩 Our AI services
Want to apply AI to accounting?
Working with Yuki, another accounting platform, or your own API and curious which processes lend themselves to AI automation? Schedule a no-obligation conversation via info@codemill.dev or the contact form. We're happy to think through a safe, practical, and future-proof approach with you.
