Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Agents and MCP

Agents such as Claude Code can read your notes and, if you allow it, add to and edit them, through the Model Context Protocol (MCP). They can never delete pages, journal entries stay read-only to them unless you allow more, and everything they change is listed in Settings → Agents → What agents changed, where you can undo it.

An agent acts as you: it reaches only what you can, and never more than you allowed.

Three ways to connect one

WayForWorks while
Through your serverStandard workspaces, from any computerAlways
On this computerWhatever the desktop app has open, for agents on the same computerThe app is open
An agent deviceEncrypted workspaces (and standard ones), from wherever your agents runThe agent device runs

Through your server

Settings → Agents → Through your server shows the command. For Claude Code:

claude mcp add --transport http drusite https://notes.example.com/mcp

The first time the agent connects, your browser opens your server’s sign-in, then asks what the agent may do:

  • which workspace it can see;
  • read only, or read and edit (never more than your role);
  • whether it may edit journal entries;
  • whether it may publish pages to the web.

For an agent that can’t open a browser, such as one on a server, make a token on your account page (/account → Agents → Make a token) and give it as Authorization: Bearer <token>.

On this computer

Settings → Agents → On this computer → Let agents on this computer connect. Drusite then serves MCP at a local address while it’s open, with a token made there, and shows the command to connect with. The browser can’t do this.

Agent devices

Your server can’t read an encrypted workspace, so it can’t serve agents for one. An agent device is a small Drusite of yours that runs where your agents do, holds keys for what you give it, and serves them MCP.

In Settings → Agents → Add an agent device, you choose:

  • Which workspaces it may read. It gets keys for those only, not even your other workspaces.
  • Also your private pages, and pages shared with you, in those workspaces. Off unless ticked.
  • Can edit, or read only. Never more than your own role allows.

You get a one-time code, good for 15 minutes, to start it with:

drusite agent run --address https://agents.example.com --server https://notes.example.com --code <the code>

or with the ghcr.io/pranavajk1/drusite-agent image, or the Helm chart (running one). Then approve it in the app, checking the six-digit code matches, as with a new device. Agents connect to it at <address>/mcp and sign in through your server, as above.

Members see each agent device that can read their workspace, and whose it is. Owners can turn agent devices off for a workspace (Settings → AI → Allow agent devices), which takes their keys away. Removing an agent device signs it out and replaces the keys it held. Agent devices can’t publish.

What agents can do

Tool
list_workspaces, list_pagesSee your workspaces and their page tree
read_page, read_journalRead a page, or a day’s journal entry, as Markdown
searchSearch by words (and by meaning, where there’s an embedding model)
create_page, append_to_page, update_pageMake, add to and edit pages
query_database, add_row, update_row, create_databaseRead databases through their views, and add or change rows by property name
publish_pagePublish a page, only if you allowed it

Seeing and undoing what they did

Settings → Agents → What agents changed lists each change with its agent, and an Undo for each. Version history shows agents’ edits as “(agent) for (you)”. Disconnecting an agent ends its access at once.