MCP tools
The Model Context Protocol is the standard way for agents to discover and
call external capabilities. @mnemo-ai/mcp is a thin stdio adapter: it
speaks MCP to the host and forwards every call to a Mnemosyne server
through @mnemo-ai/client-ts.
It needs a running Mnemosyne server and an API key. The quickstart starts one.
Alpha, on the 3.6.x line. The API can still change within 3.x.
Connect a host
One command detects Claude Code, Cursor, Codex, Gemini CLI, OpenCode and Windsurf on the machine and registers the MCP server in each one it finds:
export MNEMO_URL=http://localhost:3939
export MNEMO_KEY=mns_live_...
npx -y @mnemo-ai/cli installCapturing whole conversations is a separate, opt-in step. It is available for Claude Code, Codex and OpenCode, and only runs when you ask for it:
npx -y @mnemo-ai/cli install --capture claude-code,codex,opencodeAny other MCP client works with a manual config that runs
npx -y @mnemo-ai/mcp:
There is no Docker image for the MCP server.
Environment variables
The MCP server reads its configuration from the env block of the host
config. It does not read a .env file.
| Variable | Required | What it does |
|---|---|---|
MNEMO_URL | yes | Base URL of your Mnemosyne server, for example http://localhost:3939. |
MNEMO_KEY | yes | API key. Its role decides which tools work: with a read-only role, write tools return 403. |
MNEMO_WORKSPACE_ID | no | Workspace for a user token. Without it, the MCP server reads workspaceId from the nearest .mnemo.json. |
MNEMO_LOCALE | no | en-US (default) or es-419. Changes tool descriptions and messages; tool and argument names stay the same. |
MNEMO_MCP_DEBUG | no | 1 or true writes every JSON-RPC frame to stderr. |
If MNEMO_URL or MNEMO_KEY is missing, the server prints a help message
to stderr and exits with code 1.
The 37 tools
All 37 tools are registered and live. Tools with their own page are linked. “Read and write” means the tool has actions of both kinds.
Remember and recall
| Tool | What it does | Access |
|---|---|---|
| memory_remember | Store a fact, or another kind of memory, in long-term memory. | write |
| memory_recall | Return the memories most relevant to a query. | read |
memory_search | Search memory by meaning, with keyword fallback when there are no embeddings. | read |
memory_fact | Get the full text of a fact or decision by id. | read |
| memory_timeline | List what was created, updated, pinned or closed, newest first. | read |
memory_context | Show the active workspace, your role and your memberships. | read |
Correct and forget
| Tool | What it does | Access |
|---|---|---|
memory_update | Correct a fact’s statement. The original is closed and a new fact, with a new id, replaces it. | write |
| memory_forget | Archive a fact or another memory so it leaves recall. The history is kept. | write |
| memory_pin | Protect a fact from being merged by consolidation. It does not raise it in recall. | write |
memory_relocate | Move a fact to another workspace. It is closed here and a successor is created there. | write |
memory_purge | Delete permanently. Needs the memory:hard_delete scope and cannot be undone. | write |
Structure
| Tool | What it does | Access |
|---|---|---|
| memory_entity | Create, read, update and list named entities and their linked facts. | read and write |
memory_relate | Create, list or retract typed relations between facts, decisions, entities and episodes. | read and write |
memory_hyperedge | Link three or more memories in a single relation. | read and write |
memory_decide | Record a decision with a title, a body and an optional topic key. | write |
memory_suggest_topic_key | Suggest a deterministic topic key, so an updated value replaces the old one. | read |
Sessions
| Tool | What it does | Access |
|---|---|---|
memory_episode_start | Start a session and get the sessionId to pass to later writes. | write |
| memory_session | Control a session: add turns, pin, take scratch notes, collapse, discard, get, list. | read and write |
memory_episode_end | Close a session and collapse it. Extracting knowledge needs an LLM. | write |
Work and know-how
| Tool | What it does | Access |
|---|---|---|
| memory_task | Track tasks with an owner, a status and a priority. | read and write |
| memory_event | Append immutable events to the workspace log and annotate them. | read and write |
| memory_reasoning | Store reasoning chains and look them up before reasoning again. | read and write |
| memory_strategy | Store “when X, do Y” strategies and rate whether they worked. | read and write |
memory_workflow | Create, read, update and list reusable multi-step workflows. | read and write |
memory_skill | Create, read, update and list reusable skill templates. | read and write |
Keep it clean
| Tool | What it does | Access |
|---|---|---|
memory_judge | List suspected conflicts between facts and resolve them. | read and write |
memory_compare | Compare two facts by id: differences, shared subject and a suggested relation. | read |
memory_consolidate | Run a consolidation pass that merges duplicate facts. | write |
| memory_self_edit | Let the agent edit its own memory. A reason is required. | write |
Look ahead and reflect
| Tool | What it does | Access |
|---|---|---|
memory_remind_when | Create, list or dismiss reminders that fire when their condition matches. | read and write |
memory_anticipate | Suggest memories likely to be needed next, from past recall patterns. | read |
| memory_introspect | Read the workspace self-model: strong topics, gaps and coverage. | read |
memory_compose | Manage inference rules and read the inferences they derive from what is known. | read and write |
Operate
| Tool | What it does | Access |
|---|---|---|
memory_status | Workspace health and memory counts. | read |
memory_stats | Aggregate statistics for the workspace. | read |
memory_doctor | Run diagnostics: connectivity, grants, migrations, embeddings, environment and tool registration. | read |
memory_workspace | List workspaces and members, or create, invite, set a role and remove (owner or admin). | read and write |
The schema of every tool is in the repository, under
packages/mcp/contracts/.
How it talks
The MCP server is stdio-only. The host starts it as a child process and
talks to it over stdin and stdout. It binds no port. It reaches your
Mnemosyne server over HTTP at MNEMO_URL; that is a client call, not a
port it opens.
On connect, the server sends the host a set of usage instructions, so the
agent decides on its own when to call memory_recall or memory_remember.
You do not write code that says “if the message mentions X, query memory”.
For lower-level control, use the TypeScript SDK.