blok-berichtsheft
An MCP server that automates filling out BLok Berichtsheft (training reports) via browser automation using Playwright.
README
blok-berichtsheft MCP server
An MCP server that fills out your BLok Berichtsheft
(Ausbildungsnachweis) via browser automation. BLok is an Apache Wicket app whose forms autosave
per-field over AJAX (change for dropdowns, blur for text/number fields) — there's no public API,
so this drives a real headless Chromium with Playwright instead of raw HTTP calls.
Setup
npm install
npx playwright install chromium
npm link # exposes the `blok-berichtsheft-mcp` binary on PATH
cp .env.example .env # then fill in your real credentials
.env is only used when running the server or scripts standalone (e.g. blok-berichtsheft-mcp
directly). It is git-ignored — never commit it.
Registering with Claude Code
claude mcp add blok-berichtsheft -s user \
-e BLOK_USERNAME=your-username -e BLOK_PASSWORD=your-password \
-- blok-berichtsheft-mcp
(or, without npm link, use -- node /absolute/path/to/index.js instead)
Check it's connected:
claude mcp get blok-berichtsheft
Credentials passed via -e are stored in ~/.claude.json, not in this project — that's what Claude
Code actually uses at runtime. The .env file here is a separate, optional copy for local testing.
To remove: claude mcp remove blok-berichtsheft -s user
Registering with opencode
opencode has a native opencode mcp add command, but the simplest path is editing its config
directly (~/.config/opencode/opencode.jsonc or opencode.json in a project) and adding an entry
under mcp:
"mcp": {
"blok-berichtsheft": {
"type": "local",
"command": ["blok-berichtsheft-mcp"],
"environment": {
"BLOK_USERNAME": "your-username",
"BLOK_PASSWORD": "your-password"
},
"enabled": true
}
}
(or "command": ["node", "/absolute/path/to/index.js"] without npm link)
Verify with:
opencode mcp list
Registering with Codex CLI
Codex CLI (codex, from OpenAI) configures MCP servers in ~/.codex/config.toml:
[mcp_servers.blok-berichtsheft]
command = "blok-berichtsheft-mcp"
env = { "BLOK_USERNAME" = "your-username", "BLOK_PASSWORD" = "your-password" }
(or command = "node", args = ["/absolute/path/to/index.js"] without npm link)
Recent Codex CLI versions also support codex mcp add, e.g.:
codex mcp add blok-berichtsheft \
--env BLOK_USERNAME=your-username --env BLOK_PASSWORD=your-password \
-- blok-berichtsheft-mcp
Codex CLI isn't installed on this machine, so this section is based on documented conventions
rather than a locally verified run — check codex mcp --help / codex --help against your
installed version if the exact flags differ.
Tools
All date parameters are YYYY-MM-DD and must fall on a Monday–Friday (BLok doesn't track weekends).
Passing any date within a week navigates to that week automatically — past or future.
get_week(date?)— reads the week containingdate(defaults to the current week): each day's location, presence, activities (text + hours), the week's department and remarks.add_activity(date, text, hours?, location?, presence?, department?)— adds an activity entry for a day. Reuses an empty row for that day if one exists, otherwise adds a new row.set_day_status(date, location?, presence?)— sets a day's location/presence without adding an activity.list_departments(date?)— returns the account's actual valid "Abteilung/Sparte" codes (read live from the account's own autocomplete list). Call this and ask the user which one applies before callingset_departmentoradd_activitywith a department — never guess a code.set_department(date, department)— sets the week's "Abteilung/Sparte" field to a code returned bylist_departments.set_week_remarks(date, text)— sets the week's free-text "Bemerkungen".
location is one of berufsschule, ausbildungsbetrieb, ueberbetrieblich.
presence is one of anwesend, arbeitsunfaehig, abwesend, urlaub, sonderurlaub, feiertag.
hours accepts any format BLok itself accepts: "1h:30min", "1:30", or "1,5".
What it deliberately does not do
None of these tools touch "Freigeben zur Abnahme durch Ausbilder" — submitting a week for trainer approval stays a manual, in-app action.
Files
index.js— MCP server entry point, tool definitions (schemas viazod)report.js— page actions: read/write entries, day status, department, remarksbrowser.js— login, session reuse, and week navigation (parses the "Kalenderwoche vom … bis …" banner and clicks the week-forward/backward links until it lands on the target week)
Known quirk
The "Abteilung/Sparte" field is a jQuery UI autocomplete widget. Do not send Escape to close its
suggestion menu after typing — jQuery UI's default Escape handler reverts the field to its prior
value, which silently discards the edit before the save fires. Just blur the field (e.g. Tab).
Known issues
- Adding a brand-new row can occasionally throw
Clicked "Zeile hinzufügen" but no new activity row appearedeven though the row is added server-side a moment later — BLok's AJAX response for that specific action is sometimes slower than the fixed wait this checks against. Safe to just retry the sameadd_activitycall; it will reuse the now-existing empty row instead of adding another one. - No delete/remove tool yet. BLok's UI does support deleting a row (a "Zeile löschen" link sits
next to each activity row), so this is addable, but no
remove_activitytool exists in this version. - BLok also disables editing for weeks too far in the future (somewhere between 4 and 7 weeks ahead, in testing) — not a bug in this tool, just BLok's own limit on how far in advance you can log entries.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.