Agent Chat & MCP Server
memrynote can run an in-app Agent Chat backed by a provider-neutral agent backend. Claude CLI is the first full backend, local OpenAI-compatible servers can be used for BYO local models, and the Codex CLI backend uses the same contract when enabled. After a vault opens, the desktop app keeps the Agent runtime idle until Agent Chat or Agent MCP is opened. At that point it starts a local MCP endpoint on 127.0.0.1 with a random port, then gives the selected backend only the vault tools for the current conversation.
Opening the Agent MCP settings uses the same lazy start path as opening Agent Chat. If the runtime is still starting, memrynote retries the status check until the vault-scoped endpoint, bearer token, and tool list are ready to copy.
The Agent runtime and MCP endpoint are scoped to the open vault. Closing or switching vaults stops active turns, clears pending tool approvals, and restarts the Agent services for the next vault.
The same MCP endpoint can also be copied into other desktop AI clients for vault read tools.
Open Settings -> AI Assistant -> Agent MCP to copy the current endpoint and bearer token. Open Settings -> AI Assistant -> Agent Permissions to set the default Agent Chat access mode and action-confirmation behavior.
Agent Chat
Open the right sidebar, choose Agent, and pick a provider. The compact Day/Agent switch keeps the active view highlighted at the top of the right sidebar. The Agent header includes a new-conversation button, a history menu for switching back to recent conversations, and a pop-out button for moving the current conversation into a workspace tab. Popped-out conversations keep the generated conversation title as the tab name, use the same centered reading column as notes, and leave the right sidebar ready for a new chat. The popped-out tab keeps the scroll bar at the window edge while the chat content stays centered, and the tab name is the only conversation title shown in that workspace view. Assistant responses render as full-width text in both the sidebar and popped-out tabs instead of bordered bubbles, with text aligned to the prompt input. For Claude CLI, memrynote checks that claude is available on PATH, that it reports version 2.1.0 or newer, and that the Agent disclosure has been accepted. For local models, configure a compatible server in Settings -> AI Assistant -> Agent Permissions first. If the global AI switch is off in Settings -> AI, the Agent tab and Agent MCP current-note bridge are hidden and inactive.
Agent Chat can:
- keep local conversation history in the vault database
- attach the active note as context for a turn
- mention notes, tasks, journals, inbox items, and calendar events inline in a prompt with
@ - stream assistant text back into the sidebar
- link returned or created memrynote items directly in assistant replies, with a collapsible Sources section for the same items
- show collapsed tool calls, tool results, and optional approvals inline in the chat stream
- stop an in-flight turn
- compact older conversation history when a prompt grows too large
When a tool result includes a real memrynote reference, Agent Chat renders that item as a clickable mention instead of plain text. Lists link each returned note, task, inbox item, journal entry, calendar event, project, or folder that has a navigable reference. Create and update confirmations also link the affected item when the tool returns its ID or journal date. The reply footer shows a collapsible Sources section only when the assistant message contains those memrynote item links. Inbox snooze confirmations use the same explicit inbox item reference as other inbox writes.
memrynote only links explicit tool-provided references. Plain titles without an ID or date stay as normal text. Clickable item mentions use memrynote's standard link color, show a dotted underline on hover, and display the matching item icon before the title. Notes use their custom note icon when one exists, inbox items use their capture-type icon, and journal, calendar, and task links use the same visual language as the main app surfaces.
Press Enter to send the prompt. Press Shift+Enter to insert a new line in the prompt box.
Type @ in the prompt to open the mention picker. Notes, tasks, journals, inbox items, and calendar events appear with their item icons, and calendar events are read from the local calendar with archived events hidden. Choosing a result replaces the active @ query with one inline tag, so a prompt such as summarize @Star Wars Movies keeps the referenced item visibly attached inside the prompt. Mention tags submit as readable @Title text plus an encrypted structured attachment reference.
The prompt box uses the operating-system text editing menu, so Cut, Copy, Paste, Select All, and native right-click editing work like other text fields.
Stop requests are scoped to the active conversation across Claude, Codex, and local providers. Automatic title generation and conversation summaries run through the selected backend without exposing memrynote MCP tools.
The prompt bar shows the selected agent provider. The provider is pinned per conversation; changing it after messages exist updates the conversation and records the switch in the chat history. Claude and Codex expose prompt-time reasoning effort settings, with provider-specific settings shown only for the active provider. The same compact prompt bar has a per-turn permissions menu. It starts from your default Agent Permissions setting, then lets you send a single turn as Vault only or Computer access, and optionally allow web search for that turn.
Vault only keeps the CLI backend constrained to memrynote vault tools. Computer access gives the backend broader local CLI access for that turn. Web search is passed through only when the selected backend supports it.
Claude and Codex conversations also have a per-conversation model selector. memrynote starts Claude on opus and Codex on the highest suggested GPT version, then passes the selected model through to the CLI for each turn. The built-in model list is only a shortcut for common CLI aliases; type a custom model ID when you want to pin another CLI-supported model.
Local model support uses OpenAI-compatible HTTP APIs. memrynote ships presets for Ollama, LM Studio, and llama.cpp server, plus a Custom endpoint. Local tool access is gated by a capability probe. If the model can emit tool calls and continue after a tool result, memrynote enables the full vault tool set. If the probe fails, local chat can still answer from attached context, but vault tool calls stay disabled.
If the configured local provider is not running, the model picker returns no discovered models instead of treating the settings page as an Agent runtime error. Start the provider, then load models or test the connection again.
When no conversation is selected yet, the prompt box stays available. Sending the first prompt creates a new Agent Chat conversation, attaches the active note when one is open, and streams the reply into the sidebar.
New conversations start with a temporary title. When you send the first prompt, the selected chat backend also generates a short conversation title. memrynote stores that title on the encrypted conversation row and refreshes the sidebar title without giving the title-generation subprocess access to memrynote MCP tools.
Conversation rows, message bodies, and message attachments are encrypted at rest before they are written to SQLite. Free accounts keep agent chat history local-only. Paid accounts can sync finalized conversations and terminal messages through memrynote Sync; in-progress streaming messages are not enqueued until the turn finishes.
If memrynote cannot verify the local vault key for the current database, Agent Chat stays unavailable instead of opening unreadable conversation history. A fresh local vault can initialize a new local key without sign-in; an existing vault with a mismatched or missing keychain key must be recovered through the normal vault recovery flow.
Connection
The endpoint is:
http://127.0.0.1:<port>/mcpExternal MCP clients must send:
Authorization: Bearer <token>The token is generated in memory for the current app launch. It is not saved to disk, changes when memrynote restarts, and can be rotated manually from settings. Missing or stale tokens receive 401.
The localhost MCP endpoint can serve overlapping Agent Chat turns and external read requests. memrynote keeps the URL/token stable for the app session, but handles each MCP request with an isolated transport so one client connection does not block another.
Client-specific config keys vary. Use the copied URL as the MCP server URL and the copied token as a Bearer authorization header. Plain external clients can use read tools, but they do not get the in-app conversation/window context that approved writes require.
Tools
Read tools are available to Agent Chat and external MCP clients:
vault_search_notesvault_read_notevault_list_foldervault_get_current_notevault_list_tasksvault_get_taskvault_list_projectsvault_get_projectvault_list_statusesvault_get_journal_entryvault_list_journal_entriesvault_list_inbox_itemsvault_get_inbox_itemvault_get_tagsvault_desktop_read
Create, update, delete, archive, move, and reorder tools require Agent Chat context. They can be auto-accepted or shown for inline approval depending on the Agent Permissions setting:
vault_create_notevault_rename_notevault_delete_notevault_create_foldervault_rename_foldervault_delete_foldervault_create_taskvault_delete_taskvault_complete_taskvault_uncomplete_taskvault_archive_taskvault_unarchive_taskvault_move_taskvault_reorder_tasksvault_duplicate_taskvault_convert_task_to_subtaskvault_convert_subtask_to_taskvault_create_projectvault_update_projectvault_delete_projectvault_archive_projectvault_reorder_projectsvault_create_statusvault_update_statusvault_delete_statusvault_reorder_statusesvault_create_journal_entryvault_update_journal_entryvault_delete_journal_entryvault_add_to_inboxvault_update_inbox_itemvault_snooze_inbox_itemvault_archive_inbox_itemvault_unarchive_inbox_itemvault_delete_inbox_itemvault_add_inbox_tagvault_remove_inbox_tagvault_update_notevault_update_taskvault_add_tagvault_remove_tagvault_move_to_foldervault_desktop_write
vault_desktop_read and vault_desktop_write cover the remaining desktop CRUD surface through an allowlisted desktop API operation name plus an args array. They are used for desktop domains such as templates, saved filters, bookmarks, reminders, calendar events, folder views, properties, tags, search reasons, and settings. The write bridge uses the same in-app approval flow as named write tools. Security-sensitive and system operations stay outside the allowlist, including account/auth flows, provider connect/disconnect/refresh actions, app updater actions, external open/reveal actions, and raw secret writes. Unsupported or unavailable desktop API operations return a structured MCP error instead of falling back to an arbitrary desktop call.
Calendar desktop reads accept the same single-object shape as the renderer bridge. For example: calendar.getProviderStatus with no args or args: [{}] checks Google provider status, calendar.listEvents accepts args: [{}], and calendar.getRange accepts either args: ["2026-05-14", "2026-06-14"] or args: [{"startAt": "2026-05-14T00:00:00.000Z", "endAt": "2026-06-15T00:00:00.000Z"}].
By default, Agent Chat accepts these tool calls automatically. The chat still shows each requested tool as compact, subdued text with a readable label such as Reading note or Creating task. Click the label to open or close the details area with the raw MCP tool name, parameters, and results.
If you switch tool confirmations to Ask first in settings, memrynote pauses the turn and shows inline approval controls inside the tool row. You can allow the request once, allow create tools always for that conversation, deny it, or edit the arguments before allowing. Note updates load a before/after diff before the write is applied. Unauthenticated or context-free write requests continue to be denied.
Current Note
vault_get_current_note can snapshot the active note when the request is associated with a memrynote window. Plain external clients do not have that window context, so the tool returns null instead of guessing.
Privacy
The MCP server binds only to localhost. Read tools still expose the content they return to the client you configure, so only paste the token into clients you trust on this machine. Write tools still require an active Agent Chat conversation context, and the in-app tool confirmation setting decides whether that conversation pauses for approval or accepts the call automatically.
Provider privacy depends on the selected backend:
- Claude and Codex providers may send prompts, attachments, and tool results through that provider.
- Local loopback providers keep model prompts on this machine, except for the actual tool effects memrynote applies inside the vault after approval.
- Custom non-loopback endpoints send data to the configured endpoint and must be explicitly enabled with the not-fully-local warning.