An MCP server for LeafWiki: your AI assistant reads, searches, writes and organizes wiki pages, signed in with your own LeafWiki account.
Tested against LeafWiki v0.15.0. Releases are listed in CHANGELOG.md.
- πͺΆ One small program. No Node.js or other runtime; about 8 MB of memory while it runs.
- π€ Your account, your name. burrow signs in as you, so every change shows up under your name with your permissions.
- π‘οΈ No lost updates. It never overwrites a change someone else made since your last read; the answer says who changed the page.
- π§ Pages by path or id.
docs/runbooks/deployworks as well as an id, and missing parent pages can be created in one call. - π Simple permissions. Every tool name starts with its tier (
read_,write_,delete_), so one rule per tier covers them all; a read-only mode hides the rest.
- π€ Have a LeafWiki account that signs in with a username and password
alone (no two-factor codes). Export them in your shell profile:
export LEAFWIKI_USERNAME=...andexport LEAFWIKI_PASSWORD=... - π¦ Install burrow: Linux and macOS
curl -fsSL https://raw.githubusercontent.com/RedFoxxo/burrow/main/install.sh | sh, Windows (PowerShell)irm https://raw.githubusercontent.com/RedFoxxo/burrow/main/install.ps1 | iex. - π Connect your client: for Claude Code, run the command under Claude Code with your wiki's URL. Other clients are listed under Connect your client.
Then ask your assistant "what's in the wiki about deployments?".
A viewer account can use only the read_ tools; changing pages needs an editor
or admin.
| Way | For |
|---|---|
| Install script | Linux, macOS, Windows: the usual way |
| Claude Desktop bundle | Claude Desktop, nothing else to install |
| By hand | Downloading the file yourself |
| From source | Rust users, or a Docker image |
# Linux and macOS
curl -fsSL https://raw.githubusercontent.com/RedFoxxo/burrow/main/install.sh | sh# Windows, in PowerShell
irm https://raw.githubusercontent.com/RedFoxxo/burrow/main/install.ps1 | iexThe script downloads the file for your system from the
latest release, checks
it against the release's SHA256SUMS, and installs burrow in ~/.local/bin
(Windows: %LOCALAPPDATA%\Programs\burrow). If that folder isn't on your
PATH, it adds it: to ~/.profile (and ~/.zprofile on macOS), or to your
user PATH on Windows. Log out and back in (Windows: open a new terminal),
then check with burrow --version.
π Update: run the same line again.
βοΈ Options, set for the script:
| Variable | Effect |
|---|---|
BURROW_VERSION |
Install a given release, e.g. BURROW_VERSION=2.0.5 |
BURROW_INSTALL_DIR |
Install into another folder |
BURROW_NO_MODIFY_PATH=1 |
Leave your PATH alone |
For example curl -fsSL β¦/install.sh | BURROW_VERSION=2.0.5 sh, or in
PowerShell $env:BURROW_VERSION = '2.0.5' before irm β¦ | iex.
Download burrow.mcpb from the
latest release and open
it, or drag it into Settings β Extensions. Claude Desktop asks for the wiki
URL, your username and your password (kept in the system's secure storage), and
runs burrow from the bundle.
Download the file for your system from the
latest release into a
folder on your PATH and rename it to burrow (burrow.exe on Windows):
| System | File |
|---|---|
| π§ Linux x64 | burrow-linux-x64 |
| π§ Linux arm64 | burrow-linux-arm64 |
| π macOS, Apple silicon | burrow-macos-arm64 |
| π macOS, Intel | burrow-macos-x64 |
| πͺ Windows x64, also Windows on ARM | burrow-windows-x64.exe |
On Linux and macOS, make it executable: chmod +x burrow. On macOS, a file
downloaded with a browser also needs xattr -d com.apple.quarantine burrow
once.
- π¦ With Rust:
cargo install burrow-mcp --locked(the crate isburrow-mcp; the program isburrow), orcargo install --git https://github.com/RedFoxxo/burrow --tag v2.0.5 --locked. - π³ Docker:
docker build -t burrow .in a clone, thendocker run -i --rm -e LEAFWIKI_URL -e LEAFWIKI_USERNAME -e LEAFWIKI_PASSWORD burrow.
burrow reads its settings from environment variables, which your MCP client passes to it:
| Variable | Required | Purpose |
|---|---|---|
LEAFWIKI_URL |
β | Wiki root, e.g. https://wiki.example.com (a base path like /wiki is fine, no /api). https only, except for localhost, 127.0.0.1 and [::1] |
LEAFWIKI_USERNAME |
when the wiki has sign-in | Your LeafWiki username or email |
LEAFWIKI_PASSWORD |
when the wiki has sign-in | Its password. Never logged |
BURROW_READ_ONLY |
true registers only the read_ tools (default false) |
π Keep the password out of config files: export LEAFWIKI_USERNAME and
LEAFWIKI_PASSWORD in your shell profile and let the client pass them through,
as the examples below do.
π How burrow signs in:
- It signs in on the first tool call and keeps the session alive the way the web app does.
- It sends your password and session cookies only to
LEAFWIKI_URLand never follows a redirect. - If LeafWiki rejects the password, burrow stops trying until it is restarted, so it never runs into LeafWiki's protection against repeated wrong passwords (a slowdown of up to 15 minutes; older versions locked the account).
Register burrow once for all your projects. ${LEAFWIKI_USERNAME} and
${LEAFWIKI_PASSWORD} are read from your environment when the server starts,
so the password isn't stored in the config:
claude mcp add-json burrow --scope user '{
"type": "stdio",
"command": "burrow",
"env": {
"LEAFWIKI_URL": "https://wiki.example.com",
"LEAFWIKI_USERNAME": "${LEAFWIKI_USERNAME}",
"LEAFWIKI_PASSWORD": "${LEAFWIKI_PASSWORD}"
}
}'Then add the permission rules to ~/.claude/settings.json:
{
"permissions": {
"allow": ["mcp__burrow__read_*"],
"ask": ["mcp__burrow__write_*", "mcp__burrow__delete_*"]
}
}The server name must be burrow for these rules to match (Claude Code names
tools mcp__<server>__<tool>). Check the connection with
claude mcp get burrow, or /mcp inside a session.
Add the server and the permission rules to opencode.json (global:
~/.config/opencode/opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"burrow": {
"type": "local",
"command": ["burrow"],
"environment": {
"LEAFWIKI_URL": "https://wiki.example.com",
"LEAFWIKI_USERNAME": "{env:LEAFWIKI_USERNAME}",
"LEAFWIKI_PASSWORD": "{env:LEAFWIKI_PASSWORD}"
}
}
}
},
"permissions": [
{ "action": "burrow_read_*", "resource": "*", "effect": "allow" },
{ "action": "burrow_write_*", "resource": "*", "effect": "ask" },
{ "action": "burrow_delete_*", "resource": "*", "effect": "ask" }
]
}The server name must be burrow for these rules to match (opencode names tools
<server>_<tool>, e.g. burrow_read_page). Restart opencode after changing the
file; opencode mcp list shows whether it connected.
Any client that starts local (stdio) servers works. Most accept an
mcpServers block like this one (Cursor, Claude Desktop without the bundle, ...):
{
"mcpServers": {
"burrow": {
"command": "burrow",
"env": {
"LEAFWIKI_URL": "https://wiki.example.com",
"LEAFWIKI_USERNAME": "your-username",
"LEAFWIKI_PASSWORD": "your-password"
}
}
}
}If the client can't find burrow (some desktop apps don't see your shell's
PATH), give the full path instead, e.g.
"C:\\Users\\you\\AppData\\Local\\Programs\\burrow\\burrow.exe" on Windows.
Then map the three tiers to the client's permission system.
Pages are named by id or by path (docs/runbooks/deploy).
Every tool name starts with its tier, so one rule per tier covers every tool, including ones added later. Every tool also carries MCP annotations: reads are marked read-only, deletions destructive.
| Tier | What it does | Suggested rule |
|---|---|---|
π’ read_ |
Reads only | allow |
π‘ write_ |
Creates, changes, moves and copies pages and files | ask |
π delete_ |
Deletes pages and files | ask |
Your client sends every listed tool to the model with each request:
| Setup | Tools | Cost per request |
|---|---|---|
| Default | 39 | about 5,100 tokens |
BURROW_READ_ONLY=true |
20 (reads only) | about 2,200 tokens |
π’ read (20)
read_wiki, read_tree, read_page, read_lookup_path, read_find_title,
read_search, read_search_status, read_tags, read_pages_by_tags,
read_properties, read_pages_by_property, read_links,
read_broken_links (admins only), read_revisions, read_revision,
read_compare_revisions, read_favorites, read_assets, read_slug,
read_refactor_preview
π‘ write (17)
write_create_page, write_ensure_path, write_update_page,
write_edit_text, write_append, write_tags, write_properties,
write_move, write_sort, write_pin, write_favorite, write_convert,
write_copy, write_refactor, write_restore_revision,
write_upload_asset, write_rename_asset
π delete (2)
delete_page, delete_asset
- π‘οΈ No lost updates.
write_update_page,write_edit_text,write_refactoranddelete_pageneed theversionfrom your last read. If someone changed the page since, nothing is sent and the answer says who changed it. The other write tools change the latest version, and only the part they name: tags, properties and appended text merge with what is there. - ποΈ No surprise deletes.
delete_pagerefuses a page with children unlessrecursive: true. - π No local files.
write_upload_assettakes base64 data (adata:URL is fine); burrow never reads your disk.
- Accounts with two-factor codes (TOTP) can't sign in through burrow. LeafWiki's API keys are still experimental and not supported yet.
- Revision history and link refactoring are LeafWiki options
(
--enable-revision,--enable-link-refactor);read_wikisays which are on. Without them, the revision and refactor tools fail. write_moveandwrite_rename_assetdon't rewrite links to the old location;write_refactordoes, for pages.- Admin screens (users, backups, snapshots, branding, API keys, import) are left out on purpose.
burrow 1.x ran through npx from the npm package @redfoxxo/burrow, which
gets no new versions.
- Install burrow as above.
- In your client's config, change
"command": "npx", "args": ["-y", "@redfoxxo/burrow@1"]to"command": "burrow". - Tools, settings and permission rules stay the same.
Building from source, running the tests and releasing are described in DEVELOPMENT.md.