con un clic
setup
// Install Memoria and configure MCP for AI tools (Kiro, Cursor, Claude Code, Codex, Gemini CLI). Decision tree for Cloud vs self-hosted mode, database, embedding provider. Use when helping users set up Memoria.
// Install Memoria and configure MCP for AI tools (Kiro, Cursor, Claude Code, Codex, Gemini CLI). Decision tree for Cloud vs self-hosted mode, database, embedding provider. Use when helping users set up Memoria.
Use Memoria as OpenClaw's durable memory slot. Triggers: "remember this", "save to memory", "what do you remember", "continue from last time", "forget this", "correct memory", "take a snapshot", "rollback memory", "branch memory", "merge memory", "use long-term memory".
Deploy Memoria with Docker Compose or Kubernetes. Environment variables, multi-instance setup, security. Use when deploying or configuring Memoria.
Memoria REST API endpoints, request/response formats, auth, rate limits. Use when calling or implementing API endpoints.
Memoria codebase structure, workspace layout, key traits, database tables, config patterns, and testing conventions. Use when navigating or modifying Memoria code.
Run embedding on-device with ONNX Runtime. Build from source, model selection, offline mode. Use when setting up local embedding without an API key.
Create, test, sign, and publish Memoria governance plugins. Covers Rhai and gRPC runtimes, manifest format, lifecycle. Use when developing or managing plugins.
| name | setup |
| description | Install Memoria and configure MCP for AI tools (Kiro, Cursor, Claude Code, Codex, Gemini CLI). Decision tree for Cloud vs self-hosted mode, database, embedding provider. Use when helping users set up Memoria. |
Follow these steps in order. Steps marked "Self-Hosted only" can be skipped for Memoria Cloud users.
Ask: "Use Memoria Cloud, or run your own instance?"
Ask: "Which AI tool are you using — Kiro, Cursor, Claude Code, Codex, or Gemini CLI?"
The --tool flag value and config files generated per tool:
| Tool | --tool value | Config files |
|---|---|---|
| Kiro | kiro | .kiro/settings/mcp.json + .kiro/steering/memory.md |
| Cursor | cursor | .cursor/mcp.json + .cursor/rules/memory.mdc |
| Claude Code | claude | .mcp.json + CLAUDE.md |
| Codex | codex | ~/.codex/config.toml + AGENTS.md |
| Gemini CLI | gemini | .gemini/settings.json + GEMINI.md |
Skip this step if user chose Memoria Cloud in Step 1.
Ask: "Do you have a MatrixOne database running?"
mysql+pymysql://<user>:<pass>@<host>:<port>/<db>)docker compose up -d in the Memoria repo root (wait 30-60s for first start)Skip this step if user chose Memoria Cloud in Step 1.
⚠️ Hard to reverse. Embedding dimension is locked into schema on first startup.
Ask: "Do you have an OpenAI-compatible embedding endpoint?"
--features local-embedding build.The memoria binary is required for all modes — it serves as the MCP bridge between the AI tool and the Memoria server.
One-line install (recommended):
curl -sSL https://raw.githubusercontent.com/matrixorigin/Memoria/main/scripts/install.sh | bash
Or download manually from GitHub Releases.
Platform-specific manual install:
# Linux x86_64
curl -LO https://github.com/matrixorigin/Memoria/releases/latest/download/memoria-x86_64-unknown-linux-musl.tar.gz
tar xzf memoria-x86_64-unknown-linux-musl.tar.gz && sudo mv memoria /usr/local/bin/
# macOS Apple Silicon
curl -LO https://github.com/matrixorigin/Memoria/releases/latest/download/memoria-aarch64-apple-darwin.tar.gz
tar xzf memoria-aarch64-apple-darwin.tar.gz && sudo mv memoria /usr/local/bin/
# From source (required for local embedding)
cd Memoria/memoria && cargo build --release -p memoria-cli
# With local embedding: cargo build --release -p memoria-cli --features local-embedding
sudo cp target/release/memoria /usr/local/bin/
Verify: memoria --version
Sign up at thememoria.ai — after login you will receive the API URL and token.
cd <user-project>
memoria init --tool <tool> --api-url '<API URL from thememoria.ai>' --token '<your token>'
Replace <tool> with the value from Step 2 (e.g., kiro, cursor, claude, codex, gemini).
docker compose up -d # Start MatrixOne
docker ps --filter name=matrixone # Verify (wait 30-60s)
cd <user-project>
memoria init --tool <tool> # + embedding flags below
cd <user-project>
memoria init --tool <tool> --db-url 'mysql+pymysql://<user>:<pass>@<host>:<port>/<db>'
# Local (default, no flags)
memoria init --tool <tool>
# OpenAI-compatible
memoria init --tool <tool> \
--embedding-provider openai \
--embedding-base-url https://api.siliconflow.cn/v1 \
--embedding-api-key sk-... \
--embedding-model BAAI/bge-m3 \
--embedding-dim 1024
After running memoria init, tell user to:
memoria statusExpected: memory_retrieve("test") → "No relevant memories found".
memoria rules --force # After upgrading Memoria binary, re-sync steering rules
These are the underlying commands that memoria init configures. Users normally don't need to run them directly.
# Embedded mode (direct DB connection, self-hosted)
memoria mcp --db-url "mysql+pymysql://root:111@localhost:6001/memoria" --user alice
# Remote mode (proxy to Memoria API server, Cloud or self-hosted API)
memoria mcp --api-url "<API URL>" --token "<token>"
# SSE transport (alternative to default stdio)
memoria mcp --transport sse
| Problem | Fix |
|---|---|
| MatrixOne won't start | docker logs memoria-matrixone |
| Port 6001 in use | Change MO_PORT in .env |
| Can't connect to DB | Wait 30-60s on first start |
| Docker permission denied | sudo usermod -aG docker $USER && newgrp docker |
| Docker not available | Use Memoria Cloud instead (no Docker needed) |
| First query slow | Normal with local embedding (~3-5s). Use openai provider for faster response |
local-embedding not compiled | Use OpenAI-compatible service, or build from source with --features local-embedding |
| AI tool doesn't see memory tools | 1. Run which memoria to verify CLI installed 2. Restart AI tool 3. Test MCP server directly |