Reads and writes Markbase collaborative markdown documents via HTTP API — list, create, edit by quoting passages, comment, and view version history.
Ships in markbase. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Markbase docs are "Google Docs for markdown": humans and agents edit the same documents in real time through one HTTP API. Every change is attributed and versioned, and you edit through the same API a human's browser uses — so your edits appear live in any open editor.
https://markbase.so/api/v1 — the API root, including /api/v1
(override with the MARKBASE_API_BASE env var, which must also include
/api/v1). Paths below append to $BASE — do not add /api/v1 again.Authorization: Bearer $MARKBASE_API_KEY on every request.
Create a key in the dashboard → API keys. Never print the key.X-MCP-Client: <tool> on every request —
claude-code, codex or cursor. Your edits are then credited as
"Jessie's Claude" in the document's history and analytics; without it they
read "Jessie's agent".Every recipe below assumes:
BASE="${MARKBASE_API_BASE:-https://markbase.so/api/v1}"
AUTH="Authorization: Bearer $MARKBASE_API_KEY"
CLIENT="X-MCP-Client: claude-code" # the tool you are: claude-code, codex, cursor
/editsEvery change to a document goes through POST /docs/:id/edits. There is no
whole-document replace endpoint — you build up and change docs one passage at
a time, so edits stay minimal and never clobber concurrent work or history.
GET /docs/:id → .doc.content.##, **, []()), verbatim (same words, punctuation,
casing, whitespace).{"quote": "<that exact passage>", "insert": "<replacement>"} to
/docs/:id/edits. It replaces only the matched text and leaves the rest of
the document — its history and other people's edits — untouched.Starting a document: create it with POST /docs (optionally seeded with a
content markdown string for the first version). To fill in a doc that only has
a heading, quote the heading and insert the heading plus the body.
Rewriting everything: there's no bulk-replace shortcut — quote the entire
current .doc.content and insert the whole new document in one /edits call.
quote matches the document's rendered text, never markdown syntax — quote
Summary (not ## Summary), ready (not **ready**), PR #67 (not
[PR #67](url)). insert is markdown: inline markup (**bold**,
[link](url)) merges into the block, and block markup (headings, lists,
blockquotes, multiple paragraphs) is inserted as real structure. On read-back
.doc.content shows the markdown syntax back — but your next quote still uses
the rendered text (ready, PR #67), not what you inserted.
Errors: 422 Anchor not found → your quote didn't match the current text
exactly; re-read the doc and copy it verbatim. 409 conflict → someone edited
concurrently; re-read and re-apply. If you have a real question for the human,
leave a comment instead of guessing.
Each endpoint lists the minimum role it needs. Roles are ranked owner > editor > commenter > viewer, so any role at or above the one shown is allowed (an owner can do everything an editor can). signed-in = any authenticated caller with the right scope.
| Method & path | Role | Purpose |
|---|---|---|
GET $BASE/docs/search | signed-in | Search your documents by title and text |
GET $BASE/docs/:id/history | viewer | Version history (who changed what, +added/−removed) |
GET $BASE/docs/:id/analytics | viewer | Analytics (which agents read it and for whom, who wrote each line) |
GET $BASE/docs/:id/at | viewer | The document as of a version |
GET $BASE/docs/:id/diff | viewer | Word-level diff between two versions |
GET $BASE/docs | signed-in | List your documents |
POST $BASE/docs | signed-in | Create a document |
GET $BASE/docs/:id | viewer | Read one document (markdown + current version) |
PATCH $BASE/docs/:id | editor | Rename a document |
DELETE $BASE/docs/:id | owner | Delete a whole document (all its tabs) |
POST $BASE/docs/:id/edits | editor | Edit a passage (quote → insert) — the only way to change a doc |
POST $BASE/docs/:id/restore | editor | Restore a past version (appended as a new edit) |
GET $BASE/docs/:id/comments | viewer | List comments |
POST $BASE/docs/:id/comments | commenter | Comment on a passage / ask the human a question |
PATCH $BASE/docs/:id/comments/:cid | commenter | Resolve / unresolve a comment |
GET $BASE/docs/:id/links | owner | List share links |
POST $BASE/docs/:id/links | owner | Create a share link |
DELETE $BASE/docs/:id/links/:linkId | owner | Revoke a share link |
GET $BASE/docs/:id/publish | owner | Whether a document is published, its public URL, and the versions to choose from |
POST $BASE/docs/:id/publish | owner | Publish a document to the web (anyone with the URL can read it) |
DELETE $BASE/docs/:id/publish | owner | Take a published document offline |
GET $BASE/vaults | signed-in | List your vaults |
POST $BASE/vaults | signed-in | Create a vault |
GET $BASE/vaults/:id | signed-in | One of your vaults (404: gone; 403: somebody else's) |
GET $BASE/vaults/:id/known | signed-in | What a vault's connections have seen: its repository, the paths changes touched, the services incidents named |
PATCH $BASE/vaults/:id | signed-in | Rename a vault |
DELETE $BASE/vaults/:id | signed-in | Delete a vault and every document in it |
POST $BASE/vaults/convert | signed-in | Make a folder inside a vault a vault of its own |
GET $BASE/docs/start | signed-in | Where to begin: your vaults, newest documents and things to try |
GET $BASE/assets | signed-in | List the images and files in a vault, or the ones a document links to |
GET $BASE/docs/:id/status | viewer | Status (core fields, warnings, trust, whether a review is due) |
POST $BASE/docs/:id/verify | editor | Confirm the current text is right, as you |
GET $BASE/docs/:id/timeline | viewer | Timeline: what happened to the document, who last checked it, what changed since |
POST $BASE/docs/views | signed-in | Save a view: a named way to find documents by their properties |
GET $BASE/docs/views | signed-in | List saved views |
GET $BASE/docs/views/query | signed-in | Query a view: documents found, sorted and grouped by their properties |
POST $BASE/docs/:id/properties | editor | Set one property (front matter field) of a document |
POST $BASE/docs/views/update | signed-in | Set properties on every document a view finds |
POST $BASE/docs/webhooks | signed-in | Make a webhook a tool (GitHub, Grafana OnCall) sends events to, for a vault's timelines |
GET $BASE/docs/webhooks | signed-in | List the webhooks your vaults take events from |
GET $BASE/me | signed-in | Whose key this is: the owner's id and name, and the connection |
GET $BASE/me/profile | signed-in | The account's display name and sign-in name |
GET /docs/search · role: signed-in · scope: read
?q=<words> · ?vault=<id> · ?scope=sharedcurl -s -H "$AUTH" -H "$CLIENT" "$BASE/docs/search?q=roadmap" | jq '.hits'
GET /docs/:id/history · role: viewer · scope: read
curl -s -H "$AUTH" -H "$CLIENT" "$BASE/docs/$ID/history" | jq '.revisions'
GET /docs/:id/analytics · role: viewer · scope: read
curl -s -H "$AUTH" -H "$CLIENT" "$BASE/docs/$ID/analytics" | jq '.credit.shares'
GET /docs · role: signed-in · scope: read
?scope=shared lists what others shared with you, with your capability on each.?scope=shared · ?vault=<id> · (nothing: your own documents)curl -s -H "$AUTH" -H "$CLIENT" "$BASE/docs" | jq '.docs'
POST /docs · role: signed-in · scope: write
content markdown; edit it afterwards with /edits.{ title?: string, content?: markdown }curl -s -X POST -H "$AUTH" -H "$CLIENT" -H 'content-type: application/json' \
-d '{"title":"My doc","content":"# My doc\n"}' "$BASE/docs"
GET /docs/:id · role: viewer · scope: read
curl -s -H "$AUTH" -H "$CLIENT" "$BASE/docs/$ID" | jq -r '.doc.content'
POST /docs/:id/edits · role: editor · scope: write
quote matches the rendered text (no markdown syntax — ready, not **ready**); insert is markdown whose structure is preserved (inline marks merge; headings/lists become real blocks). To add, quote an anchor line and repeat it at the start of insert.{ quote: string (rendered text), insert: markdown }curl -s -X POST -H "$AUTH" -H "$CLIENT" -H 'content-type: application/json' \
-d '{"quote":"Status: draft","insert":"Status: **ready**"}' "$BASE/docs/$ID/edits"
POST /docs/:id/restore · role: editor · scope: write
{ version: number }curl -s -X POST -H "$AUTH" -H "$CLIENT" -H 'content-type: application/json' \
-d '{"version":N}' "$BASE/docs/$ID/restore"
POST /docs/:id/comments · role: commenter · scope: write
quotedText. Calls the Markbase API, POST /api/v1/docs/{id}/comments; see https://markbase.so/docs/agents.{ body: markdown, quotedText?: string, parentId?: uuid }curl -s -X POST -H "$AUTH" -H "$CLIENT" -H 'content-type: application/json' \
-d '{"body":"X or Y?","quotedText":"the passage"}' "$BASE/docs/$ID/comments"
GET /vaults · role: signed-in · scope: read
(nothing)curl -s -H "$AUTH" -H "$CLIENT" "$BASE/vaults" | jq '.vaults'
GET /vaults/:id/known · role: signed-in · scope: read
covers or service on a document, to use the paths and service names the vault's GitHub and Grafana OnCall connections have already sent, rather than guessing them. Empty until a connection has delivered something.curl -s -H "$AUTH" -H "$CLIENT" "$BASE/vaults/$VAULT/known" | jq '.services'
GET /docs/start · role: signed-in · scope: read
(nothing)curl -s -H "$AUTH" -H "$CLIENT" "$BASE/docs/start" | jq '.suggestions'
GET /docs/:id/status · role: viewer · scope: read
curl -s -H "$AUTH" -H "$CLIENT" "$BASE/docs/$ID/status" | jq '{trust, needs_review}'
POST /docs/:id/verify · role: editor · scope: write
curl -s -X POST -H "$AUTH" -H "$CLIENT" "$BASE/docs/$ID/verify"
GET /docs/:id/timeline · role: viewer · scope: read
curl -s -H "$AUTH" -H "$CLIENT" "$BASE/docs/$ID/timeline" | jq '{last_check, changes_since}'
POST /docs/views · role: signed-in · scope: write
{ name, spec: { filter, sort?, group_by?, columns? }, vault_id? }curl -s -X POST -H "$AUTH" -H "$CLIENT" -H 'content-type: application/json' -d '{"name":"needs-review","spec":{"filter":{"field":"needs_review","op":"eq","value":true}}}' "$BASE/docs/views"
GET /docs/views · role: signed-in · scope: read
?vault=<id>curl -s -H "$AUTH" -H "$CLIENT" "$BASE/docs/views" | jq '.views[].name'
GET /docs/views/query · role: signed-in · scope: read
?view=today&tz=America/Los_Angeles · ?view=affected-by-commit¶ms={"files":[…]} · ?spec={…}curl -s -G -H "$AUTH" -H "$CLIENT" "$BASE/docs/views/query" --data-urlencode 'view=needs-review' | jq '.rows[].title'
POST /docs/:id/properties · role: editor · scope: write
{ key: string, value: JSON }curl -s -X POST -H "$AUTH" -H "$CLIENT" -H 'content-type: application/json' -d '{"key":"done","value":true}' "$BASE/docs/$ID/properties"
POST /docs/views/update · role: signed-in · scope: write
{ view | spec, params?, set: { field: value } }curl -s -X POST -H "$AUTH" -H "$CLIENT" -H 'content-type: application/json' -d '{"view":"affected-by-commit","params":{"files":["src/billing/pay.ts"],"sha":"abc123"},"set":{"needs_review":true,"review_commit":"$params.sha"}}' "$BASE/docs/views/update"
POST /docs/webhooks · role: signed-in · scope: write
{ vault_id, source: github | grafana, repository? }curl -s -X POST -H "$AUTH" -H "$CLIENT" -H 'content-type: application/json' -d '{"vault_id":"'$VAULT'","source":"github","repository":"acme/api"}' "$BASE/docs/webhooks"
Your key acts as its owner — or the lower ceiling set on the key (an agent
key can be limited to editor/commenter/viewer). Effective access on a doc is the
lower of the key's ceiling and what its owner could do. A 403 means the key
lacks the capability the endpoint needs; a 409 means the doc moved under you.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/markbase:markbasefrom markbase
npx claudepluginhub markbase-team/markbase --plugin markbaseOther plugins' skills for the same job