self-hosted · markdown-first · REST + MCP
doction¶
A markdown-first knowledge base for humans and coding agents. Write plain markdown in the browser, keep every change in git, and let your agents search, read and write the same pages over a REST API or a native MCP server — on your own hardware.
Why doction¶
Engineering knowledge ends up split between a wiki people read and whatever an agent was told in its last prompt. doction keeps one copy: pages are plain markdown in a git repository, search runs locally, and an agent reaches the same pages a person does through a standard interface.
It is boring on purpose. doction does retrieval — the language model lives in your agent, not here. There is no LLM, no API key and no SaaS inside it.
What it does¶
-
Pages, workspaces,
#tagsand a metadata block, rendered in the browser from the markdown as stored. Every save is a commit: browse diffs, restore any version. -
[[wikilinks]]become edges: backlinks, broken links and orphans called out, and a drawn graph of the whole workspace. -
PostgreSQL full-text search with accent folding, plus opt-in semantic search from a model baked into the image. No API keys.
-
The server is JSON only. Browsers, scripts and agents use the same pages and auth, and
/api/mcpoffers 27 tools, from search to writing one section of a page. -
Link and tag suggestions, near-duplicate detection, summaries and workspace insights, computed with numpy.
-
An app container and a Postgres container, amd64 and arm64, with no request leaving your network at runtime. Shared workspaces, signed webhooks, opt-in OCR.
Connect a coding agent with a personal access token:
claude mcp add --transport http doction $DOCTION/api/mcp \
--header "Authorization: Bearer doction_..."
How the pieces fit, and why the odd-looking decisions are what they are, is in Architecture.
Get started¶
Two containers, one .env, and a first user.