# Keep license tools away from your AI agents, and reconcile MSP seats in plain code instead

> Source: <https://dev.to/bot2botlabs/keep-license-tools-away-from-your-ai-agents-and-reconcile-msp-seats-in-plain-code-instead-34gn>
> Published: 2026-11-16 18:17:00+00:00

*Former CFO keeping the books on AI agents and vibe-coded apps. Dated costs, fix logs, security checks.*

Security vendors are starting to ship hosted MCP servers, so AI agents can work directly inside their consoles. The well-built ones sign AI clients in with OAuth 2.1, give an agent only the access its admin's role already has, and require synchronous in-chat approval before an action runs. The MCP specification's [Authorization](https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization) and [Elicitation](https://modelcontextprotocol.io/specification/2025-11-25/client/elicitation) sections describe both building blocks.

That's the right foundation. Here's the control we'd add on top of any MSP-facing server: **keep license, trial and billing tools off the AI's tool list entirely.**

From the finance side, a license allocation is a purchase order. Ending a trial is a revenue event. Put either in reach of a model that reads tickets and emails (any of which can carry a prompt injection) and one well-placed sentence becomes 200 seats on next month's invoice. Approvals help, but they get rubber-stamped at 4:55 on a Friday. Removing the tool removes the problem.

The AI was never the main leak. The leak is the gap between two systems that are supposed to agree and drift apart every month:

They drift for boring reasons. A tech onboards six laptops and nobody touches the agreement. A client offboards and the PSA keeps invoicing. Seats get allocated "for growth" and sit idle. A new product goes live with no SKU in the price book.

We wrote a small reconciler for exactly this gap. It sorts every discrepancy into one of seven buckets:

**The trap we fell into ourselves:** our first version flagged "billing for seats in use above the allocation" as *overbilling*. It isn't. If the client is using 61 seats and you bill 61, your billing is right. The gap belongs to the vendor side (#5), and it goes to a different person. Overbilling only means billing above **both** what's allocated and what's in use. A test now pins that case.

Here's an excerpt (6 of the 10 exceptions) from a run on the example's fictional sample data. The tenants, product names and prices are all made up:

```
UNBILLED         acme-dental        EDR-Endpoint       44 active, 40 billed  [unbilled $36.00/mo]
ORPHAN_TENANT    evergreen-cpa      EDR-Endpoint       12 active / 12 allocated, nothing billed (no PSA agreement for this tenant)  [unpriced: no PSA line to price from]
OVERBILLED       blue-harbor-law    EDR-Endpoint       25 billed, 22 allocated, 22 active (credit/refund exposure)  [credit exposure $27.00/mo]
GHOST_BILLING    foxglove-studio    SEC-EDR            billing 15 × SEC-EDR with no matching vendor seats (offboarded? mapping error?)
OVER_ALLOCATED   delta-logistics    MFA-Auth           61 active, 60 allocated (vendor overage / true-up exposure)
IDLE_SEATS       cedar-clinic       EDR-Endpoint       30 allocated, 18 active  [idle cost $66.00/mo]

unbilled revenue $36.00/mo · overbilling exposure $27.00/mo · idle-seat cost $70.50/mo · 10 exception(s)
```

Read it like a controller: the lines that *can't* be priced yet (the orphan tenant, the ghost billing) are usually the biggest numbers. A report that only totals what it can price understates the problem.

One question worth asking your vendor: can a read-only API or MCP client see **license allocation per tenant** at all? If not, that column comes from a license export instead. The script takes CSVs, so it doesn't care where the numbers come from.

The reconciler is open source: a single zero-dependency Node script (no network, no LLM, money in integer cents) with tests and the fictional sample data above. See [`examples/msp-seat-reconcile` on GitHub](https://github.com/bot2botlabs/mcp-ship-check/tree/main/examples/msp-seat-reconcile). It's the companion to [Shelf Watch #3: What good looks like on a hosted enterprise MCP server](https://github.com/bot2botlabs/mcp-ship-check/blob/main/docs/shelf-watch-3.md), our blueprint for multi-tenant MCP servers.

How are you reconciling vendor seats against your PSA today: a monthly spreadsheet, a PSA integration, or not at all?

*Not sponsored. The sample data is fictional.*
