Skip to content

IT-Vault 2.2.0 — an agent can run the register

Choose a tag to compare

@shatheitguy shatheitguy released this 19 Sep 11:45
· 153 commits to main since this release

IT-Vault now ships an MCP server, so an AI agent can work the register the way a person does.

Twenty tools over IT-Vault's own HTTP API: find a device, see who has it, assign it, take it back, raise and answer tickets, chase expiring contracts, and deal with the reports that arrive when a stranger scans a lost asset's tag.

cd mcp && pip install -e .
ITVAULT_URL=http://itvault.lan:5000 ITVAULT_API_KEY=your-key itvault-mcp --selftest

Wiring for Hermes, OpenClaw and ZeroClaw is in mcp/README.md.

The permission story is one sentence

Every call is authenticated with an IT-Vault API key, so the agent has exactly the rights of the user that key belongs to, and nothing in the server can exceed them. Give a watching agent a key from a read-only user and no amount of prompting changes anything.

Two switches on top, because a role is coarser than intent:

  • ITVAULT_MCP_READONLY=1 refuses every write regardless of the key.
  • ITVAULT_MCP_ALLOW_DELETE=1 is required for trash_asset, which is also marked destructive so a host that confirms destructive tools will confirm it. Kit should not leave the register because a sentence sounded like it should.

Three things the design turns on

  • PUT /api/assets/<id> rewrites all seventeen columns. A partial update from an agent would blank the serial, the location and the holder. Every write reads the record first and lays the change on top — and a test fails if any write ever bypasses that.
  • An agent pays for every token it reads. Lists are trimmed to the fields that answer "which one is this and what is happening with it", and the signature blob — a multi-kilobyte data URI — is never handed over.
  • Exact matching. get_asset takes an asset tag, the code printed on a QR label, or an id, and IT-10 never resolves to IT-1004.

Tested on both sides of the seam

mcp/test_server.py runs the tools against a stub IT-Vault that records every request: the merge keeps every field, both gates hold, and the key only ever travels as a header. tests/test_mcp_contract.py checks that all eighteen routes the tools call exist in app.py with that method — rename one and it fails there rather than under an agent mid-task.

Found while verifying against a real server: whoami read the identity from the wrong field and reported an empty user. That route also returns the account's own API key, so whoami picks fields rather than forwarding the response — otherwise the key would land in the agent's transcript. Both are covered now.

Upgrading

Pull the matching image; the MCP server runs on the agent's side and needs nothing on the server beyond an API key. The APK carries no app changes in this release — versions move together by design.