Agents and MCP
Agents can read your notes and, if you allow it, add to and edit them, through the Model Context Protocol (MCP). They never delete anything for good: at most, if you allow it, they move pages to the trash, where you can restore them. 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.
Two ways to connect one
| Way | For | Works while |
|---|---|---|
| Through your server | Standard workspaces, and encrypted ones with a token made in the app | Always |
| On this computer | Whatever the desktop app has open, for agents on the same computer | The app is open |
Either way there is one copy of your notes, on your server (and your own devices). Nothing is copied anywhere for an agent.
Any agent that speaks MCP over Streamable HTTP connects: Claude Code, Claude Desktop, Cursor, VS Code, Codex, Hermes Agent, or your own. Drusite gives it an address and, where it can’t sign in with a browser, a token. Nothing here is specific to one agent.
Through your server
Settings → Agents → Through your server shows your server’s MCP address,
https://notes.example.com/mcp, with a Copy address button.
An agent that can sign in through a browser (OAuth) needs only that address. The first time it 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 move pages to the trash;
- whether it may publish pages to the web.
Tokens
For an agent that can’t open a browser, such as a bot on a server, create a token: Settings → Agents → Tokens → Create token. Give it a name, pick its workspaces, what it may do (as above), and how many days it lasts.
The token is then shown once, in a dialog with each part on its own:
- Token, with Copy token. Drusite keeps only a fingerprint of it, so it can’t show it again.
- Server address (
<your server>/mcp), with Copy address. - MCP configuration, ready to paste, with its own Copy button:
-
MCP JSON, the standard
mcpServersfile most clients read (Claude Desktop, Cursor, VS Code, Windsurf and others):{ "mcpServers": { "drusite": { "type": "streamable-http", "url": "https://notes.example.com/mcp", "headers": { "Authorization": "Bearer dra_…" } } } } -
Claude Code:
claude mcp add --transport http drusite https://notes.example.com/mcp --header "Authorization: Bearer dra_…" -
YAML, for clients configured in YAML, such as Hermes Agent’s
config.yaml:mcp_servers: drusite: url: "https://notes.example.com/mcp" headers: Authorization: "Bearer dra_…"
-
For any other client: the address is the MCP endpoint, its transport is Streamable HTTP, and every
request carries the header Authorization: Bearer <token>.
Each token is listed as a card: its name, Active or Expired, what it may do, its
workspaces, its last four characters (••••x7Qa), when it expires, when it was created and when
it was last used. Its buttons:
- Edit permissions: read only or read and edit, journal entries, trash and publishing. It takes effect on the agent’s next call. (A token’s workspaces and expiry stay as they were made: create a new one to change those.)
- Rotate: a new token for the same entry, with the same name, permissions, workspaces and expiry. The old token stops working at once. The new one is shown once, as above: give it to the agent. Rotate when a token may have leaked, or as a habit.
- Revoke: the token stops working at once. An agent that signed in through a browser has Disconnect instead, and no Rotate (it has no token of yours to replace).
The account page, /account → Agents, can make a token too, for standard workspaces only.
A token for an encrypted workspace
Your server can’t read an encrypted workspace on its own. When you tick one for a token in the app, your device puts the workspace’s key in the token itself. The agent then uses it exactly as a standard workspace, through your server, and there’s still only one copy of your notes: the encrypted one on the server. The server opens the workspace only while the agent is using it, keeps nothing readable, and searches by opening and scanning the pages each time (it’s slower; there’s no index to keep).
- The token reads what everyone in the workspace can, not your private pages.
- Its edits are signed like a device’s, and listed in What agents changed, where any member’s device can undo them.
- When the workspace’s key changes, your devices give the token the new one. Revoking it takes its keys away at once, and the workspace gets a new key.
- Rotating it makes new keys for the new token (as making one does), takes the old token’s away, and gives the workspace a new key, so the old token can’t read anything written after.
- Everyone in the workspace sees that the token can read it, and whose it is.
- If you let it publish, publishing a page puts a readable copy of that page on your server: that’s what publishing is.
What it trusts: whoever holds the token can read that workspace, and so could whoever runs your server while the agent uses it. Keep tokens to the workspaces an agent needs, and revoke or rotate one you no longer trust.
On this computer
Settings → Agents → On this computer → Let agents on this computer connect. Drusite then
serves MCP at http://127.0.0.1:47321/mcp while it’s open, from the app’s own data, with a token
made there and shown once in the same dialog as a server token’s. The browser can’t do this.
What agents can do
Agents can do what you can do by hand, each with a tool of its own. What changes notes needs an agent allowed to edit; the journal, the trash and publishing each need your leave too.
| Tool | |
|---|---|
list_workspaces, list_pages | See your workspaces and their page tree (with icons, and which pages are databases or canvases) |
read_page, read_journal | Read a page, or a day’s journal entry, as Markdown: its properties, icon, cover and description in the frontmatter, each block with its reference |
search | Search by words (and by meaning, where there’s an embedding model) |
create_page | Make a page or a canvas, with an icon and a description |
append_to_page, insert_blocks | Add to the end of a page, or at a place in it |
replace_blocks, replace_section, delete_blocks | Change part of a page: some blocks, or what’s under a heading |
update_page | Send a whole page back, edited |
rename_page, move_page, duplicate_page | Rename, move (under another page, or to the top), and copy pages |
set_page_property, set_page_icon, set_page_cover, set_page_description | One property, the icon, the cover (a gradient, or a picture on the page, moved up or down), the description |
delete_page, list_trash, restore_page | Move a page to the trash, see the trash, and bring a page back: only if you allowed the trash |
query_database | Read a database through one of its views (its filter, sorts and groups are said in words) |
create_database | Make a database, with its properties, or the tasks template |
add_row, update_row, set_row_value, delete_row | Add rows, change their values (several, or one), and move a row to the trash |
add_property, update_property, delete_property | A database’s properties: add one of any type, rename it, change its type or its options, take it out |
add_view, update_view, delete_view | A database’s views: table, board, calendar, list or gallery, with a filter, sorts and grouping |
write_journal | Write in a day’s journal entry, made from your template if the day has none: only if you allowed the journal |
read_canvas, add_canvas_shapes, update_canvas_shape, delete_canvas_shapes | Read a canvas, and draw notes, shapes, connectors, frames and page cards on it |
publish_page | Publish a page, only if you allowed it |
Every tool works the same in an end-to-end encrypted workspace, through a token that carries its key. Nothing an agent does deletes anything for good: pages and rows go to the trash, and a property or blocks taken out come back with Undo.
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.