Skip to content

Setup with agent

Give this file to your AI agent to automatically set up mnemo-mcp.

2026-05-02 Update (v+): Plugin install (Option 1) now uses pure stdio mode with local SQLite storage. No required env vars — mnemo works out-of-box. The previous “Zero-Config Relay” auto-spawn pattern has been removed. Optional cloud providers (Jina/Gemini/OpenAI/Cohere) and Google Drive sync are still supported — set them via env vars (Option 1/2) or configure them through the relay form in HTTP mode (see setup-manual.md “Method 3 (Docker HTTP — Self-host)”).

This plugin supports 3 install methods. Pick the one that matches your use case:

PriorityMethodTransportBest for
1. DefaultPlugin install (uvx/npx)stdioQuick local start, single workstation, no OAuth/HTTP needed.
2. FallbackDocker stdio (docker run -i --rm)stdioWindows/macOS where native uvx/npx hits PATH or Python version issues.
3. RecommendedDocker HTTP (docker run -p 8080:8080)HTTPMulti-device, OAuth/relay-form auth, team self-host, claude.ai web compatibility.

All MCP servers across this stack share this priority hierarchy. Note: 2 plugins (better-godot-mcp and better-code-review-graph) only support Method 1 (stdio) — they need direct host access to project files / repo paths and don’t ship Docker / HTTP variants.

⚠️ Mutually exclusive — pick ONE per plugin: If you choose Method 2 (Docker stdio override) OR Method 3 (HTTP), do NOT also /plugin install this plugin via marketplace. Both load simultaneously and create duplicate entries in /mcp dialog (plugin’s stdio + your override). Plugin matching is by endpoint (URL or command string) per CC docs, not by name — and npx/uvxdocker ≠ HTTP URL, so all three are distinct endpoints. Trade-off: choosing Method 2 or Method 3 means you lose this plugin’s skills/agents/hooks/commands. For full plugin features, use Method 1 (default plugin install) with userConfig credentials prompted at install time.

Section titled “Option 1: Claude Code Plugin (Recommended)”

Plugin marketplace install runs the server in pure stdio mode. mnemo works with zero required env vars — it falls back to local SQLite + local Qwen3 ONNX embedding. Cloud providers and GDrive sync are optional.

When you run /plugin install, Claude Code prompts you for the following credentials (declared in userConfig per CC docs). Sensitive values are stored in your system keychain and persist across /plugin update:

FieldRequiredWhere to obtain
JINA_AI_API_KEYOptionalhttps://jina.ai/api-key
GEMINI_API_KEYOptionalhttps://aistudio.google.com/apikey
OPENAI_API_KEYOptionalhttps://platform.openai.com/api-keys
COHERE_API_KEYOptionalhttps://dashboard.cohere.com/api-keys
Terminal window
# Install from marketplace (includes skills: /session-handoff, /knowledge-audit)
/plugin marketplace add n24q02m/claude-plugins
/plugin install mnemo-mcp@n24q02m-plugins

Other optional env vars (GEMINI_API_KEY, OPENAI_API_KEY, COHERE_API_KEY, SYNC_ENABLED, GOOGLE_DRIVE_CLIENT_ID, etc.) are not part of the userConfig prompt; add them manually to mcpServers.mnemo.env in your settings if needed.

Note: This installs the full plugin (skills + agents + hooks + commands + stdio MCP server). If you’d rather use Option 2 (Docker stdio) or Option 3 (HTTP) below, DO NOT /plugin install this plugin — pick Option 2 or Option 3 instead. All three methods are mutually exclusive (see Method overview).

⚠️ Before adding the Docker stdio override below, ensure this plugin is NOT installed via marketplace: Run /plugin uninstall mnemo-mcp@n24q02m-plugins first if you previously ran /plugin install. Otherwise both entries (plugin’s npx/uvx stdio + your docker run stdio) will load simultaneously since plugin matches by endpoint (command string), not by name.

Trade-off accepted: Choosing this method means you lose this plugin’s skills/agents/hooks/commands. Use Option 1 instead if you want full plugin features.

Terminal window
docker run -i --rm \
--name mcp-mnemo \
-v mnemo-data:/data \
-e JINA_AI_API_KEY \
-e GEMINI_API_KEY \
-e OPENAI_API_KEY \
-e COHERE_API_KEY \
n24q02m/mnemo-mcp:latest

Or as an MCP server config:

{
"mcpServers": {
"mnemo": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"--name", "mcp-mnemo",
"-v", "mnemo-data:/data",
"-e", "JINA_AI_API_KEY",
"-e", "GEMINI_API_KEY",
"n24q02m/mnemo-mcp:latest"
]
}
}
}

Stdio is the default and works fine for single-user local setups. You may want to switch to HTTP mode (self-host) when you need any of the following:

  • claude.ai web compatibility — claude.ai (the web UI) supports HTTP MCP servers but cannot spawn local stdio processes.
  • One server shared across N Claude Code sessions — a single HTTP instance serves multiple terminals/IDEs without re-spawning per session, sharing the same memory database.
  • Browser-based GDrive OAuth — enable Google Drive sync without manually exchanging an OAuth token in the env (the relay form completes the OAuth flow in your browser).
  • Multi-device credential sync — configure cloud API keys / GDrive once, the server uses them for any device/session that connects.
  • Multi-user team sharing — a self-hosted server can serve multiple memory databases, each isolated per JWT-sub.
  • Always-on persistent process for webhooks/agents — HTTP servers stay alive between sessions, enabling background sync, scheduled archive runs, or background memory consolidation.

For self-hosting HTTP mode (your own multi-user mnemo server with bundled GDrive OAuth), see setup-manual.md “Method 3 (Docker HTTP — Self-host)”.

Public HTTP deployments expose <your-domain>/authorize to URL discovery. To prevent random Internet users from accessing the relay form, mint a relay password:

Terminal window
openssl rand -hex 32
# Save in your skret / .env as:
MCP_RELAY_PASSWORD=<generated-32-byte-hex>

Share this password out-of-band (Signal/email/SMS) with anyone you invite to use your server. They will see a login form when first opening /authorize; once logged in, the cookie persists 24 hours.

Single-user dev exception: If PUBLIC_URL=http://localhost:8080, you can leave MCP_RELAY_PASSWORD empty to disable the gate. The server logs a warning if you skip the password with a non-localhost PUBLIC_URL.

All environment variables are optional. The server works in local mode (ONNX embedding) with zero configuration.

VariableRequiredDefaultDescription
JINA_AI_API_KEYNoJina AI key: embedding + reranking (highest priority)
GEMINI_API_KEYNoGoogle Gemini key: LLM (importance scoring, graph extraction) + embedding
OPENAI_API_KEYNoOpenAI key: LLM + embedding (lower priority than Gemini)
COHERE_API_KEYNoCohere key: embedding + reranking
VariableRequiredDefaultDescription
DB_PATHNo~/.mnemo-mcp/memories.dbDatabase location
VariableRequiredDefaultDescription
EMBEDDING_BACKENDNoauto-detectcloud or local (Qwen3). Auto: API keys present -> cloud, else local
EMBEDDING_MODELNoauto-detectCloud embedding model name
EMBEDDING_DIMSNo0 (auto=768)Embedding dimensions
RERANK_ENABLEDNotrueEnable reranking (improves search precision)
RERANK_BACKENDNoauto-detectcloud or local. Auto: Jina/Cohere key -> cloud, else local
RERANK_MODELNoauto-detectCloud reranker model name
RERANK_TOP_NNo10Number of top results after reranking
VariableRequiredDefaultDescription
LLM_MODELSNoauto-detectLLM model for importance scoring, graph extraction, consolidation (LiteLLM format)
VariableRequiredDefaultDescription
ARCHIVE_ENABLEDNotrueEnable auto-archiving of old low-importance memories
ARCHIVE_AFTER_DAYSNo90Days before a memory is eligible for auto-archive
ARCHIVE_IMPORTANCE_THRESHOLDNo0.3Memories below this importance score are auto-archived
DEDUP_THRESHOLDNo0.9Similarity threshold to block duplicate memories
DEDUP_WARN_THRESHOLDNo0.7Similarity threshold to warn about similar memories
RECENCY_HALF_LIFE_DAYSNo7Half-life for temporal decay in search scoring
VariableRequiredDefaultDescription
SYNC_ENABLEDNofalseEnable rclone sync
SYNC_PROVIDERNodriverclone provider type (drive, dropbox, s3, etc.)
SYNC_REMOTENogdriverclone remote name
SYNC_FOLDERNomnemo-mcpRemote folder name
SYNC_INTERVALNo300Auto-sync interval in seconds (0=manual)
VariableRequiredDefaultDescription
TRANSPORT_MODENo (stdio)stdioSet to http to enable HTTP transport (multi-user, bundled GDrive OAuth).
PUBLIC_URLYes (http)Server’s public URL for OAuth redirects and /authorize setup page.
DCR_SERVER_SECRETYes (http)HMAC secret for stateless Dynamic Client Registration. Generate via openssl rand -hex 32.
PORTNo8080Server port (http mode only).
VariableRequiredDefaultDescription
LOG_LEVELNoINFOLogging level

⚠️ Before adding the HTTP override below, ensure this plugin is NOT installed via marketplace: Run /plugin uninstall mnemo-mcp@n24q02m-plugins first if you previously ran /plugin install. Otherwise both entries (plugin’s stdio + your HTTP override) will load simultaneously since plugin matches by endpoint, not name.

Trade-off accepted: Choosing this method means you lose this plugin’s skills/agents/hooks/commands. For example, the mnemo-mcp:knowledge-audit skill will no longer be available. Use Option 1 instead if you want full plugin features.

Switching transport vs. setting credentials: The userConfig prompt only configures credentials for stdio mode (Method 1 / Option 1). To switch transport to HTTP, override mcpServers in your client settings per the snippets below — this is a separate path from userConfig and is not driven by the install prompt.

See setup-manual.md “Method 3: Docker HTTP (recommended)” for full instructions on self-hosting the multi-user HTTP mode (per-JWT-sub credential isolation, browser GDrive OAuth, relay password edge auth).

Quick start:

Terminal window
docker run -p 8080:8080 \
-e TRANSPORT_MODE=http \
-e PUBLIC_URL=https://your-domain.com \
-e DCR_SERVER_SECRET=$(openssl rand -hex 32) \
-v mnemo-data:/data \
n24q02m/mnemo-mcp:latest

Client config:

{
"mcpServers": {
"mnemo": {
"type": "http",
"url": "https://your-domain.com/mcp"
}
}
}

Stdio Mode (Local SQLite + Optional Env Cloud Keys)

Section titled “Stdio Mode (Local SQLite + Optional Env Cloud Keys)”

mnemo works without any credentials — it falls back to local SQLite + local Qwen3 ONNX embedding. Optionally set cloud API keys (Jina/Gemini/OpenAI/Cohere) as env vars for higher-quality results.

For Google Drive sync in stdio mode, manually create the OAuth token at ~/.mnemo-mcp/tokens/google_drive.json (chmod 600). For browser-based OAuth, use HTTP mode.

HTTP Mode (Bundled GDrive OAuth + Per-JWT-Sub Isolation)

Section titled “HTTP Mode (Bundled GDrive OAuth + Per-JWT-Sub Isolation)”

The server hosts a /authorize page that lets each user paste their cloud API keys and complete Google Drive OAuth in the browser. The Google Desktop OAuth public client is bundled (same pattern as wet-mcp); no separate Google Cloud Console registration is required.

Credentials are stored encrypted at ~/.mnemo-mcp/subs/<sub>/, isolated per JWT-sub.

After setup, verify the server is working by calling the memory tool:

memory(action="stats")

Expected: returns database statistics including total memories count and categories.