DDocsMCP & API
Connect an AI agent over MCP, or call the REST API directly, to draft articles on your behalf. New to the wiki? Start here →
Getting a token
Agent access is earned, not self-served. Log in, then request a token with a label describing the agent and, ideally, why it needs access. An admin reviews the request; on approval you get an email with the token (shown once, store it somewhere safe). Every token is tied to your account, so every draft it writes lands on your drafts page and is attributed back to you, and it can be revoked or rate-limited later without affecting anyone else.
MCP (recommended)
A streamable-HTTP MCP server is available at /api/mcp. Clients that speak the standard MCP OAuth flow (claude.ai connectors, for example) need no manual setup: add the URL, and the server’s 401 challenge walks them through registration and a consent screen here. Config-driven clients can instead pass a token as a bearer credential. For Claude Code:
{
"mcpServers": {
"axiomatic-wiki": {
"url": "https://axiomatic.wiki/api/mcp",
"headers": {
"Authorization": "Bearer gwk_your_token_here"
}
}
}
}Available tools:
- list_articles: every published article (slug, kind, code, title, gloss).
- get_article: one article in full.
- draft_article: draft a new article, saved as a private draft on your account.
- draft_revision: draft an edit to an existing article (full replacement content). Private draft.
- update_draft / delete_draft: replace or remove one of your drafts.
- my_drafts: your drafts awaiting the owner’s review.
- my_submissions: your submissions and their moderation status.
Agents never submit for review. Everything an agent writes is a draft: a private working copy attached to the account it acts for. The owner reviews it on their library's drafts tab, edits it if needed, and submits it themselves; only then does it enter the moderation queue as PENDING, where it is held to the same review as any human submission. This applies to every agent credential (gwk_ tokens and OAuth alike), including an admin’s own.
REST API
If your agent framework doesn’t speak MCP, the same operations are plain HTTP endpoints. Send Authorization: Bearer gwk_.... Tokens get the same draft-only writes as MCP; the direct submission endpoints (POST /api/articles, POST /api/articles/{slug}/revisions) accept browser sessions only.
GET /api/articles # published library (public)
GET /api/articles/{slug} # one article + history (public)
GET /api/drafts # your drafts
POST /api/drafts # new draft: { slug, kind, ... } for a
# new article, { targetSlug, ... } for an edit
GET /api/drafts/{id} # one draft
PATCH /api/drafts/{id} # replace a draft's content
DELETE /api/drafts/{id} # discard a draftExample: drafting a new lemma for your account’s owner to review.
curl -X POST https://axiomatic.wiki/api/drafts \
-H "Authorization: Bearer gwk_..." \
-H "Content-Type: application/json" \
-d '{
"slug": "lem-example",
"kind": "lemma",
"title": "Example lemma",
"statement": "$$forall x (x = x)$$",
"prose": "Everything equals itself.",
"summary": "why this draft"
}'Markup and naming
Same rules as human submissions: $…$/$$…$$ math, [[slug|label]] citations (cite every fact you use, that builds the dependency graph), **bold**, no em dashes. The slug must start with the kind’s prefix (ax-, def-, lem-, thm-). Do not invent a short label; a permanent id like T07 is assigned automatically once an article is first published. See Writing & formatting and Conventions for the full reference.
Limits
There is no automated rate limit yet; tokens are tracked per request (last-used timestamp) so this can be added without breaking existing integrations. Abuse or a flood of low-quality drafts can get a token revoked at any time.