Clerko public API, v1, and MCP¶
What AI apps use: the stdio bridge (clerko mcp) calls /api/v1; clerko serve also answers the same tools itself at /mcp. Both need a token from Settings, MCP (or clerko apps new NAME), sent as Authorization: Bearer <token>; it can be revoked there (or with clerko apps revoke ID). Every change is logged under the token's app name and shows in Scheduled. Neither the API nor the tools send email or touch a calendar: proposals still wait for the person's yes in Clerko.
The web password (clerko password) is only for browsers; /api/v1 and /mcp take tokens, not the password.
/api/v1¶
Base: <CLERKO_URL>/api/v1. Errors are JSON {"error": "plain words", "kind": ...} with 401 (token), 404 (not found), 422 (refused).
| Call | Body | Returns |
|---|---|---|
GET /boards |
[{id, name, url, widgets: [{id, title, kind, open, total}]}] |
|
GET /boards/{board} |
board is an id or a name | {id, name, url, widgets: [{id, title, kind, columns, every, asks, reads: [{widget, title, board, which}], read_by, items: [{id, title, note, date, group, cells, link, done}]}]} |
POST /widgets |
{board, create_board, title, kind: list\|checklist\|table, items: [...], columns?, asked?, every?} |
{id, title, board, url, items} |
PATCH /widgets/{id}/items |
{add: [item], tick: [id or title], untick: [...], remove: [...]} |
the widget |
PUT /widgets/{id}/schedule |
{every: morning\|twice\|hourly\|weekly\|daily@HH:MM\|weekdays@HH:MM\|null} |
{every, next} |
PUT /widgets/{id}/job |
only what's given changes: {every?: schedule or null, asks?: words or "" (removes the job), reads?: [{widget: name or id, which: open\|all}]} |
{id, title, every, next, asks, reads} |
GET /saved |
[{id, name, asked, schedule}] |
|
POST /saved/{id}/add |
{board, create_board} |
{id, title, board, url} (fills itself in Clerko) |
every is morning (7:00), twice (7:00 and 17:00), hourly, weekly (Mondays 9:00), or a time you choose: daily@09:00, weekdays@08:30 (24-hour, in the server's time zone; set TZ for it, e.g. TZ=Europe/London). every needs asked: the request Clerko uses each time it updates the widget, with the person's AI and only the tools they allowed.
Links (url) use CLERKO_PUBLIC_URL when it is set, else the address the request came to (X-Forwarded-Host and X-Forwarded-Proto behind a proxy).
/mcp¶
<CLERKO_URL>/mcp is an MCP server over Streamable HTTP (MCP Python SDK 2.x), stateless, answering in JSON: each request stands alone, so no session id is needed, though clients may still send initialize first. Send Accept: application/json, text/event-stream. Without a valid token the answer is 401 with WWW-Authenticate: Bearer, before the MCP server sees the request.
| Tool | Arguments | Same as |
|---|---|---|
list_boards |
GET /boards, as {boards: [...]} |
|
read_board |
board (name or id) |
GET /boards/{board} |
add_to_board |
board, title, kind, items, columns?, keep_updated?, every? (keep_updated is asked) |
POST /widgets |
change_items |
widget, add?, tick?, untick?, remove? |
PATCH /widgets/{id}/items |
keep_updated |
widget, every (null turns updates off) |
PUT /widgets/{id}/schedule |
set_job |
widget, every?, asks?, reads? (only what's given changes) |
PUT /widgets/{id}/job |
list_saved_widgets |
GET /saved, as {saved: [...]} |
|
add_saved_widget |
saved, board |
POST /saved/{id}/add |
A refusal comes back as the tool's answer, {"error": "plain words"}, not as a protocol error, so the AI can say what went wrong. The tools are annotated: the reading ones readOnlyHint, the others not destructive and not open-world.
The stdio bridge (clerko mcp, with CLERKO_URL and CLERKO_TOKEN) offers exactly the same tools and answers, by calling /api/v1.