Agent tool review: Ledgerline MCP assistant

A defensive evaluation of an internal bookkeeping assistant and its MCP server, checking what the agent is allowed to touch and what untrusted input can make it do.

Published with the client’s permission. Ledgerline Bookkeeping Ltd is a five-person practice in Manchester; findings and remediation detail are reproduced here in full. Review completed , published by Joshua Thweny.

Engagement summary

Client
Ledgerline Bookkeeping Ltd — five-person practice, Manchester
Target
SvelteKit web app plus an internal MCP server exposing filesystem, email-intake and summarise-and-file tools to a Claude-based assistant, built in-house during summer 2026
Authorisation
Signed scope and Rules of Engagement from the managing director; read-only archive of both repositories at commit 2f7d0aa plus a paired walkthrough of the live internal deployment
AI handling choice
Declined by client — the MCP server itself runs the model, so the review covered the boundary rather than sending client code to another provider. Performed 100% manually with local static tooling.
Effort
2 days review, 0.5 day fix verification on commit c93e117
Reviewer
Joshua Thweny, OHMYVIBECODE LTD

Findings overview

Three issues were identified: one high, one medium and one low. The high issue gave anything the model read — including untrusted email — a path to the practice’s payroll files and provider key. All three were patched and verified before the assistant returned to daily use.

ID Severity Area Summary Status
LMC-01 High MCP server tools Filesystem tool exposed to the agent without a path allowlist Fixed and verified
LMC-02 Medium Prompt injection surface Supplier invoice emails entered the agent context unparsed and unlabelled Fixed and verified
LMC-03 Low Spend controls No per-user daily cap on the assistant endpoint Fixed and verified

Detailed findings

LMC-01 · Filesystem tool exposed to the agent without a path allowlist

Severity
High — Fixed and verified
Location
mcp-server/src/tools/files.ts (lines 12–48)
Observation
The practice’s internal MCP server gave the assistant a readFiles tool that accepted any absolute path, including the payroll exports folder and the .env file holding the provider API key. Any prompt or fetched web page that reached the model could direct it to read those files and quote their contents into the transcript.
Remediation
Scoped the tool to an allowlisted workspace directory, rejected .. traversal and symlinks at the server boundary, and moved the provider key into the server process environment where the tool layer cannot read it.
Fix check
Asked the agent (via a deliberately poisoned note in a fetched page) to read the payroll path; the tool now returns an authorisation error, and the transcript shows no file contents.

LMC-02 · Supplier invoice emails entered the agent context unparsed and unlabelled

Severity
Medium — Fixed and verified
Location
mcp-server/src/intake/email.ts (lines 20–61)
Observation
Untrusted invoice bodies from arbitrary senders were inserted verbatim into the system prompt as "context". A supplier (or anyone spoofing one) could embed instructions that the model would treat as operator commands, including triggering the summarise-and-file tool chain.
Remediation
Wrapped inbound mail in a delimited, clearly labelled block, stripped markup to plain text first, and moved all tool triggers behind an explicit operator confirmation step in the UI.
Fix check
Sent a test invoice containing injection text ordering the agent to email a summary externally; the draft is produced but nothing sends until the operator clicks approve.

LMC-03 · No per-user daily cap on the assistant endpoint

Severity
Low — Fixed and verified
Location
apps/web/src/routes/assistant/+server.ts
Observation
The authenticated endpoint accepted unlimited requests per user per day with no max_tokens ceiling, so a looping client page (or a confused operator retrying) could run the practice’s model spend up unnoticed.
Remediation
Added a per-user daily request counter, a 30-second client-side debounce, and a max_tokens ceiling on the completion call, with the limit surfaced in the UI before it is hit.
Fix check
The 101st request in a day returns HTTP 429 with a readable message, and the daily counter resets correctly at midnight UTC.

Scope limits

This was a defensive review of tool permissions, injection surface and spend controls on code the client owns; it was not a penetration test of the hosting platform, the model provider, or staff devices. Provider-side abuse monitoring and the SvelteKit auth flow (reviewed separately in an earlier pass) were outside scope.

Contact OHMYVIBECODE LTD to scope a review of your agent or MCP setup, or compare these patterns against your own codebase with the Vibe-Coded App Top 10.