At CodeMill, we have been exploring how AI agents can be used in real-world business processes. Not as a gimmick, but as practical digital coworkers that can help prepare, check, summarize or automate repetitive tasks — always within clear technical and functional boundaries.
One area where this becomes especially interesting is finance and administration. A lot of valuable business data lives inside accounting platforms. For many companies and accounting firms in the Netherlands and Belgium, Yuki is one of those platforms.
That is why we recently published an open source Yuki MCP server: a technical layer that allows AI agents to interact with Yuki through the Model Context Protocol.
The package is available on GitHub and npm as:
npm install @codemill-solutions/yuki-mcp
The server is built with Node.js and TypeScript, uses the official MCP SDK, and communicates with Yuki through the existing public Yuki API.
Why build an MCP server on top of the Yuki API?
Yuki already provides a public API integration. Through this API, external software can exchange data with Yuki, including administrations, contacts, invoices, documents, transactions and backoffice information.
For traditional software integrations, that works well. You build an application, write specific integration logic and call the API methods you need.
AI agents, however, work differently.
An agent does not just execute one fixed API call. It receives a task, reasons about what information it needs, selects the right tools and combines the results into a useful answer or action.
For example:
Show me all overdue sales invoices and group them by customer.
Or:
Check whether there are still documents in the workflow that require attention.
Or:
Find this supplier, check the latest transactions and tell me if there are outstanding items.
You do not want to expose a raw API directly to a language model. You want to provide a controlled set of tools with predictable input, output and error handling.
That is exactly where MCP becomes useful.
What is MCP?
MCP stands for Model Context Protocol. It is a standard way for AI applications and agents to use external tools and data sources.
Instead of every AI client inventing its own integration pattern, an MCP server describes which tools are available, which parameters they accept and what kind of output they return.
In the case of Yuki, this means an AI agent does not need to understand SOAP, XML, authentication sessions or Yuki-specific field names directly. The MCP server exposes a cleaner tool layer that the agent can use.
Examples of these tools include:
- retrieving administrations;
- searching or updating contacts;
- retrieving sales and purchase invoices;
- processing invoices;
- uploading and searching documents;
- retrieving accounting transactions;
- checking workflow items and outstanding questions.
The technical complexity remains inside the integration layer. The agent only sees the capabilities it is allowed to use.
What does our Yuki MCP server do?
Our Yuki MCP server acts as a bridge between AI agents and the Yuki API.
The server exposes tools across several functional areas, including:
- administrations;
- contacts and relations;
- sales invoices;
- purchase invoices;
- accounting;
- transactions;
- documents;
- backoffice workflows.
Some examples:
Administrations
get_administrations
get_administration_id
reload_keys
Contacts and relations
search_relations
upsert_contact
Invoices
get_sales_invoices
process_sales_invoice
get_purchase_invoices
process_purchase_invoice
Documents
upload_document
upload_document_from_path
search_documents
download_document
Backoffice
get_workflow
get_outstanding_questions
The goal is not to create “a chatbot for accounting”. The server is a building block. It can be connected to an MCP-compatible host, an internal AI agent, an automation platform or a custom workflow.
Example: from question to accounting workflow
Imagine a finance employee asking an internal AI agent:
“Which sales invoices are still unpaid, and which customers should we follow up with this week?”
The agent can use the MCP server to retrieve sales invoices from Yuki, filter the unpaid ones, group them by customer and summarize the result.
A follow-up step could be to prepare draft reminder emails, create tasks in an internal system or generate a management summary.
The important part is that the agent does not get unlimited access to the accounting environment. It only gets access to the explicitly defined tools exposed by the MCP server.
That makes the automation more predictable, easier to audit and easier to restrict.
Multi-administration support
A common scenario for accounting firms or organizations with multiple entities is working across several Yuki administrations.
The Yuki MCP server supports a configuration file in which each administrationId can have its own API key. This allows the server to automatically select the correct key for administration-specific tool calls.
There is also a reload_keys tool, which makes it possible to reload newly added or changed keys without fully restarting the server.
This makes the server more practical for environments where multiple administrations are managed or where access needs to be configured dynamically.
Technical approach
The server is built with:
- Node.js 20+
- TypeScript
- @modelcontextprotocol/sdk
- axios
- fast-xml-parser
- Yuki SOAP API
Yuki uses an authentication flow where a temporary sessionID is obtained through Authenticate(accessKey). That session is then used for subsequent API requests.
The MCP server handles this internally and caches sessions per API key. This avoids having to authenticate again for every tool call.
The implementation also hides some of the less convenient details of working with the Yuki API. For example, different Yuki webservices use slightly different naming conventions for session fields, such as sessionId and sessionID.
Those details should not leak into the agent workflow. They belong in the integration layer.
API limits and agent behavior
One thing to keep in mind when building agentic workflows is that agents can sometimes make more tool calls than expected.
For a human developer, it is natural to think carefully about API usage. An AI agent may instead try several tool calls in sequence to gather more context.
That means API limits matter.
Yuki applies daily limits to webservice calls per domain, with higher tiers available for environments that require more calls. Because of that, workflows should be designed carefully. In many cases, it is better to retrieve a broader dataset once and let the agent reason over that result, instead of repeatedly calling the same endpoint.
The MCP server provides the tool layer, but the orchestration around it remains important.
Good agent design still requires:
- clear boundaries;
- sensible defaults;
- rate limiting where needed;
- logging and monitoring;
- human approval for sensitive actions;
- careful handling of financial data.
Why we open sourced it
We published the Yuki MCP server as open source because we believe these kinds of integration layers will become increasingly important.
Many companies already have APIs. But APIs alone are not always agent-ready.
A good MCP server can turn an existing API into a safer, more structured interface for AI agents. It defines what an agent can do, how it should call those functions and what kind of data it receives back.
By open sourcing this project, we hope to make it easier for others to experiment with Yuki, MCP and AI-driven accounting workflows.
It is also a practical way for us to keep improving the implementation based on real-world use cases.
Improving the server through user feedback
One of the benefits of publishing this project as open source is that users can quickly point out which functions are still missing in real-world workflows. Shortly after publication, we received a request to add support for missing invoices: bank payments detected by Yuki for which no purchase invoice has been submitted yet.
In the Yuki web interface, this overview can be found under Mailbox → Missing invoices. For accountants and business owners, this is an important control point, because missing purchase invoices can make the administration incomplete.
Based on that feedback, we added the get_missing_invoices tool. It is available from version 1.4.0 of @codemill-solutions/yuki-mcp.
This allows an AI agent to retrieve the same missing invoices that would normally be visible in the Yuki interface. Combined with existing tools such as upload_document and process_purchase_invoice, this enables a practical end-to-end workflow: detect missing invoices, upload the correct document and continue processing the purchase invoice.
For us, this is exactly the kind of use case where an MCP layer adds value. Not by fully automating accounting without oversight, but by making recurring administrative signals easier to detect, follow up and integrate into a controlled workflow.
Where this is heading
We expect administrative and financial software to be used more and more by AI agents in the coming years.
That does not mean humans disappear from the process. Especially in finance, human review, authorization and accountability remain essential.
But many preparatory and repetitive tasks can become smarter:
- analyzing overdue invoices;
- finding missing documents;
- summarizing workflow questions;
- checking contacts and transactions;
- preparing draft invoices or bookings;
- uploading and classifying documents;
- generating management summaries;
- supporting accounting teams with repetitive checks.
In that context, an MCP server is not the end product. It is infrastructure.
It makes existing software accessible to a new generation of AI-powered workflows.
Built by CodeMill
At CodeMill, we build custom software, API integrations and AI solutions for organizations that want to improve their digital processes.
The Yuki MCP server is an example of how we approach that: pragmatic, open source where possible, and focused on making existing systems more useful instead of replacing them for the sake of it.
Using Yuki? Book a call about AI automation →
Prefer to dig into the technical side first? The code is open source on GitHub.
