Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.memanto.ai/llms.txt

Use this file to discover all available pages before exploring further.

Model Context Protocol (MCP)

mcp The memanto-mcp package exposes Memanto’s memory primitives — remember, recall, answer, and friends — as Model Context Protocol tools, so any MCP-compatible client can plug into long-term memory in a single config line.
One Moorcheh API key → typed semantic memory shared across every agent that uses the namespace, with sub-90 ms retrieval, conflict detection, and zero ingestion latency.

Universal

Works with every MCP host: Claude Desktop, Cursor, Windsurf, Cline, Continue, Goose, Codex, and custom agents using the MCP SDK.

Zero glue code

No client code, no vector DB. Add one JSON block to your client’s config and the agent gets 7 memory tools.

Typed memory

13 memory types (fact, preference, decision, goal, instruction, …) with confidence + provenance — built for LLM tool-selection.

Shared namespace

Different clients pointed at the same agent_id share one memory. Remember in Claude Desktop, recall in Cursor.

How It Works

┌──────────────┐    MCP (stdio)    ┌──────────────────┐    HTTPS + API key   ┌─────────────┐
│ Claude / IDE │ ────────────────► │   memanto-mcp    │ ───────────────────► │   Moorcheh  │
│   (client)   │ ◄──────────────── │   (this server)  │ ◄─────────────────── │   Service   │
└──────────────┘   tool calls      └──────────────────┘   no-indexing search └─────────────┘
The server runs locally next to your MCP host. On the first tool call it activates a Memanto session (auto-creating the agent if needed) and reuses it across the conversation. Sessions auto-renew before expiry, so long-running MCP connections never hit a session-expired error mid-turn.

Prerequisites

  • Python 3.10+
  • A Moorcheh API key (free tier: 100K ops/month)
  • Any MCP-compatible client

Install

pip install memanto-mcp
This installs the memanto-mcp console script that every client below launches over stdio.

Quickstart

Pick your client. The JSON shape is identical across most hosts — only the config file path changes.
1

Open the config file

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
Or use Settings → Developer → Edit Config.
2

Add the Memanto server

{
  "mcpServers": {
    "memanto": {
      "command": "memanto-mcp",
      "env": {
        "MOORCHEH_API_KEY": "mch_xxxxxxxxxxxxxxxxxx",
        "MEMANTO_DEFAULT_AGENT_ID": "my-assistant"
      }
    }
  }
}
3

Restart Claude Desktop

Ask Claude to “remember that I prefer concise answers”. Tomorrow, in a brand-new chat, ask “what do I prefer?” — the answer comes from Memanto.
The first call auto-creates the MEMANTO_DEFAULT_AGENT_ID namespace and activates a session. Every subsequent call (in any client pointed at the same agent) reuses the same persistent memory.

Available Tools

The server registers 7 memory tools by default. Set MEMANTO_EXPOSE_ADMIN=true to also expose 4 agent-management tools.

Memory tools (always on)

ToolWhen the agent should call it
rememberPersist a single fact, preference, decision, goal, or instruction.
batch_rememberPersist up to 100 memories in one call (e.g. extracted from a document).
recallSemantic search — always check here before asking the user to repeat stable info.
recall_recent”What did we just decide?” — newest-first, no query needed.
recall_as_ofPoint-in-time recall — “what did we know on 2025-11-01?”
recall_changed_sinceDifferential recall — “what’s new since I last checked?”
answerRAG: a grounded LLM answer synthesized over the agent’s memories.

Agent admin tools (opt-in)

Enabled when MEMANTO_EXPOSE_ADMIN=true:
ToolPurpose
create_agentCreate a new memory namespace.
list_agentsList every agent the API key can see.
get_agentLook up an agent’s metadata.
delete_agentRemove an agent’s local metadata.
fact, preference, goal, decision, artifact, learning, event, instruction, relationship, context, observation, commitment, error.See the Memory Types Reference for guidance on picking the right type.
explicit_statement, inferred, corrected, validated, observed, imported.Use explicit_statement when the user said it directly, inferred when you deduced it, and corrected when overriding an earlier wrong memory.

Configuration

All configuration is via environment variables (load order: process env → .env file in the working directory). Most clients let you set these inside the env block of the MCP server entry.
VariableRequiredDefaultDescription
MOORCHEH_API_KEYyesMoorcheh API key.
MEMANTO_DEFAULT_AGENT_IDrecommendedDefault agent. When set, tool calls may omit agent_id.
MEMANTO_AGENT_PATTERNnotoolPattern (support / project / tool) used when auto-creating the default agent.
MEMANTO_AGENT_AUTO_CREATEnotrueCreate the default agent on first use if missing.
MEMANTO_SESSION_DURATION_HOURSno6Session lifetime in hours (1 – 720).
MEMANTO_EXPOSE_ADMINnofalseRegister the 4 agent-management tools.
MEMANTO_MCP_TRANSPORTnostdiostdio, sse, or streamable-http.
MEMANTO_MCP_HOSTno127.0.0.1Bind host for sse / http transports.
MEMANTO_MCP_PORTno8765Bind port for sse / http transports.
MEMANTO_MCP_LOG_LEVELnoINFOLog level. Logs are always sent to stderr.
CLI flags override env vars:
memanto-mcp --transport sse --port 9000 --log-level DEBUG

Running over HTTP / SSE

For remote clients or multi-process setups, run the server over a network transport:
The server authenticates upstream to Moorcheh with your API key, but does not authenticate inbound MCP clients. For production, pair it with a reverse proxy that enforces auth (e.g. mTLS, OAuth, or a shared bearer token).

Programmatic Embedding

Wiring the server into a larger Python process or custom MCP host:
from memanto_mcp import MCPServerSettings, build_server

settings = MCPServerSettings()  # reads env / .env
mcp = build_server(settings)

# Add your own tools alongside Memanto's, then run.
mcp.run(transport="stdio")
Useful when you want to combine Memanto with a domain-specific MCP toolset in one process.

Sharing Memory Across Clients

Point multiple clients at the same MEMANTO_DEFAULT_AGENT_ID and they share one persistent memory namespace:
// Claude Desktop
"env": { "MEMANTO_DEFAULT_AGENT_ID": "my-personal" }

// Cursor
"env": { "MEMANTO_DEFAULT_AGENT_ID": "my-personal" }
A preference stored in Claude Desktop is now recallable from Cursor on the next tool call — Moorcheh’s no-indexing search means the memory is queryable the millisecond it’s written.

Troubleshooting

SymptomFix
configuration error: MOORCHEH_API_KEY is requiredSet the env var in your MCP client config’s env block.
Agent '…' does not exist and MEMANTO_AGENT_AUTO_CREATE is disabledRe-enable auto-create, or call create_agent (admin tools) / memanto agent create <id> once.
Tools never appear in the clientConfirm the client supports MCP and the config path matches. Check the client’s MCP log: memanto_mcp lines on startup come from this server.
Garbled output in stdio modeSomething on your side is writing to stdout — that channel is reserved for JSON-RPC. Move logs to stderr. The server itself only writes to stderr.
Slow first callCold-start cost: SDK import + first session activation. Subsequent calls reuse the live session.
Session-expired errors mid-conversationThe server auto-renews before expiry. If you still see this, bump MEMANTO_SESSION_DURATION_HOURS.

Next Steps

Memory Types Reference

Learn which memory type to pick for each piece of information.

Agent Management

Create, activate, and switch Memanto agents.

Remember API

The REST endpoint the remember MCP tool wraps.

Recall API

The REST endpoint the recall MCP tool wraps.

Links