setup

A setup guide for Memoria, a memory service for AI coding tools. It explains how to connect Memoria Cloud or a self-hosted instance to Kiro, Cursor, Claude Code, Codex, or Gemini CLI.

In plain words
What is it for?
Use it when installing Memoria and connecting it to an AI coding tool. It helps configure cloud or self-hosted memory for the selected tool.
Why use it?
It removes the guesswork from choosing a hosting mode, database, embedding provider, and tool-specific configuration. It also points to the configuration files each tool needs.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/matrixorigin/memoria/setup
Any agent
npx skills add matrixorigin/memoria --skill setup
Clone the repo
git clone --depth 1 https://github.com/matrixorigin/memoria

Made for: Claude Code, Codex.

Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,588 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 4 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00050 $0.01588
Opus 5 $0.00025 $0.00794
Sonnet 5 $0.00010 $0.00318
Haiku 4.5 $0.00005 $0.00159

Measured 2d ago against content hash c85ee55cd105, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade E, and why

setup scanned grade E with 4 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

tar xzf memoria-x86_64-unknown-linux-musl.tar.gz && sudo mv memoria /usr/local/bin/

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -sSL https://raw.githubusercontent.com/matrixorigin/Memoria/main/scripts/install.sh | bash

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

| Codex | `codex` | `~/.codex/config.toml` + `AGENTS.md` |

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sSL https://raw.githubusercontent.com/matrixorigin/Memoria/main/scripts/install.sh | bash
skills/setup/SKILL.md · 169 lines

How it starts

The opening of the file, as written. The whole thing — 169 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Decision Tree

Follow these steps in order. Steps marked "Self-Hosted only" can be skipped for Memoria Cloud users.

Step 1: Memoria Cloud or Self-Hosted?

Ask: "Use Memoria Cloud, or run your own instance?"

  • Memoria Cloud (recommended) → sign up at thememoria.ai, get API URL + token, then proceed to Step 2
  • Self-hosted → proceed to Step 2

Step 2: Which AI tool?

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

Step 3: Database (Self-Hosted only)

Skip this step if user chose Memoria Cloud in Step 1.

Ask: "Do you have a MatrixOne database running?"

  • Already have one → get connection URL (format: mysql+pymysql://<user>:<pass>@<host>:<port>/<db>)
  • No → run docker compose up -d in the Memoria repo root (wait 30-60s for first start)

Step 4: Embedding provider (Self-Hosted only)

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?"

  • Yes → collect: base URL, API key, model, dimension
  • No → suggest SiliconFlow (free tier) or Ollama. Local embedding requires --features local-embedding build.

Step 5: Install Memoria CLI

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

Read the full file on GitHub · 169 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 169 lines · 50 tokens per session scan E c85ee55cd105

Subscribe to this mod's changes

setup is a skill published in the GitHub repository matrixorigin/memoria (591 stars, last pushed 6d ago), licensed Apache-2.0. It adds 50 tokens to every session and 1,588 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it E with 4 findings (asks for root, downloads and executes remote code, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.