An independent interpretation of the released Udanax Gold source · not Project Xanadu documentation · about this documentation

MCP Guide

Your docuverse as tools for LLM clients — read-only by standard configuration

xudanu-mcp is a Model Context Protocol server that lets an LLM client — Claude Desktop, Cursor, or any MCP host — search and read a Xudanu docuverse like a research assistant: full-text search, transclusion-resolved reading, backlinks, provenance, version comparison, live watching. The agent becomes a user like any other, with the same read gates as everyone else.

Standard configuration is read-only. The documented tools cannot modify anything. A write mode exists behind an explicit operator flag and is not covered by this guide; see the note at the end.
1. Why MCP — and when to use something else 2. Quickstart 3. Client configuration 4. The tools 5. Addressing: xudanu:// references 6. What agents can see 7. The three risks, in plain language 8. Note on the write mode

1. Why MCP — and when to use something else

Xudanu content can be reached four ways, and they are good at different things. MCP is the one that turns the docuverse into a conversation partner's reference shelf: an LLM client that can search, read, trace connections, and verify quotations on your behalf, while you stay in the chat you already work in.

The distinctive gain is grounded multi-step research. Ask "what disputes the spectrum sentence, and who wrote the passages doing the disputing?" and the agent chains the tools — search, read, backlinks, provenance — returning answers anchored to real spans with hashes, not recollections. Compared with pasting a page into a chat window, the agent reads the live corpus, cites it precisely, and cannot quietly misquote without the verification tools catching it.

Most MCP servers expose a feed — your steps, your repos, your calendar. This one exposes a document model: the agent reads a corpus of connected works, quotes by transclusion with attribution, and — in write mode — contributes with every change stamped as machine-authored in the provenance chain. A research assistant whose footnotes are structural, not asserted.

The four access methods

MethodBest atLimitations
Browser UI
xudanu.com, demo.xudanu.com, self-hosted
Reading and writing as a human: the visual link language (lanes, beams, compare), making connections, trails, provenance panels, editingManual — every question is your own clicks; no automation; findings don't arrive in your workflow
MCP + LLM client
this guide
Conversational research across many works: "find every disagreement about X", "summarize what links to Y", "trace who wrote this passage", monitoring a corpus with watchesRead-only in the standard configuration; returns text — the visual language doesn't come through; corpus text can mislead the agent (see risks); needs an MCP-capable client
xudanu-cli
terminal
Scripting and operations: batch work creation, seeding, scripted links, quick checks from a shellNo natural-language layer; you think in operations, not questions
Wire protocol
WebSocket, 140+ ops
Building your own client or integration; full power, full controlYou implement everything; see the wire protocol reference

Choosing, for users and support staff

You want to…Use
Browse, read, follow connections visuallyBrowser UI
Write, make links, build trailsBrowser UI (demo.xudanu.com needs no account)
Ask a question that spans many worksMCP
Verify exactly what a document said, and who wrote itMCP (read_span + verify_work + get_prov)
Watch a docuverse and be told when it changesMCP (watch_work)
Seed, batch-create, or script operationsxudanu-cli
Build an app against XudanuWire protocol
Rule of thumb: humans read and write in the browser; agents research through MCP; scripts run through the CLI; everything else speaks the wire protocol.

2. Quickstart

Three steps, no build, no account:

Step 1 — get the binary. Download xudanu-mcp for your platform from the releases page and make it executable:

curl -LO https://github.com/jonesd/xudanu/releases/latest/download/xudanu-v1.17.1-aarch64-macos.tar.gz
tar xzf xudanu-v1.17.1-aarch64-macos.tar.gz
chmod +x xudanu-mcp

Step 2 — point it at a server. Any Xudanu server works. Two public ones:

ServerURLPolicy
xudanu.comwss://xudanu.com/xudanuRead-only for visitors (hosted instance)
demo.xudanu.comwss://demo.xudanu.com/xudanuPublic sandbox, seeded demo corpus
Your ownws://127.0.0.1:8080/xudanuWhatever you configured

Step 3 — register it with your client (next section), then ask your agent something like:

Search the docuverse for "spectrum sentence" and read that work.
What connections touch it, and who wrote what?

3. Client configuration

Claude Desktop

Edit claude_desktop_config.json (Settings → Developer → Edit Config) and add:

{
  "mcpServers": {
    "xudanu": {
      "command": "/absolute/path/to/xudanu-mcp",
      "args": ["--server", "wss://xudanu.com/xudanu"]
    }
  }
}

Cursor

In .cursor/mcp.json (project) or the global MCP settings — same shape:

{
  "mcpServers": {
    "xudanu": {
      "command": "/absolute/path/to/xudanu-mcp",
      "args": ["--server", "wss://demo.xudanu.com/xudanu"]
    }
  }
}

Any other MCP host

Anything that speaks MCP over stdio: point it at the binary with the same arguments. Test a connection by hand before wiring it into a client:

printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"0"}}}' \
  | ./xudanu-mcp --server wss://xudanu.com/xudanu

A serverInfo response naming xudanu means you're connected. Diagnostics go to stderr; the protocol conversation goes to stdout.

TLS is required for remote servers. wss:// validates certificates against webpki roots — Let's Encrypt works, self-signed does not. Plain ws:// is for local servers.

4. The tools

ToolWhat it does
search_worksFull-text search across works the session can read, with context snippets and metadata
read_workA work's full text, transclusions resolved (windows show their live source content)
read_spanA specific span, optionally pinned to a revision; the returned excerpt is hash-stamped
verify_workVerify a previously returned span against its recorded hash — quotable with confidence
find_backlinksEvery connection pointing at a work — the both-ends property, from the agent's chair
who_transcludedWhich works reuse a passage, and where it came from
get_provAuthorship and lineage as W3C PROV-JSON
get_version_infoRevision count and timeline for a work
compare_versionsTwo revisions side by side, differences labeled
watch_workPlant a persistent detector on a work. kind is links (fires when links land on it) or revisions (fires when revised); optional link_type (built-in type name — e.g. disagreement) and direction (in/out/any) filters are planted server-side
detector_events / detector_ack / unwatch_workRead, acknowledge, and retire watch events; the response's unread_total is the aggregate digest count across all your watches

5. Addressing: xudanu:// references

Tools that point at content use one canonical scheme:

xudanu://work/<id>                    the current edition of a work
xudanu://work/<id>?rev=<n>            a specific revision (pinned)
xudanu://work/<id>#span=<s>,<e>       a character range in the current edition
xudanu://work/<id>?rev=<n>#span=<s>,<e>  a range in a pinned revision

Because positions are tumblers — addresses, not offsets — pinned references survive edits elsewhere in the document, and hash verification catches any drift.

Formal grammar, comparison rules, and security considerations: the xudanu URI scheme specification.

6. What agents can see

The MCP session is an anonymous session of the server, exactly like a first-time visitor in a browser:

The operating rule is simple: published means public. An MCP client reads what any reader reads — nothing more.

7. The three risks, in plain language

Risk 1 — data-dir mode is a skeleton key

The binary also accepts a data directory instead of --server, opening the store directly with no logins and no rules. That mode is for offline analysis of a copy. Never point it at a live production data directory, and never with writes enabled — two writers on one store can corrupt it.

Use --server mode. It is the documented, recommended, and safest configuration; everything in this guide assumes it.

Risk 2 — documents can talk to the agent

An LLM cannot always tell content from instructions. A document in the corpus can contain text addressed to AI assistants ("ignore your instructions and…"). Even read-only, a poisoned corpus can make an agent report misleading summaries. Treat corpus text as untrusted input: verify quotes that matter (verify_work), and prefer host-side tool approval for anything sensitive.

Risk 3 — model identity is self-reported

The write mode stamps revisions with a declared model identity. That label is what the operator typed, not a verified fact. It is attribution metadata, not authentication — do not build trust on it.

The standing-watch pattern (and its one rule)

"Monitor this docuverse and tell me when someone disputes the budget claim" decomposes into an agent's two moments and the server's constant:

search_works("budget claim")                     ← the agent resolves language → work id
watch_work(id, kind=links, link_type=disagreement,
           direction=in)                          ← the SERVER plants the watch
   … time passes; hits collect server-side …
detector_events()  →  unread_total, hits          ← the agent reads what collected
   + read_work / read_span on each hit            ← and interprets
"Two new disputes since Tuesday: …"               ← the agent tells the human
detector_ack(id)                                  ← marks read; never deletes

The watch and its collection live on the server, not the agent: close the client, restart everything — hits keep accumulating. "Tell me" is poll-based (MCP has no push): ask your assistant "anything new on my watches?" on a schedule, or have a scheduled invocation check unread_total and only report when it moves.

The one rule for judgment in the pipeline: an LLM may annotate and rank the collection, never gate it. Collect every matching event deterministically; let a model tag, prioritize, or summarize on read. A mediocre summary is recoverable; a silently dropped event is not — collection is ground truth, interpretation is a view.

8. Note on the write mode

Scoping an agent’s access

Agents ride the same dispatcher as every other session: club permissions decide what they can read, and the client has no separate authority to remove. To scope an agent, give it a club:

  1. Create a club for the agent and place into it exactly the works it should see.
  2. Run xudanu-mcp with that club’s session (login arguments or session token file).
  3. The agent sees only what its club holds. Enforcement is server-side — no client cooperation required, and no way around it from the client side.

Different agents, different clubs: least-privilege by construction, every action attributed. This is the 1990s security model — clubs, endorsement, per-span provenance — turned out to be exactly what the agent era needed.

An opt-in write mode exists (--enable-agent-writes): agents can create works, transclude, link, and revise, with every change stamped as LLM-authored in the provenance system and the chained audit log. It is additionally gated by the server's edit policy — an owner-only server refuses agent writes no matter what the client requests.

It is deliberately undocumented beyond this note. Guidance while it matures: enable it only against sandbox copies, never against data you care about, and never on a server you share with strangers.

FR-141 (docuverse MCP). The MCP specification: modelcontextprotocol.io. Xudanu is an independent Apache-2.0 project in the Udanax Gold lineage — not affiliated with Project Xanadu or any LLM vendor.