webling-mcp
# webling-mcp
An [MCP](https://modelcontextprotocol.io) server for [Webling](https://www.webling.eu), the association / club management software (Vereinsverwaltung). It lets Claude and other MCP clients look up members, groups, invoices, events and any other Webling data through the official Webling REST API.
> 🇩🇪 **Kurz auf Deutsch:** Mit diesem MCP-Server kann Claude (oder ein anderer MCP-Client) direkt auf eure Webling-Vereinsverwaltung zugreifen: Mitglieder suchen, Gruppen anzeigen, offene Rechnungen und Kontostände prüfen, Termine abfragen. Standardmäßig wird nur **gelesen**; Schreiben (Anlegen, Ändern, Löschen) muss ausdrücklich mit `WEBLING_READONLY=false` eingeschaltet werden. Ihr braucht einen API-Key aus Webling (Administration → API) und die Adresse eurer Instanz.
**Status:** early (v0.2). Not affiliated with or endorsed by Webling / uSystems GmbH.
## Features
### Read (always available)
| Tool | What it does |
|---|---|
| `webling_info` | Connection check: instance, API key identity, settings, quota |
| `webling_schema` | Data model of *your* instance: object types, member fields, enum values |
| `webling_query` | List any object type with Webling filter + sort syntax, paging, field selection, total count |
| `webling_get` | Fetch objects by ID |
| `webling_find_members` | Search members by name / e-mail, optionally within a group (incl. subgroups) |
| `webling_get_member` | One member with group names and invoice overview |
| `webling_list_groups` | Member group tree with IDs and member counts |
| `webling_open_invoices` | Open / partially paid invoices with member names, remaining amount, days overdue |
| `webling_account_balances` | Account balances of a period, grouped (assets, liabilities, income, expense), with result |
| `webling_upcoming_events` | Calendar events in a date range, with calendar name and participant counts |
| `webling_changes` | What changed since a revision (Webling replication API) |
### Write (only with `WEBLING_READONLY=false`)
| Tool | What it does |
|---|---|
| `webling_create` | Create an object (member, group, event, comment, …) |
| `webling_update` | Partial update; returns before/after of every changed property |
| `webling_delete` | Two-step delete: preview with a `confirm_token`, then delete with that token |
| `webling_transaction` | Several create/update/delete operations, all or nothing |
Safeguards: write tools are not even registered unless enabled; access-control types (`apikey`, `user`, `usergroup`, `settings`, `domain`) are blocked by default (`WEBLING_PROTECTED_TYPES`); deletes, and transactions that delete or have 10+ operations, are two-step and enforced by the server: the first call only returns a preview and a `confirm_token`, and the change goes through only with a token that matches exactly the previewed request and the current state of the objects (a changed object, a different request or a server restart invalidates it); POST requests are never retried automatically, so a network hiccup cannot create duplicates. The API key's own rights in Webling still apply on top.
Resources: `webling://docs/query-language` (filter syntax reference) and `webling://definition` (raw data model).
Bank details (fields like IBAN, account holder, SEPA mandate) are left out of answers unless a tool call asks for them explicitly via `fields`; after an update, the old value of such a field is never shown. This is a privacy default that keeps the data out of the conversation, not an access control: the model can still request the fields. To keep bank data away from the model entirely, remove the API key's read access to those fields in Webling.
## Setup
### 1. Create an API key in Webling
In Webling go to **Administration → API** and create a new key. Recommended: give it **read-only** rights and only for the areas you need (members, finance, calendar). The key decides what the assistant can see. Give it write rights only if you also set `WEBLING_READONLY=false`.
### 2. Add the server to your MCP client
You need Node.js 20 or newer. `npx` downloads and starts the [npm package](https://www.npmjs.com/package/webling-mcp); nothing else to install.
**Claude Desktop** – edit `claude_desktop_config.json` (Settings → Developer → Edit Config):
```json
{
"mcpServers": {
"webling": {
"command": "npx",
"args": ["-y", "webling-mcp"],
"env": {
"WEBLING_URL": "https://your-club.webling.eu",
"WEBLING_API_KEY": "your-api-key"
}
}
}
}
```
**Claude Code:**
```bash
claude mcp add webling -e WEBLING_URL=https://your-club.webling.eu -e WEBLING_API_KEY=your-api-key -- npx -y webling-mcp
```
To use write mode, add `"WEBLING_READONLY": "false"` to `env` (or `-e WEBLING_READONLY=false`). `npx -y webling-mcp` always starts the latest release; pin a version with `webling-mcp@0.3.0` if you prefer controlled updates.
#### Install from source
To run your own build (e.g. to test changes), build a package from a checkout of this repository and install it globally:
```bash
git clone https://github.com/Nikdro/webling-mcp-server.git
cd webling-mcp-server
npm install
npm run build
npm pack
npm install -g ./webling-mcp-0.3.0.tgz
```
Then point your client at the installed copy with `node` instead of `npx`. `npm prefix -g` shows the install folder; on Windows it is usually `%APPDATA%\npm`:
```json
{
"mcpServers": {
"webling": {
"command": "node",
"args": ["C:\\Users\\<you>\\AppData\\Roaming\\npm\\node_modules\\webling-mcp\\dist\\index.js"],
"env": {
"WEBLING_URL": "https://your-club.webling.eu",
"WEBLING_API_KEY": "your-api-key"
}
}
}
}
```
On macOS / Linux the path is typically `/usr/local/lib/node_modules/webling-mcp/dist/index.js` (or under your nvm prefix). Restart Claude Desktop after changing the config. To update, run `git pull` and the build and install commands again; to remove, run `npm uninstall -g webling-mcp`.
### Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
| `WEBLING_URL` | yes | – | Your instance, e.g. `https://your-club.webling.eu` or `your-club.webling.ch` (`/api/1` is added automatically). Must be `https://` (plain `http://` only for `localhost`). |
| `WEBLING_API_KEY` | yes | – | API key from Administration → API |
| `WEBLING_READONLY` | no | `true` | Set to `false` to enable the write tools |
| `WEBLING_PROTECTED_TYPES` | no | `apikey,user,usergroup,settings,setting,domain` | Comma-separated types the write tools refuse to change (empty string = none; logs a warning at startup) |
| `WEBLING_MAX_REQUESTS_PER_MINUTE` | no | `120` | Client-side throttle (Webling allows 500/min) |
| `WEBLING_TIMEOUT_MS` | no | `30000` | Per-request timeout |
## Example prompts
- "Wie viele Mitglieder hat die Gruppe Jugend, und wer davon hat im Dezember Geburtstag?"
- "Welche Rechnungen sind überfällig? Gruppiere nach Mitglied."
- "Show me all members without an e-mail address."
- "Which events are coming up in the next 4 weeks?"
- "What changed in Webling since revision 1520?"
- "Wie ist der Kontostand der aktuellen Buchungsperiode, und welche Ausgabenkonten liegen über Budget?"
- With write mode: "Lege Anna Beispiel als neues Mitglied an und trage sie für den Termin am Freitag ein."
## Privacy
Webling holds personal data. Everything a tool returns is sent to the language model you use. Use an API key with minimal rights, and prefer narrow queries and the `fields` parameter. Check whether your association's data protection rules (e.g. GDPR / DSGVO, revDSG) allow processing member data with your AI provider.
The API key is only sent to your Webling instance, as an HTTP header, and only over https. Redirects are not followed, so the key cannot be passed on to another server; if your instance moved, set `WEBLING_URL` to the new address.
## Development
```bash
npm install
npm test # unit + MCP protocol tests against a fake Webling API
npm run typecheck
npm run build
```
Try it interactively with the MCP Inspector:
```bash
npx @modelcontextprotocol/inspector -e WEBLING_URL=... -e WEBLING_API_KEY=... node dist/index.js
```
The Webling API documentation is available on every instance at `https://<your-instance>/api`.
## License
MIT
TDQS
Scored across 11 tools
Tools mostly target distinct resources, but the generic webling_query overlaps heavily with webling_find_members, webling_open_invoices and webling_upcoming_events, since a Webling filter could reproduce all three. Similarly webling_get vs webling_get_member (and webling_list_groups vs query type=group) have fuzzy boundaries that descriptions only partially resolve.
All tools share a consistent webling_ prefix, which is good, but the second segment mixes verbs (query, get, find_members, list_groups, changes) with nouns/resource names (info, schema, account_balances, open_invoices, upcoming_events). Readable, but not a predictable verb_noun pattern throughout.
Eleven tools is well within the sweet spot and each maps to a recognizable Webling workflow (schema inspection, querying, member lookup, invoices, events, balances, change tracking). No obviously redundant filler tools.
The read surface is fairly rich (schema, generic query, get, specialized views, balances, change tracking), but there are no write operations at all — no create/update/delete for members, debitors, or events — and no tool for fetching documents/attachments. If the server is intentionally read-only this is acceptable, but the domain lifecycle is only half covered.