Connect an agent
MCP (the Model Context Protocol) is an open standard that lets an AI assistant use outside tools. Connect one, such as Claude, to a Grosik group and you can ask it in plain words.
What you can ask
An agent connected to a group can read it and add or change entries for you. For example:
- "Add 42.50 EUR for dinner, Ana paid, split between everyone."
- "Who owes whom?"
- "What do I owe Ana?"
- "The taxi was 31.20, not 30. Fix it."
- "Add Chiara to the group."
- "What was the PLN rate on 20 November?"
Changes the agent makes are ordinary changes: they sync to everyone's devices and appear in the group's history, marked as made by the agent for the person it acts as (for example "Claude for Ana").
Get a token
- Open your group, then its Settings, then Connect an agent.
- Name the token and choose which person the agent acts as.
- Copy the token right away. It is shown only once.
The server address for every group is https://grosik.pages.dev/mcp (Streamable HTTP). The token says which group it belongs to. Creating a token needs a connection.
Add it to Claude
Replace grk_YOUR_TOKEN with your token. The group's own "Connect an agent" page fills it in for you.
Claude Code
Run this in a terminal. It adds the server for the current project; add --scope user to use it in every project.
claude mcp add --transport http grosik \
https://grosik.pages.dev/mcp \
--header "Authorization: Bearer grk_YOUR_TOKEN"
Claude Desktop
In Claude Desktop open Settings, then Developer, then Edit Config. That opens claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\). Put the grosik entry inside mcpServers, save, then quit and reopen Claude Desktop. It connects through the mcp-remote bridge, which needs Node.js.
{
"mcpServers": {
"grosik": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://grosik.pages.dev/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer grk_YOUR_TOKEN"
}
}
}
}
There is no space after Authorization: in args on purpose: the space is in AUTH_HEADER, because Claude Desktop on Windows does not escape spaces inside args.
The 12 tools
Optional parameters are marked with ?. People can be named instead of given by id (case-insensitive; a unique prefix is enough). Dates are YYYY-MM-DD and default to today (UTC); currency defaults to the group's base currency.
get_group- Reads the group: its name, base currency, members and which member the token acts as. Agents call it first.
No parameters.
get_balances- Shows what each person owes or gets back, the fewest payments that settle everything, and the check that it all adds up to zero.
currency?also shows the balances converted at today's rate (approximate). list_entries- Lists expenses, income and transfers, newest first, filtered by text, person, kind, category or dates.
query?(title or note),member?,kind?(expense, transfer, income),category?,from?,to?,limit?(up to 100, default 20),cursor? get_entry- Reads one entry, deleted ones too, with each person's share and its full history of changes.
id add_expense- Adds an expense: amount, who paid, how it is split. It can preview the per-person shares first without saving. By default the token's person paid, split equally between everyone, today.
title,amount,currency?,date?,paid_by?orpayers?(several payers with amounts),split?(mode equal, exact, shares or percent, with parts),category?(food, groceries, transport, stay, fun, shopping, home, other),note?,rate?,rate_inverted?,preview?,request_id? add_income- Adds money the group received, such as a refund, and how it is shared.
title,amount,received_by?,split?,currency?,date?,category?,note?,rate?,rate_inverted?,preview?,request_id? update_entry- Changes an entry; only the fields given change. It says so if someone else changed the same thing meanwhile, and their version stays in the entry's history.
id, then any oftitle?,amount?,currency?,date?,category?,note?,paid_by?,payers?,received_by?,from?,to?,split?,rate?,rate_inverted?,request_id? delete_entry- Deletes an entry. It stops counting in balances and can always be restored.
id,request_id? restore_entry- Brings a deleted entry back.
id,request_id? record_transfer- Records that one person paid another back.
from,to,amount,currency?,date?,rate?,request_id? add_member- Adds a person to the group.
name(1 to 80 characters),request_id? get_exchange_rate- Looks up the published exchange rate for a date, with its source (Frankfurter, or the fallback source).
from,to?(default the base currency),date?
Amounts are exact decimal strings in the currency's own units, like "12.50" for EUR or "1250" for JPY. An amount with more decimals than the currency allows is refused with the reason, never rounded.
Keep it safe
- A token is full access to one group, acting as the person you chose: it can read every entry and add, change or delete them. Treat it like a password.
- It works for that one group only, never for your other groups.
- It is shown once. Grosik stores only its SHA-256 hash, so nobody can read it back from the server.
- The token list on the group's "Connect an agent" page shows when each token was last used.
- Revoke it there at any time; from then on every request with it is refused.
- Write tools take a
request_id. If an agent retries a change with the samerequest_idand the same arguments, it is saved once, not twice. Reusing it for a different change is refused and writes nothing. - Requests are rate limited per connection and per group.
What an agent can't do
An agent can do what a person with the link can do through these 12 tools, and no more. Like people, it cannot delete a group or change a group's base currency. The tools also don't create groups, remove people, or create or revoke tokens; those happen in the app. An agent sees only the group its token belongs to.
Errors and limits
A failed call returns an error code and a reason in plain words. The ones an agent may meet most:
bad_split,bad_payers: the parts or the payers don't add up to the total, or a split value is malformed. The reason says which, and nothing is written.idempotency_mismatch: therequest_idwas already used for a different change. Nothing is written; repeat the original arguments, or use a newrequest_id.over_capacity: the free-plan server has used its writes for today, and nothing was written. The daily limit resets at 00:00 UTC.rate_limited(HTTP 429): too many requests; try again in a minute.