Skip to main content
Glama
AxemaVaka-MCP

AxemaVaka-MCP

by draca-glitch

AxemaVaka-MCP

An MCP server and a small Python client for the web admin of an Axema Vaka access control system. It lets an AI agent do the work a Vaka administrator does: look up people, tags and access groups, read the event log, handle bookings, change door codes and PINs, and upload or remove the PDFs shown on the information screens, see the state of the doors, unlock one remotely, acknowledge alarms and take a backup.

Unofficial. Not made by, endorsed by or supported by Axema, and it contains no code from Axema. It talks to the same JSON API the Vaka web app itself uses, with an operator account you create for it in Vaka.

This MCP does not infringe on VAKA Online, Axema's cloud service. It does not use VAKA Online, connect to it or replace it. It talks only to the web admin on your own controller, at the address you put in VAKA_URL, and nothing passes through Axema's servers.

Why this exists

Vaka is administered through a Java client or a web app, and neither offers an interface a program can use. We run Vaka in a housing cooperative and wanted our agent to take over the routine admin: who has which tag, who booked the laundry room, why a door refused someone last night, swapping the notice on the info screen. The alternative was an agent clicking through a browser, which is slow (about ten seconds a page), breaks when the layout changes and is hard to put a safety check in front of.

So we looked at how the web app talks to the controller and wrote a client for that. One call takes about 0.3 seconds, needs no browser, and every change the agent makes through the MCP goes through a preview first, because this system opens real doors.

Related MCP server: Bygglov Ärendesystem MCP Server

How it works

  • Login. The client fetches a nonce, then logs in with md5(nonce + md5(password)), the scheme the web app uses. Every later call carries the session cookies and the X-XSRF-TOKEN header.

  • One login per burst of work. The server logs in when a tool first needs the controller, keeps that session for the tool calls that follow and logs out after five idle minutes (VAKA_SESSION_IDLE) or when it stops. Vaka writes every login and logout to its event log, so a login per call would fill the log. If the controller ends the session in between, the server logs in again and repeats the call. Vaka allows an operator one session at a time, so give the agent its own operator account: a login from here ends any session a person has open as the same operator.

  • Reads are direct. Tables are read through database/<table>. PINs, door codes, password hashes and any field named like a password or secret are shown as <set> unless the caller passes reveal_codes.

  • Writes are two-step. A write tool called without confirm_token changes nothing: it returns what would change and a token. Called again with the same arguments and that token, it writes, reads the record back and logs the change. The token is random, works for one write and for 30 minutes, and is tied to the request and to the values the preview showed. So a write cannot skip its preview, one approval cannot be replayed, and if the values shown have changed in between a new preview is needed. Tokens die when the server restarts.

  • Audit. Every write an MCP tool completes appends a line to audit.jsonl in the audit directory, and so does an upload that fails. Before an update or a delete the record is saved there as it was, codes included, because that copy is what you restore from. A PDF that is replaced or deleted is copied there first. The files are mode 600 and the directory is created mode 700; if you point VAKA_AUDIT_DIR at a directory of your own, keep it private.

  • On https the certificate is always checked. There is no switch to skip that.

Tools

Tool

Kind

What it does

vaka_whoami

read

Log in and show the operator session

vaka_find_person

read

Find persons by name, email or id

vaka_get

read

One record from any table; persons with their tags and access groups, access groups with their doors

vaka_list

read

Rows of any table, with Vaka's filters

vaka_doors

read

All doors with their time schedule

vaka_accessgroups

read

All access groups with doors, schedule and whether a door code is set

vaka_events

read

The access and event log for a period, newest first, with a text filter

vaka_bookings

read

Bookings with time, the object booked (laundry room and the like) and who booked

vaka_files

read

Files of the info centre and the playlist slots that show each

vaka_door_status

read

Live state of one door or all: online, open, unlocked, alarm

vaka_alarms

read

Alarms nobody has acknowledged yet

vaka_download_file

read

Save a stored PDF into the download directory on the machine the server runs on

vaka_update

write

Change fields on one record of a table

vaka_create

write

Create a record in a table (person, booking, playlist item ...)

vaka_delete

write

Delete one record

vaka_set_door_code

write

Set the door code of an access group

vaka_set_person_pin

write

Set a person's PIN

vaka_set_operator_password

write

Set an operator's web admin password

vaka_door_in_accessgroup

write

Add a door to an access group or take it out

vaka_upload_pdf

write

Upload a PDF to the info centre; replaces one with the same name and keeps it in the same playlist slots

vaka_delete_file

write

Remove a PDF or web link and empty the playlist slots that show it

vaka_door_control

write

Unlock a door for a moment, leave it unlocked, or lock it again, and report the controller's answer

vaka_ack_alarm

write

Acknowledge one alarm

vaka_set_clock

write

Set the controller's clock to this machine's clock

vaka_backup

write

Make the controller write a backup and save the file into the download directory

vaka_raw

both

Any call under web_client/. Table reads and the name lookups run at once, everything else is two-step

What the admin can do and how far this gets

Everything the web app stores goes through database/<table>. All 27 tables can be read, and all but the event log and live person state can be changed with vaka_update, vaka_create and vaka_delete (info centre files are deleted with vaka_delete_file). That covers persons and tags, organisation groups, access groups, time schedules and calendars, doors, zones, modules, entry phones, booking objects and bookings, the info centre, fault reports and operator rights.

Some things the app does are actions, not records:

Action

Tool

State

See whether doors are online, open or unlocked

vaka_door_status

run against a real controller

Unlock a door for a moment, leave it unlocked, lock it again

vaka_door_control

built from the web app's calls; never sent to a real door

List and acknowledge alarms

vaka_alarms, vaka_ack_alarm

listing run for real (there were none); acknowledging never sent

Set the controller's clock

vaka_set_clock

preview run for real; setting never sent

Make a backup and fetch the file

vaka_backup

run against a real controller: 20 seconds, a 5.8 MB file

Set the time zone

none, vaka_raw: PUT set_time_zone

call shape known, never run

Blacklists, offline doors and profiles

none, vaka_raw

not looked at

Person photos, pictures of booking objects

none

the app resizes pictures itself before sending them; not done here, and vaka_raw carries text only

vaka_door_control only works on doors that have remote control allowed in Vaka (the door's allow_pc_remote_control); the web app greys its button out on the others. It sends the command, then listens on the controller's websocket and reports what the controller answered: executed, or denied and why. "Never sent" above means what it says: the calls are copied from the web app's code and tested against a stand-in, and the first real use is the test.

Tested

Unit tests run against a stand-in server that speaks the same protocol (tests/). "Live" means run against a real controller, an Axema B60 with Vaka 5.12.0001, on 2026-12-02 with the code of version 0.1.0; the download tool was run again with 0.1.1, events, bookings and the kept session with 0.1.2, the door, alarm and clock tools with 0.2.0, the backup with 0.3.0.

Function

Unit tests

Live

Login, XSRF header, logout

yes

yes

One login kept across tool calls, logged out when idle, replaced when the box ended it

yes

kept across calls: yes

No session or socket left behind after a failed login

yes

no

Settings and secrets files, permission check, environment override

yes

yes

Profiles: separate files, write log and downloads per system

yes

no

Clear error when the box or its web backend is down

yes

no

vaka_whoami

yes

yes

vaka_find_person

yes

yes

vaka_get person, access group, file

yes

yes

vaka_list

yes

yes

vaka_list paging when the box cuts a list

yes

no: the box returned whole tables; the offsets it takes were checked with one call

vaka_doors, vaka_accessgroups

yes

yes

vaka_events

yes

yes

vaka_bookings

yes

yes

vaka_files, vaka_download_file

yes

yes

vaka_upload_pdf, new file

yes

yes, stored bytes compared with what was sent

vaka_upload_pdf, replacing a file of the same name

yes

yes

vaka_upload_pdf moving a playlist slot to the new file

yes

yes, on a playlist item no playlist uses

vaka_delete_file, emptying the slot

yes

yes, same

vaka_update

yes

yes, same

vaka_create, vaka_delete

yes

yes, same

vaka_create person with a login

yes

no

vaka_create booking

yes

no; the name of its domain parameter is taken from the app's code

vaka_set_door_code, vaka_set_person_pin, vaka_door_in_accessgroup

yes

no: they change who gets through a real door

vaka_set_operator_password

yes

no

Preview token refused when made up, used twice, expired or when the previewed values changed

yes

made up and used twice: yes

vaka_door_status and the websocket it reads

yes

yes: all doors answered

vaka_door_control: the call, the controller's answer, refusal, silence

yes

no: never sent to a real door. Refusing a door without remote control: yes

vaka_alarms

yes

yes (none to list)

vaka_ack_alarm

yes

no

vaka_set_clock

yes

preview only

vaka_backup

yes

yes: backup made and file saved

vaka_raw table read

yes

yes

vaka_raw action behind the preview

yes

preview only

vaka export-events

yes

no (the client it was ported from exported 13 months on the same box)

Browser helper tools/browser/vaka-browser.mjs

no

yes: net on the doors screen, certificate checked

Run the unit tests with python3 -m unittest discover -s tests. They need nothing but Python.

Install

Standard library only. Written for Python 3.9 or newer; it has only been run on 3.14.

pipx install git+https://github.com/draca-glitch/AxemaVaka-MCP

or clone the repository and run it from there with PYTHONPATH pointing at the clone.

In Vaka, create an operator for the agent with the rights you want it to have, log in once by hand as that operator and set its password (Vaka forces a change at first login, and the client stops if that is still pending).

Configure

Two files, because one of them is a secret.

~/.config/axema-vaka/settings.env (or the path in VAKA_SETTINGS):

VAKA_URL=https://vaka.example.com/admin
VAKA_TZ=Europe/Stockholm
VAKA_LANG=sv

~/.config/axema-vaka/secrets.env (or the path in VAKA_SECRETS), mode 600. The client refuses to read it if anyone else can:

VAKA_USER=agent@example.com
VAKA_PASS=the operator's password

A VAKA_* variable in the process environment overrides both files. All settings are listed in settings.env.example.

Several Vaka systems

One server looks after one Vaka system. For several, say one per customer, give each a profile: a folder of its own with its two files.

~/.config/axema-vaka/north/settings.env
~/.config/axema-vaka/north/secrets.env
~/.config/axema-vaka/south/settings.env
~/.config/axema-vaka/south/secrets.env

and register one server per profile:

claude mcp add vaka-north --env VAKA_PROFILE=north -- vaka-mcp
claude mcp add vaka-south --env VAKA_PROFILE=south -- vaka-mcp

Each server then has its own login, its own write log and record copies (~/.local/state/axema-vaka/north/audit) and its own downloads, and tells the agent which system it is. The agent sees two separate sets of tools, so a door command cannot reach the wrong customer's controller through a mistyped argument. From a shell: vaka --profile north whoami.

Where the controller is

  • Same network. It works locally: put the controller's address or local name in VAKA_URL. Ours answers on https only. If yours has its own certificate rather than one from a public authority, save that certificate and point VAKA_CA_FILE at it; the certificate has to name the address or name you put in VAKA_URL. (We have not run it that way ourselves; ours has a public name.)

  • From the internet. The controller needs a domain name that points at it, its https port reachable from outside and a certificate for that name. VAKA_URL is then https://<that name>/admin. Think before you put a door controller on the open internet; a VPN is the safer way in.

  • Through a VPN or tunnel. Use the domain name in VAKA_URL and put the tunnel address in VAKA_CONNECT_IP. The client connects to the address and still checks the certificate against the name. This is how we run it.

Plain http:// is refused unless VAKA_ALLOW_HTTP=1 is set. Only a controller on the same machine (127.0.0.1, localhost) is exempt.

Use

As an MCP server (stdio), for example in Claude Code:

claude mcp add vaka -- vaka-mcp

or from a clone:

claude mcp add vaka --env PYTHONPATH=/path/to/AxemaVaka-MCP -- python3 -m axema_vaka.server

From a shell:

vaka whoami
vaka get 'database/door'
vaka put 'database/door' '{"id": 3, "name": "Cellar"}' --write
vaka export-events ./events 13

From Python:

from axema_vaka import Vaka
with Vaka() as v:
    doors = v.get('database/door')['doors']

Finding out how the web app does something

tools/browser/vaka-browser.mjs opens an admin screen in a headless browser as the same operator and lists the API calls the screen makes (net <route>) or prints its text (page <route>). That is how a new admin function gets added here: watch what the app sends, then send the same. It needs Node and playwright-core; setup is in the file.

Things to know

  • Person records hold PINs and personal data, and the event log shows who passed where. Decide what your agent may keep and say so in its instructions.

  • Tool arguments come from a model, so the server does not trust them: a table name has to be one of the real tables, a raw path a plain one, and a download lands in the download directory under a plain file name, never over an existing file.

  • The vaka command and the Python class are for people and scripts. Their only guard is --write: no preview, no audit log.

  • The two-step write makes sure a preview happened and that nothing changed since. Whether a person really approved it is up to the agent and the client it runs in: keep the write tools behind a permission prompt.

  • A backup file holds the whole system, PINs and door codes included. vaka_backup saves it mode 600 into the download directory; treat it like the secrets file.

  • The controller writes an uploaded PDF a moment after the upload call returns. The upload tool waits until it can read the file back and compares it with what it sent before it touches the file it replaces.

  • The controller can give a new record the id of one deleted earlier. A playlist slot that still points at a file deleted long ago will show a new file that happens to get the same id. The upload tool reports such slots.

  • An update of the Vaka software can change the API. docs/protocol.md has what we know and which version it was read from.

Licence

MIT, see LICENSE. "Axema" and "Vaka" are names that belong to Axema and are used here only to say what this software works with.

Available Tools

20 tools
vaka_accessgroupsC

All access groups with door code status, time schedule and doors.

Inputs: reveal_codes.

vaka_bookingsA

Bookings (reservations of bookable objects such as a laundry room) with local times and the booking person. Future only unless include_past.

Inputs: include_past.

vaka_createB

WRITE. Create a record in any table. Person: password_plain gives an operator login. Reservation fields: booking_time, start_minute, stop_minute, start_time, stop_time (Vaka seconds), identity_type (0 group, 1 person, 2 service), identity, person, reservation_object, reservation_node, reservation_status; the domain is worked out from reservation_object. Two-step.

Inputs: table (required), fields (required), domain_id, reveal_codes, +1 more.

vaka_deleteA

WRITE. Delete one record (the record is saved first). Deletes that row only: references to it from other records are not cleaned up. Info centre files go through vaka_delete_file. Two-step.

Inputs: id (required), table (required), confirm_token.

vaka_delete_fileA

WRITE. Remove a file (PDF, web link) from the info centre and empty the playlist slots that show it. Two-step.

Inputs: id (required), confirm_token.

vaka_door_in_accessgroupB

WRITE. Add (member=true) or remove a door from an access group. timegroups defaults to ["door_bitmap_timegroup_0"]. Two-step.

Inputs: member (required), door_id (required), accessgroup_id (required), timegroups, +1 more.

vaka_doorsC

All doors with id, name and time schedule.

Inputs: no named parameters.

vaka_download_fileC

Save the stored content of an info centre file (a PDF) to a local path.

Inputs: id (required), path (required), overwrite.

vaka_eventsB

Access/event log as CSV rows (Time;Source;Event;User;Event Id;Operation). Default last 24 h. contains = "text|other" filter. lang "sv" gives Swedish event names, anything else English.

Inputs: to, from, lang, hours, +2 more.

vaka_filesC

Files of the info centre (PDFs, web links, clock, tenant list) with the playlist slots that show each.

Inputs: no named parameters.

vaka_find_personB

Find persons (residents, apartments, contractors, operators) by name, email or id. No codes returned.

Inputs: query (required).

vaka_getB

Get one record by id from a table. Persons include their identities (tags) and access group names; access groups include door names. Codes redacted.

Inputs: id (required), table (required), reveal_codes.

vaka_listA

List the rows of a table, optionally with Vaka filters such as {"filterexact_organisationgroup_id": 10} (also filteroutexact_, filtergreaterthan_, filterlessthan_). List rows are often shorter than the full record; use vaka_get for one record. Codes redacted.

Inputs: table (required), limit, filters, reveal_codes.

vaka_rawB

Escape hatch: any call under /web_client/. GET on database/ and the name lookups runs directly; everything else is two-step, GET included, because action paths (door_control, command, backup, set_time ...) change things or open doors.

Inputs: path (required), method (required), body, params, +2 more.

vaka_set_door_codeB

WRITE. Set the door code of an access group. Two-step.

Inputs: code (required), accessgroup_id (required), reveal_codes, confirm_token.

vaka_set_operator_passwordB

WRITE. Set a web-admin operator's password (forces a change at next login unless no_forced_change). Two-step.

Inputs: password (required), person_id (required), confirm_token, no_forced_change.

vaka_set_person_pinB

WRITE. Set a person's PIN. Two-step.

Inputs: pin (required), person_id (required), reveal_codes, confirm_token.

vaka_updateA

WRITE. Change fields on one record of any table (partial record, snake_case field names as vaka_get returns them). Two-step.

Inputs: id (required), table (required), fields (required), reveal_codes, +1 more.

vaka_upload_pdfA

WRITE. Upload a PDF from a local path to the info centre. A PDF with the same display name is replaced: the playlist slots that showed the old one show the new one, then the old one is removed. Two-step.

Inputs: path (required), display_name, confirm_token.

vaka_whoamiA

Check the connection: log in as the configured operator and return the session record.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 20 tools

    Disambiguation4/5

    The specialized readers (vaka_doors, vaka_accessgroups, vaka_files, vaka_bookings, vaka_events) overlap in practice with generic vaka_list, and vaka_set_door_code/vaka_set_person_pin partly duplicate vaka_update. However, descriptions make the intended split clear (generic table access vs. curated joined views, redacted search vs. full record) and vaka_raw is explicitly framed as a last-resort escape hatch.

    Naming Consistency3/5

    All names share the vaka_ prefix, but the convention is mixed: verb_noun (vaka_get, vaka_list, vaka_create, vaka_update, vaka_delete, vaka_set_door_code) alongside bare-noun readers (vaka_doors, vaka_accessgroups, vaka_events, vaka_bookings, vaka_files). It stays readable, but an agent has to learn that noun-only names are implicit 'list all' aliases alongside vaka_list.

    Tool Count4/5

    Twenty tools is toward the heavy end, but the domain genuinely spans persons, doors, access groups, events, bookings and info-centre files, and each tool maps to a distinct operation. The count is defensible, though a couple of the read aliases could be folded into vaka_list.

    Completeness4/5

    Coverage is strong: generic CRUD across any table plus targeted writes (door code, PIN, operator password, access-group membership), full info-centre lifecycle (list, download, upload, delete) and read views for events/bookings. Remaining gaps are around time schedules/timegroups and playlist management, which are only reachable via defaults or the vaka_raw escape hatch.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables LLM agents to manage Okta organizations through natural language, providing full CRUD operations for users, groups, applications, policies, and system logs via Okta's Admin Management APIs.
      3,638 PyPI
      83
      Apache 2.0
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables an AI agent to act as a security operations operator by providing tools to monitor camera feeds, analyze scenes, review situations and alarms, acknowledge or resolve alarms, make voice announcements, and consult audit trails and system status.
      -
    • A
      license
      A
      quality
      A
      maintenance
      Enables Claude clients to read and modify workplace and facilities management data through a REST API, with every write and state-changing tool gated behind a user confirmation prompt or a single-use confirmation token.
      53
      102 npm
      1
      MIT