Skip to main content
Glama

burrow

An MCP server for LeafWiki: AI assistants read, search, write and organize wiki pages. It signs in with your own LeafWiki account, so every change shows up under your name, and it never overwrites a change someone else made since your last read.

Tested against LeafWiki v0.14.2. Releases are listed in CHANGELOG.md.

Requirements

  • Node.js 22.12 or newer (npx comes with it)

  • A LeafWiki account that signs in with a username and password alone (no two-factor codes). A viewer account can only use the read_ tools; changing pages needs an editor or admin.

Nothing to download or build: your MCP client starts burrow with npx, which fetches @redfoxxo/burrow from npm on first use. @1 keeps you on 1.x releases.

Related MCP server: LLM Wiki MCP

Setup

burrow reads its settings from environment variables, which your MCP client passes to it:

Variable

Required

Purpose

LEAFWIKI_URL

yes

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

no

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.

burrow 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_URL and never follows a redirect. If LeafWiki rejects the password, burrow stops trying until it is restarted, so it cannot lock your account (LeafWiki locks it for 15 minutes after 5 failed sign-ins).

Claude Code

Register the server once for all your projects. ${LEAFWIKI_USERNAME} and ${LEAFWIKI_PASSWORD} are read from your environment when the server starts, so the password is not stored in the config:

claude mcp add-json burrow --scope user '{
  "type": "stdio",
  "command": "npx",
  "args": ["-y", "@redfoxxo/burrow@1"],
  "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_*"]
  }
}

Claude Code names MCP tools mcp__<server>__<tool>, so the server name must be burrow for these rules to match. Check the connection with claude mcp get burrow, or /mcp inside a session.

opencode

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": ["npx", "-y", "@redfoxxo/burrow@1"],
        "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" }
  ]
}

opencode names MCP tools <server>_<tool>, so the server name must be burrow for these rules to match (read_page becomes burrow_read_page). Restart opencode after changing the file; opencode mcp list shows whether it connected.

Other MCP clients

Any client that starts local (stdio) servers works. Most accept an mcpServers block like this one (Claude Desktop, Cursor, ...):

{
  "mcpServers": {
    "burrow": {
      "command": "npx",
      "args": ["-y", "@redfoxxo/burrow@1"],
      "env": {
        "LEAFWIKI_URL": "https://wiki.example.com",
        "LEAFWIKI_USERNAME": "your-username",
        "LEAFWIKI_PASSWORD": "your-password"
      }
    }
  }
}

Then map the three tool-name prefixes below to the client's permission system.

Tools

Permission tiers

Every tool name starts with its tier, so one rule per tier covers all tools, including ones added in later versions. Read tools are also marked read-only in the MCP tool annotations, and delete tools destructive.

Prefix

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

39 tools, about 4,200 tokens of tool definitions; BURROW_READ_ONLY=true leaves the 20 read tools, about 1,700. Pages are named by id or by path (docs/runbooks/deploy).

  • read: 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: 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: delete_page, delete_asset

Rules the server enforces

  • No lost updates. write_update_page, write_edit_text, write_refactor and delete_page need the version from 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_page refuses a page with children unless recursive: true.

  • No local files. write_upload_asset takes base64 data (a data: URL is fine); burrow never reads your disk.

Limitations

  • 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_wiki says which are on. Without them, the revision and refactor tools fail.

  • write_move and write_rename_asset don't rewrite links to the old location; write_refactor does, for pages.

  • Admin screens (users, backups, snapshots, branding, API keys, import) are left out on purpose.

Development

Building from source, running the tests and releasing are described in DEVELOPMENT.md.

License

MIT

Available Tools

39 tools
delete_assetC
Destructive

Delete a file attached to a page.

Inputs: page (required), filename (required).

delete_pageA
Destructive

Delete a page; a page with children is refused unless recursive is true.

Inputs: page (required), version (required), recursive.

read_assetsC
Read-only

Files attached to a page, with the URL to embed or link them.

Inputs: page (required).

read_compare_revisionsA
Read-only

Line diff between two revisions of a page, or between one revision and the latest.

Inputs: base (required), page (required), target.

read_favoritesB
Read-only

The signed-in user's favorite pages.

Inputs: no named parameters.

read_find_titleA
Read-only

Pages whose title matches exactly (case-insensitive), with path and id.

Inputs: title (required).

read_lookup_pathC
Read-only

Whether a path exists, segment by segment, and whether it can be created.

Inputs: path (required).

read_pageA
Read-only

One page: Markdown content, tags, properties, authors and the version needed to change it.

Inputs: page (required), content.

read_pages_by_propertyC
Read-only

Pages that set a property, optionally to one value.

Inputs: key (required), value.

read_pages_by_tagsC
Read-only

Pages carrying all of the given tags.

Inputs: tags (required).

read_propertiesB
Read-only

Property keys in use (structured page metadata) with how many pages set each.

Inputs: limit, filter.

read_refactor_previewA
Read-only

Which pages link to a page and would be rewritten if it were renamed or moved (needs link refactoring on); changes nothing.

Inputs: page (required), slug, title, parent.

read_revisionB
Read-only

One past revision of a page with its full content.

Inputs: page (required), revision (required).

read_revisionsA
Read-only

A page's revision history, newest first (needs revisions on).

Inputs: page (required), limit, cursor.

read_search_statusB
Read-only

Whether the search index is still building, and how many pages it holds.

Inputs: no named parameters.

read_slugC
Read-only

The slug LeafWiki would give a title, unique under its parent (editors only).

Inputs: title (required), parent.

read_tagsB
Read-only

Tags in use with how many pages carry each.

Inputs: limit, filter.

read_treeA
Read-only

Page hierarchy as indented lines with path and id, for the whole wiki or below one page.

Inputs: depth, under.

read_wikiA
Read-only

Who is signed in (username, role) and which wiki features are on (revisions, link refactoring, upload size).

Inputs: no named parameters.

write_appendB

Add Markdown at the end of a page.

Inputs: page (required), text (required).

write_convertB

Turn a page into a section or a section into a page.

Inputs: kind (required), page (required).

write_copyB

Copy a page (content, tags, properties, files) under a parent with a new title.

Inputs: page (required), title (required), slug, parent.

write_create_pageB

Create a page (or section) under a parent, optionally with content, tags and properties.

Inputs: title (required), kind, slug, tags, +3 more.

write_edit_textA

Replace one exact passage of a page's content, without sending the whole page.

Inputs: find (required), page (required), replace (required), version (required).

write_ensure_pathA

Make sure a path exists, creating every missing segment; the last one gets the title.

Inputs: path (required), title (required), kind.

write_favoriteB

Add a page to the signed-in user's favorites, or remove it.

Inputs: page (required), favorite (required).

write_moveA

Move a page (with its children) under another parent; links to it are not rewritten (see write_refactor).

Inputs: page (required), parent (required), position.

write_pinB

Pin a page to the top of its siblings, or unpin it.

Inputs: page (required), pinned (required).

write_propertiesB

Set or remove properties (structured metadata) on a page, keeping the others.

Inputs: page (required), set, remove.

write_refactorA

Rename or move a page and rewrite the links that point to it (needs link refactoring on; preview with read_refactor_preview).

Inputs: page (required), version (required), slug, title, +3 more.

write_rename_assetC

Rename a file attached to a page.

Inputs: to (required), from (required), page (required).

write_restore_revisionA

Bring a page back to a past revision (the current state stays in the history).

Inputs: page (required), revision (required).

write_sortC

Set the order of the children of a page.

Inputs: order (required), parent (required).

write_tagsB

Add or remove tags on a page, keeping the others.

Inputs: page (required), add, remove.

write_update_pageA

Change a page's title, slug, content, tags or properties; fields you leave out stay as they are.

Inputs: page (required), version (required), slug, tags, +3 more.

write_upload_assetA

Attach a file to a page from base64 data; answers with the Markdown link to embed it.

Inputs: page (required), base64 (required), filename (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 39 tools

    Disambiguation4/5

    Tools are mostly distinct by resource and action, and descriptions clarify overlaps. Some boundaries are close, such as update_page/edit_text/append for content changes and read_links/read_refactor_preview for incoming links, but agents can generally choose correctly.

    Naming Consistency5/5

    Names consistently use snake_case with clear read_, write_, and delete_ prefixes. The operation naming is predictable throughout, even when some write actions are verb-only rather than verb_noun.

    Tool Count2/5

    At 39 tools, the surface is far above the typical 3-15 range and beyond the heavy 16-25 band. While the wiki domain is broad, the tool count creates significant context and selection overhead.

    Completeness5/5

    The set covers page CRUD, hierarchy, tags/properties, links and refactoring, revisions, assets, favorites, search, and auth/feature status. Standard wiki workflows have no obvious dead ends.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for persistent, compounding markdown wikis maintained by LLMs. Enables incremental knowledge base building with interlinked pages, search, and raw source management.
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server that provides tools to add to, search, and manage a wiki knowledge base, enabling AI chat tools to contribute and retrieve information from the wiki via natural language prompts.
      MIT