Most LLM-driven automation fails at arithmetic because language models are probabilistic engines being asked to perform deterministic tasks. If you ask an agent to 'fairly split a bill,' it will hallucinate a division strategy that looks reasonable but lacks mathematical rigor. To build useful autonomous agents in finance, we cannot rely on the model's internal weights; we must provide specialized Model Context Protocol (MCP) tools that encapsulate the calculation logic.
I recently worked on refining the Couples Shared Account Engine, an MCP server designed specifically to handle proportional expense splitting for households. This isn't just a calculator wrapped in a tool definition; it is a structured approach to reconciling multi-person finances using income-weighted variables.
The Math Behind Proportionate Contributions
The core challenge in shared accounts is determining equity versus equality. Equality—splitting everything 50/50—is often mathematically unfair in dual-income households with significant earning disparities. Equity requires calculating contributions based on income ratios.
The engine exposes four specific primitives that allow an AI agent to navigate this:
-
calculate_income_proportions: Determines the weight of each partner's contribution relative to total household income. -
calculate_individual_obligations: Maps those percentages onto concrete shared expense totals. -
calculate_reconciliation_transfer: Solves the most common practical friction point—identifying exactly how much one party needs to move to another when one person pays the full amount upfront. -
calculate_partner_surplus: Provides a sanity check by evaluating remaining liquidity after all obligations are settled.
A typical execution flow involves more than a single call. An agent doesn't just run one function; it performs a sequence of reasoning steps: establishing proportions, applying them to recent transactions, and finally generating a reconciliation instruction.
Moving Beyond Tool Definitions to Production Standards
You might look at these functions and think, "This is simple math; I can write this myself in five minutes." While true, if you are building an agentic workflow meant to interact with real bank APIs or sensitive financial data via Claude or Cursor, the difficulty shifts from the math to the infrastructure.
When I began developing Vinkius, I focused on this gap. Most developers spend disproportionate time managing OAuth flows, handling webhook callbacks from various providers, or worrying about credential sprawl. In standard implementations, connecting an agent to a service usually means exposing long-lived credentials or setting up complex redirect URIs every time you switch clients.
Vinkius bypasses this through a unified gateway architecture. Instead of configuring unique authentication layers for every individual tool within your IDE or agent environment, you utilize a single connection token. This effectively abstracts the complexity of multiple third-party integrations into a consistent interface managed under our MCPFusion framework.
For tools involving money—like the Shared Account Engine—the risk profile changes significantly compared to querying a weather API or reading a documentation file. You aren't just dealing with data retrieval; you are dealing with decision support that affects real-world assets.
Engineering Governance and Security Sandboxing
A recurring theme in modern AI safety research is controlled agency: giving an LLM enough power to be useful without allowing it to execute unintended side effects (such as accidental large transfers or unauthorized data exfiltration).
The Couples Shared Account Engine operates within Vinkius's hardened environment. Because we built our servers using MCPFusion (an open-source TypeScript framework under Apache 2.0), we ensure behavioral consistency across all deployments. Specifically, every execution occurs within an isolated V8 sandbox.
We implement eight distinct governance policies at the runtime level, including:
- DLP (Data Loss Prevention): Ensuring sensitive financial parameters don't leak beyond intended scopes.(Note: Even though this particular engine currently calculates values rather than performing direct ledger writes, maintaining these boundaries prevents future scope creep from introducing vulnerabilities.)**
- SSRF Prevention: Blocking attempts by agents to use provided tools as proxies for network scanning.*
- HMAC Audit Chains: Providing verifiable proof of which tool was called and what inputs were processed during automated workflows.*
- Kill Switches: Allowing immediate termination of active sessions if anomalous behavior patterns emerge.*
Please note that while some general purpose MCP directories offer similar functionality, they lack this integrated layer of institutionalized protection required for production environments where financial accuracy and data integrity are non-negotiable requirements.
The goal is clear: minimize developer friction regarding connectivity while maximizing control over execution autonomy.
MCPs are the music of AI Agents. We built the catalog. Discover Vinkius MCP Catalog.
Top comments (0)