Let compatible AI assistants work with your notes
Connect opencode, Claude or another MCP-compatible assistant to the notes open in WebF1 Pad.
WebF1 Pad can let compatible AI assistants work with the notes open in the app. The connection uses MCP (Model Context Protocol), a standard supported by tools such as opencode, Claude and Codex. The server is off until you enable it, and it enables itself automatically the first time you turn on AI chat (you can always turn it off again in Settings).
Enable the server
- Open Settings → MCP Servers.
- Tick Enable MCP server (it is already on if you enabled AI chat first). The status line shows
the live URL, e.g.
http://127.0.0.1:29210/mcp. - Optionally change the port and pick a notes directory agents may write files into.
Point your agent at it
The config format differs between assistants. Copy the block for yours into its configuration file and restart it. Use the URL shown in Settings → MCP Servers (the status line), if the configured port was busy at app start, the server scanned the next free port (up to 100) and the status line is the authoritative one.
The access token
Every request must present the MCP access token as an HTTP header,
Authorization: Bearer <token>. The token is minted automatically the
first time the server starts and shown in Settings → MCP Servers in
the copy-paste snippets. Only loopback processes can even reach the
server, but that is exactly the threat: any local process could
otherwise read or overwrite the notes and chats you have open, so
requests without the token are refused with HTTP 401.
Regenerate token (Settings → MCP Servers) mints a new token and the old one stops working immediately — use it when a machine is shared, a config was pasted somewhere it should not be, or you suspect the token leaked. After regenerating, re-paste the snippet into every agent’s config (the button’s note reminds you in the same Settings session).
opencode
Add the server to ~/.config/opencode/opencode.json. opencode requires
type: "remote" and a top-level mcp key:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"webf1-pad": {
"type": "remote",
"url": "http://127.0.0.1:29210/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer <access token from Settings → MCP Servers>"
}
}
}
}
Verify with opencode mcp list (or opencode mcp debug webf1-pad), the
tools appear as webf1-pad_list_notes, webf1-pad_get_note, …
Claude Desktop / Codex
These use the mcpServers wrapper format:
{
"mcpServers": {
"webf1-pad": {
"url": "http://127.0.0.1:29210/mcp",
"headers": {
"Authorization": "Bearer <access token from Settings → MCP Servers>"
}
}
}
}
What agents can do
- save_note - save a markdown note into the app (as a new tab, or replacing an already-open one).
- list_notes / list_chats - see what is currently open (titles and timestamps only).
- get_note / get_chat - read the content of an open note or chat.
- update_note - edit an open note in place; the change lands back in the file.
- list_how_to / get_how_to - read the app’s How-To documentation, so the agent can answer “how do I …?” questions about WebF1 Pad from the official, version-matched guides.
All tools are read-only annotated except the writes, and every tool pulls live content - what the agent sees is what is on your screen. The how-to tools are public documentation about the app and are never gated by the content-access setting.
Troubleshooting
- The agent lists no pad tools, check the client’s config format
against the blocks above. opencode in particular rejects the
mcpServerswrapper (Claude Desktop format) and requirestype: "remote"under a top-levelmcpkey.opencode mcp listshows what connected. - HTTP 401 / unauthorized, the agent is not sending the access
token (no
headers.Authorizationblock in its config), the token was regenerated after the config was pasted, or the token was pasted incompletely. Copy the current snippet from Settings → MCP Servers into the agent’s config and restart it. - Connection refused, the URL in the config must match the one in Settings → MCP Servers. If the configured port was busy at app start, the server silently moved to the next free port (up to 100); the status line shows the live URL.
- “Open but not active” errors, by default agents can only read the content of the tab/session currently in focus. Open the note or switch to the chat in the app and retry, or change Content agents can read to “All open notes and chats” in Settings → MCP Servers. To make a single note or chat always readable regardless of the mode, right-click its tab (or the chat in the sidebar) → Agent access → Always allowed.
- “No open note” for a note that is clearly open, the user marked that tab as Agent access → Never: agents cannot see it (it is not listed, reads and updates fail), in every content-access mode. Ask the user to change the override on the tab.
Safety model
- The server listens on 127.0.0.1 only - nothing on the network can reach it.
- Bearer-token auth: every request must present the access token (
Authorization: Bearer …), checked per request; requests without it get HTTP 401. The token is minted automatically on first start, lives in the app’s settings, and can be regenerated in Settings → MCP Servers (the old token dies immediately). This is what keeps a rogue local process from reading or overwriting your open notes and chats. - It is off unless you turn it on.
- Content access gate (Settings → MCP Servers): “Active note or chat only” (default) means an agent must be specifically allowed by you to read anything beyond the note you have in focus; “All open notes and chats” opens everything currently open; “Only notes marked Always allowed” is an opt-in mode where nothing is readable until you mark it.
- Per-item override (right-click a note tab, or a chat session in the sidebar, → Agent access): “Never” hides a note or chat from agents entirely in every mode (not listed, not readable, not editable, saves to its path are refused); “Always allowed” makes it readable in every mode. These choices beat the global setting. Notes an agent created via
save_noteare marked “Always allowed” automatically (the content came from the agent, reading it back leaks nothing), until you change the override. - “Never” is durable and follows the content: on a saved note (file or cloud), marking it “Never” also records the file path / cloud object key plus a content fingerprint in a local registry. The protection survives close/reopen (the note is denied from the instant it opens, even while it is the active tab), follows moves and renames (the next open re-protects it by fingerprint), and applies to the file even when no tab is open. Only moving the choice off “Never” releases it. Notes with identical content are treated the same way (both denied, safe side). Two honest limits: content edited outside the app loses the fingerprint match until re-marked, and the registry only governs WebF1 Pad’s agents, not other apps reading the same file.
- File writes from agents are sandboxed to the notes directory you configured.
Give the chat more tools
The built-in AI chat automatically gains this server’s tools while the server is enabled - see Give the chat more tools with MCP servers. That guide also covers connecting the chat to additional MCP-compatible services in Settings → MCP Servers → Chat tools. These can be remote URLs or, on desktop, local commands. Nothing is provided automatically beyond the built-in server: only services you explicitly configure can appear as extra chat tools, and an unavailable service does not break the conversation.