memocat-mcp
Persistent shared memory server for AI agents: store, search, update, and govern memory across any MCP client.
Store memories individually or in bulk, update existing records, and delete by key/custom key.
Recall by semantic/vector similarity, BM25 keyword, hybrid search, exact key/filter lookup, or list/browse memories.
Narrow recall with time ranges, metadata filters, scopes, and keyspaces.
Organize memory into namespaces/scopes: private per-user, team, or shared.
Coordinate between agents with live memory-change waiting (
montycat_await_memory_change).Inspect enforced schemas, semantic status, and governance policy/history/decisions.
Administer keyspaces: create, remove, enable/disable/re-embed semantic search, external vectors, and snapshots.
Self-hosted local engine, with optional remote/TLS configuration and automatic local install if needed.
Enables OpenAI Codex agents to use the same persistent, shared memory layer with semantic search and real-time updates across sessions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@memocat-mcp remember that I prefer dark mode in my code editor"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Montycat MCP - Shared Memory for AI Agents
A self-hosted MCP server that gives AI agents persistent, searchable memory. Claude, Codex, Cursor, and any Model Context Protocol client write to one memory and read each other's.
Memory that survives the chat. Decisions, preferences, and project context carry into the next session.
One memory, many agents. Every MCP client you use works from the same facts.
Recall by meaning, keyword, or both. Vector search finds a memory when the wording differs, BM25 nails exact identifiers, and hybrid mode fuses the two. Exact-key and metadata lookup too.
Yours. Server, engine, and embeddings run on your machine. No hosted memory service, no cloud embedding API.
Install
Claude Desktop — download
montycat-mcp.mcpb
and drag it into Claude Desktop. No Python needed. That link always serves the
current release; every release
also carries a version-named copy and a .sha256 to check it against.
Claude Code — install uv, then:
/plugin marketplace add MontyGovernance/montycat-mcp
/plugin install montycat-mcp@montygovernance/mcp confirms the montycat server is connected.
Codex, Cursor, other MCP clients — point your client's stdio config at
uvx montycat-mcp (Python 3.10+). For Codex:
codex mcp add montycat -- uvx montycat-mcpRelated MCP server: Kirok
The engine
Memory lives in a Montycat Semantic engine. Montycat MCP starts a local one for you, so most people can stop reading here.
Point it at an engine you already run:
export MONTYCAT_URI="montycat://memory-agent:password@localhost:21210/memories"
export MONTYCAT_TLS=true # remote engines onlyOr start one yourself with Docker:
docker run -d --name montycat -p 21210:21210 -p 21211:21211 \
-e MONTYCAT_SUPEROWNER=admin -e MONTYCAT_PASSWORD=change-me \
-v montycat_data:/var/lib/.montycat \
montygovernance/montycat:semanticOn Apple Silicon use the arm64-semantic tag instead — semantic is the amd64
image, and it crashes under emulation. Port 21211 carries live memory watches.
Use it
Talk to your agent normally; it picks the tool.
Remember that the team chose PostgreSQL for the billing service.
What did we decide about the billing database?
Save this to the shared
engineeringscope.
scope decides where a memory lives — alice for private, engineering for a
team, shared for common. It is a namespace, not a security boundary: for real
isolation, give each MCP server its own least-privilege Montycat credential.
Tools
Need | Tools |
Store |
|
Recall |
|
Inspect schemas |
|
Collaborate |
|
Namespaces |
|
Admin | semantic index, snapshot, and policy tools — see the plugin guide |
For persistent namespaces, cache is a capacity in MB and compression is
chosen by montycat_create_keyspace. Compression cannot be changed after the
keyspace is created; migrate into a new keyspace to use a different setting.
Cache capacity can be changed later with montycat_update_cache.
Destructive tools are declared as such, so your client's confirmation prompts apply.
Configuration
Variable | Purpose |
| Connection string: |
|
|
| Optional: |
| Optional PEM certificate path for exact certificate pinning |
| Optional SHA-256 certificate fingerprint as an alternative pin |
All three verification settings are optional. With only MONTYCAT_TLS=true,
MCP retains the historical encrypted-but-unverified behavior; with TLS unset or
false, existing plaintext configurations are unchanged.
| MONTYCAT_DEFAULT_KEYSPACE | Memory namespace; memory by default |
| MONTYCAT_SCOPE | Default scope when a call omits one |
| MONTYCAT_AUTO_PROVISION | Create a permitted scope on first use; true by default |
| MONTYCAT_AUTOSTART | off to require an already-running engine |
Compose setup and the full variable list: compose.yaml and the plugin guide.
More
Changelog · Privacy · Issues · Docs · Docker Hub
Existing MemoCat installs keep working: memocat-mcp, MEMOCAT_*, and
memocat:// are still supported. New setups should use the Montycat names.
MIT
Available Tools
24 toolsmontycat_await_memory_changeWait for Memory ChangeARead-onlyIdempotent
Wait until memory CHANGES — returns the moment another agent or session writes, updates, or deletes something in this memory.
This is a live subscription to the database, not a poll: it sleeps until a change actually happens and then returns immediately. Use it to coordinate with other agents sharing a scope ("tell me when someone adds to our shared memory"), or to confirm a write from another session landed. Do NOT call it in a tight loop as a substitute for searching — to find things, use montycat_semantic_search.
Returns {changes: [...], next_seq, oldest_seq, cursor_expired, timed_out}.
Each change is
{seq, key, event, value} where event is "inserted" (covers create and
update) or "removed". Pass the returned next_seq back as since_seq on
the next call to resume exactly where you left off. If the bounded buffer
has discarded part of that history, cursor_expired is true and
oldest_seq identifies the earliest retained record.
Args:
scope: Owner/user id whose memory to watch (keyspace mem_).
Use "shared" for the common keyspace — the usual choice when
coordinating between agents.
keyspace: Explicit keyspace override (advanced; bypasses scope).
timeout_sec: How long to wait before giving up (default 30). On timeout
the result is empty with timed_out: true — that is a
normal outcome, not an error.
since_seq: Resume cursor from a previous call. Omit on the first call to
watch only for changes from now on.
Inputs: scope, keyspace, since_seq, timeout_sec.
montycat_clean_snapshotsDelete Memory SnapshotsADestructive
Delete snapshot files for one existing in-memory keyspace.
This is destructive to the keyspace's snapshot history but does not delete its currently loaded in-memory records. Montycat performs the final authorization check.
Args: keyspace: Explicit in-memory keyspace whose snapshots are cleaned.
Inputs: keyspace (required).
montycat_create_keyspaceCreate Memory KeyspaceA
Create a new memory namespace using the configured owner's authority.
A delegated owner can create a keyspace when its governance policy grants
provision-keyspace for the requested store, storage type, and semantic
model, but its store must already exist. With superowner credentials, the
engine creates a missing configured store and this first keyspace together
in the same provisioning request. The engine remains the final
authorization boundary.
Args: keyspace: Name of the keyspace to create. storage: Preferred storage type: "persistent" or "inmemory". Defaults to "persistent". semantic: Enable semantic search for this keyspace after creation. semantic_model: Optional embedding model: "minilm", "bge-small", "bge-base", or "e5-small". Supplying a model implies semantic=True. persistent: Deprecated compatibility option. True maps to storage="persistent"; False maps to storage="inmemory". cache: Optional cache size in MB (persistent only; min/default 10). compression: Enable compression (persistent only).
Inputs: keyspace (required), cache, storage, semantic, +3 more.
montycat_disable_semanticDisable Semantic SearchADestructive
Disable semantic search for one explicit keyspace.
Stored vectors are retained by default so re-enabling can resume without a
full rebuild. Set drop_vectors only when intentionally clearing vectors,
such as before changing embedding models. The engine enforces all
governance authority and explicit denials.
Args: keyspace: Explicit keyspace to unenroll. store: Target store. Defaults to the configured store. drop_vectors: Also delete stored vectors for this keyspace.
Inputs: keyspace (required), store, drop_vectors.
montycat_enable_external_vectorsEnable External VectorsB
Enroll a keyspace for caller-supplied embeddings instead of text embedding.
Inputs: keyspace (required), dimensions (required), embedding_space (required), store.
montycat_enable_semanticEnable Semantic SearchA
Enable semantic search for one explicit keyspace.
The engine enforces manage-semantic, creator authority, explicit denials,
and allowed-model constraints. Existing records are backfilled by the
engine. This tool never enables semantic search database-wide.
Args: keyspace: Explicit keyspace to enroll and backfill. store: Target store. Defaults to the configured store. semantic_model: Optional model: "minilm", "bge-small", "bge-base", or "e5-small". Omit to use the engine/policy default. field: Optional JSON field to embed instead of the whole stored value.
Inputs: keyspace (required), field, store, semantic_model.
montycat_forgetDelete MemoryADestructive
Delete a stored record from memory by key or custom key.
Args: keyspace: Memory namespace (defaults to the configured one). key: Montycat-generated key to delete. custom_key: Custom key to delete. wait_for_index: For persistent keyspaces, wait for secondary indexes before returning. Defaults to the engine setting.
Inputs: key, scope, keyspace, custom_key, +1 more.
montycat_install_engineInstall Montycat EngineADestructiveIdempotent
Install the Montycat engine on THIS computer, then start it.
Call this only when memory tools report that no engine is running and the
user has agreed to install one. Tell them what it does first: it downloads
the Montycat Semantic package (~18 MB) and opens your operating system's
installer, which asks for an administrator password. On Linux it runs the
documented APT installation with sudo.
Refuses when MONTYCAT_URI is set or the configured host is not this machine — Montycat MCP is pointed at an engine elsewhere, and installing a local one would create a second database and write memories where nobody is looking. Does nothing if an engine is already reachable.
Not needed when Docker is available: engine startup falls back to a container automatically, with no prompt.
Inputs: no named parameters.
montycat_list_enforced_schemasList Enforced SchemasARead-onlyIdempotent
List schemas enforced on a keyspace, including field data types.
Use this before a structured write or retrieval when the target keyspace's required fields or types are unknown. For retrieval, it helps construct correctly typed field filters. This inspection is read-only and never creates a missing keyspace.
Args: keyspace: Explicit keyspace name. Takes precedence over scope. scope: Owner/user memory scope (maps to its configured keyspace). Use "shared" for the common keyspace. When both inputs are omitted, the configured default keyspace is inspected.
Inputs: scope, keyspace.
montycat_list_keyspacesList Memory KeyspacesARead-onlyIdempotent
List the available memory stores and keyspaces on this Montycat engine.
Inputs: no named parameters.
montycat_list_memoriesList MemoriesARead-onlyIdempotent
Browse stored memories — enumerate what is remembered, not search by meaning.
Returns up to limit records with their keys. Use this to review or list
memory; for meaning-based recall use montycat_semantic_search, and for exact
lookups use montycat_recall.
Args: keyspace: Memory namespace (defaults to the configured one). limit: Max records to return (default 25). recent: Return the most recently written records first (default True). Persistent keyspaces order by key, which is a strict write order; in-memory keyspaces have no ordered read, so there the bias stays approximate (by storage volume) and falls back to a full scan when the latest volume is empty. Pass False to read from the oldest record forward.
Inputs: limit, scope, recent, keyspace.
montycat_policy_explainExplain Policy DecisionARead-onlyIdempotent
Explain whether the configured owner may perform a proposed action.
This is a read-only policy check for planning and diagnostics; executing the action still requires a separate tool call and fresh engine authorization. The explanation identifies applicable grants, denials, creator authority, and storage/model constraints.
Args: capability: One of "provision-keyspace", "remove-keyspace", "manage-snapshots", "manage-semantic", "manage-schema", or "manage-access". store: Target store. Defaults to the configured store. keyspace: Optional target keyspace. storage: Optional keyspace type: "persistent", "inmemory", or "distributed". semantic_model: Optional model constraint: "minilm", "bge-small", "bge-base", or "e5-small".
Inputs: capability (required), store, storage, keyspace, +1 more.
montycat_policy_historyView Policy HistoryARead-onlyIdempotent
View governance history visible to the configured owner.
This is read-only and owner-scoped by the authenticated Montycat credential. It can show when authority was delegated, denied, revoked, or transferred without allowing the MCP caller to select another owner.
Args: store: Optional store filter. Defaults to the configured store. keyspace: Optional keyspace filter.
Inputs: store, keyspace.
montycat_policy_viewView Memory PolicyARead-onlyIdempotent
View the configured owner's effective Montycat governance policy.
This is read-only. It reports the authenticated owner's effective grants, denials, accessible and owned keyspaces, automatic creator capabilities, provisioning constraints, and policy health. The engine filters the result and remains the authorization boundary.
Args: store: Optional store to inspect. Defaults to the store configured by MONTYCAT_URI or MONTYCAT_STORE.
Inputs: store.
montycat_recallRecall MemoriesARead-onlyIdempotent
Recall memory by exact key or by field filter (not by meaning).
Provide key/custom_key to fetch a single record, or filters (a map of
field -> value) to look up all records matching those fields. For meaning-based
recall use montycat_semantic_search instead.
Args: keyspace: Memory namespace (defaults to the configured one). key: Montycat-generated key to fetch. custom_key: Custom key to fetch. filters: Field equality filters, e.g. {"user": "alice", "topic": "billing"}. limit: Max results for a filter lookup (default 25).
Inputs: key, limit, scope, filters, +2 more.
montycat_reembed_semanticRebuild Semantic VectorsADestructive
Replace an enrolled keyspace's text embedding model and backfill it.
This clears its current vectors, then has the engine rebuild them. Use
montycat_semantic_status to observe the resulting configuration.
Inputs: keyspace (required), semantic_model (required), field, store.
montycat_rememberStore MemoryA
Store a fact or record in memory; it is embedded and indexed automatically.
Later recall it by meaning with montycat_semantic_search, or by key with
montycat_recall. Returns the generated key in payload.
Every record is auto-stamped with an indexed _created_at (UTC ISO-8601)
unless the value already carries one — this powers time-range recall
(since/until on montycat_semantic_search). Top-level fields are
indexed, so they can be used as filters in hybrid search (e.g. store
{"project": "x", ...}, later filter on it).
Args:
value: The record to store (a JSON object).
scope: Owner/user id to store under (that owner's private memory,
keyspace mem_). Use "shared" for the common keyspace.
keyspace: Explicit keyspace override (advanced; bypasses scope).
custom_key: Optional stable key to store under (for later exact recall/update).
timestamp: Index a _created_at for time-range recall. Defaults to
MONTYCAT_AUTO_TIMESTAMP (on). Pass False to skip the
server-side timestamp parse when this memory will never be
recalled by time.
wait_for_index: For persistent keyspaces, wait until secondary indexes
have caught up before returning. Defaults to the engine
setting; use True when an immediate filtered/semantic
recall must see this write.
vector: Optional precomputed embedding for this record. It must match
the keyspace's enrolled embedding profile.
Inputs: value (required), scope, vector, keyspace, +3 more.
montycat_remember_bulkStore Multiple MemoriesA
Store many memories at once; all are embedded and indexed automatically.
Args:
values: A list of records (JSON objects) to store.
keyspace: Memory namespace (defaults to the configured one).
timestamp: Index a _created_at on each record for time-range recall.
Defaults to MONTYCAT_AUTO_TIMESTAMP (on). Pass False for
large imports that will never be recalled by time — it skips
a server-side timestamp parse per record.
wait_for_index: For persistent keyspaces, wait for secondary indexes
before returning. Defaults to the engine setting.
Inputs: values (required), scope, vectors, keyspace, +2 more.
montycat_remove_keyspaceDelete Memory KeyspaceADestructive
Permanently remove a memory namespace using the owner's authority.
This is a destructive lifecycle operation. Before removal Montycat MCP closes
the keyspace's live watch and releases MCP resource-subscription ownership
so the engine cannot deadlock on a lingering subscriber. The engine then
enforces remove-keyspace, creator authority, and explicit denials.
Args: scope: Owner/user scope to remove (maps to keyspace mem_). Use "shared" for the configured shared keyspace. keyspace: Explicit keyspace override (advanced; bypasses scope).
Inputs: scope, keyspace.
montycat_semantic_searchSearch MemoriesARead-onlyIdempotent
Search stored memory by MEANING, by KEYWORD, or both.
Use this to recall relevant facts, documents, or past context for RAG and agent memory. Returns the top matches ranked by relevance, each with its key, a score, and the stored value.
Ranking modes (mode):
"semantic" (default) — vector similarity. Finds a memory whose wording differs from the query. Scores are cosine similarity in [-1, 1].
"keyword" — BM25 over the stored text. Use it when the query contains an exact term that must appear: an identifier, error code, or file name. BM25 scores are unbounded and comparable only within one query.
"hybrid" — runs both and fuses them with reciprocal rank fusion. The safest default when a query mixes meaning with an exact term. Scores are normalized to [0, 1]. Keyword and hybrid need a Montycat Semantic engine >= 1.3.4; older engines reject the request rather than silently returning semantic-only results.
Narrowing is separate from ranking: filters, since, and until restrict
WHICH memories are ranked — a hard AND over indexed fields — and never
change the order within that set. Combine them freely: "what did we decide
about the index" + since yesterday + filters={"project": "montycat"} is
one call. A filter matching nothing returns [].
Args:
query: Natural-language description of what to recall. May be empty
when vector supplies a precomputed query embedding.
mode: Ranking strategy — "semantic", "keyword", or "hybrid".
vector: Optional precomputed query embedding, for the vector half of
"semantic" and "hybrid". It must match the keyspace's enrolled
embedding space and dimensions; when set, the engine does not
embed query.
scope: Owner/user id to scope recall to (searches only that owner's memory,
keyspace mem_). Use "shared" for the common keyspace.
keyspace: Explicit keyspace override (advanced; bypasses scope).
limit: Max number of results (default 5).
min_score: Optional relevance floor; drops weak matches. The valid range
follows the mode: [-1, 1] semantic, [0, 1] hybrid, >= 0
keyword.
filters: Optional metadata constraints, e.g. {"project": "x"} — only
memories whose indexed fields equal these values are ranked.
timestamp_field: Native Timestamp index field to constrain, e.g.
"event_time". Defaults to the auto-stamped "_created_at".
Use the index field name, not "timestamps.event_time".
The field must be stored as a Timestamp index; an
ordinary JSON string field is not sufficient.
since: Lower time bound for timestamp_field (ISO-8601, UTC).
until: Upper time bound for timestamp_field (ISO-8601, UTC).
Bounds use the SDK's native Timestamp after/before/range queries.
Do not also put timestamp_field in filters when supplying bounds.
Inputs: mode, limit, query, scope, +7 more.
montycat_semantic_statusView Semantic Search StatusARead-onlyIdempotent
Read the engine's actual semantic configuration and backfill state.
Pass both store and keyspace for one keyspace. Omitting both asks for
the database-wide view, which may require superowner authority.
Inputs: store, keyspace.
montycat_start_snapshotsStart Memory SnapshotsA
Start scheduled snapshots for one existing in-memory keyspace.
Montycat enforces manage-snapshots, creator authority, and explicit
denials. If the response says "Snapshot rate is not set", snapshot
scheduling is not configured on the engine; that is an environmental
configuration error, not an authorization denial. This tool cannot alter
the global snapshot rate.
Args: keyspace: Explicit in-memory keyspace to snapshot.
Inputs: keyspace (required).
montycat_stop_snapshotsStop Memory SnapshotsA
Stop scheduled snapshots for one existing in-memory keyspace.
Existing snapshot files are retained. Montycat performs the final authorization check.
Args: keyspace: Explicit in-memory keyspace whose snapshot schedule stops.
Inputs: keyspace (required).
montycat_updateUpdate MemoryA
Revise an existing memory in place (memory is mutable).
Use this when a stored fact changes — a corrected value, an updated
preference — instead of storing a duplicate. Only the fields you pass are
changed. Identify the record by key or custom_key.
Args: updates: Fields to change, e.g. {"status": "resolved"} or {"name": "Alice"}. keyspace: Memory namespace (defaults to the configured one). key: Montycat-generated key of the record to update. custom_key: Custom key of the record to update. wait_for_index: For persistent keyspaces, wait for secondary indexes before returning. Defaults to the engine setting.
Inputs: updates (required), key, scope, vector, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Each tool has a clearly defined job, and the retrieval tools are explicitly differentiated: semantic_search for meaning, recall for exact key/filter lookup, and list_memories for browsing. The only mild ambiguity is among enable_semantic, enable_external_vectors, and reembed_semantic, but their descriptions make the embedding-source distinction clear enough.
All tools share the montycat_ prefix, and most follow a verb_noun pattern like create_keyspace, list_memories, or await_memory_change. A few noun-first names such as semantic_search, policy_view, and policy_history break the pattern slightly, but the naming is still predictable and readable overall.
24 tools sit at the heavy end of the scale and cover many subdomains: memory CRUD, semantic search, keyspace lifecycle, policy, snapshots, and engine installation. Each tool has a purpose, but the surface is larger than a typical memory server needs and may overwhelm agents choosing among many admin operations.
Core memory operations are well covered: create, recall, update, forget, bulk write, list, search, and live change notification. The main gap is snapshot management—start, stop, and clean exist, but there is no restore or snapshot listing tool—and there is no explicit store-level management beyond keyspaces.
Maintenance
Related MCP Connectors
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Hosted persistent memory with semantic search, importance and TTL for AI agents.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Persistent cloud memory for AI agents. Store and search key-value memories across sessions.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides AI agents with persistent, searchable memory that survives across conversations using semantic search, temporal versioning, and smart organization. Enables long-term context retention and cross-session continuity for AI assistants.14-
- AlicenseAqualityCmaintenanceProvides persistent, searchable memory for AI agents, enabling them to retain, recall, and reflect on information across conversations.191MIT
- AlicenseNot gradedqualityDmaintenanceProvides durable memory for AI agents with structured storage, semantic search, OAuth authentication, and lifecycle controls.10Apache 2.0
- FlicenseNot gradedqualityDmaintenanceProvides AI agents with persistent, searchable long-term memory across sessions, enabling storage, full-text retrieval, updates, GDPR-compliant deletion, session summaries, and cross-referencing with per-namespace isolation.-