Memorix is an open-source cross-agent memory layer for coding agents via MCP, with tiered support for Cursor, Claude Code, Windsurf (★ core), GitHub Copilot, Kiro, Codex (◆ extended), and Gemini CLI, OpenCode, Antigravity, Trae (○ community).
Memorix has four common operator entry points:
memorixfor the interactive local workbench in a TTYmemorix servefor the default stdio MCP path used by most IDE integrationsmemorix background startfor an optional long-lived HTTP control planememorix serve-http --port 3211for foreground HTTP MCP, debugging, and manual supervision
The two server runtime modes are:
memorix servefor stdio MCP integrationsmemorix background startormemorix serve-http --port 3211for HTTP MCP, shared access, and a live dashboard endpoint
For most users, start with memorix or memorix serve. Move to HTTP only when you explicitly want one shared background control plane, multi-client MCP access, or a live dashboard endpoint.
This guide targets the 1.0.8 working release line.
If you are setting up Memorix on a fresh machine or upgrading from an older install, the most visible operator-facing changes in 1.0.8 are:
- provenance-aware memory fields and layered retrieval surfaces
- stronger evidence semantics and citation-lite compact output
- task-line scoping plus secret-safe storage/retrieval behavior
- attribution auditing, retention explainability, and a cleaner remediation loop
- OpenCode compaction using structured continuation context and
post_compact - official Docker deployment for the HTTP control plane
| Tier | Clients | Meaning |
|---|---|---|
| ★ Core | Claude Code, Cursor, Windsurf | Full hook integration + tested MCP + rules sync |
| ◆ Extended | GitHub Copilot, Kiro, Codex | Hook integration with platform caveats |
| ○ Community | Gemini CLI, OpenCode, Antigravity, Trae | Best-effort hooks, community-reported compatibility |
Install ≠ runtime-ready. memorix hooks install succeeds when config files are written to disk; whether the agent actually loads and executes those hooks at runtime depends on the agent's own behavior. Core-tier agents are verified end-to-end; extended/community may have gaps.
Install Memorix globally:
npm install -g memorixInitialize Memorix:
memorix initThe init wizard lets you choose between:
Global defaultsfor personal multi-project workflowsProject configfor repo-specific overrides
Memorix then creates the two-file setup it is built around:
memorix.ymlfor behavior and project settings.envfor secrets only
See CONFIGURATION.md for the full model.
memorix serveUse this when your IDE launches Memorix as a local stdio MCP server. This is the default MCP path for most single-IDE setups.
Generic stdio MCP config:
{
"mcpServers": {
"memorix": {
"command": "memorix",
"args": ["serve"]
}
}
}memorix background startThis mode gives you:
- HTTP MCP endpoint at
http://localhost:3211/mcp - dashboard at
http://localhost:3211 - live dashboard with autonomous Agent Team state
- a single long-lived Memorix process shared by multiple agents
Choose this mode when you intentionally want a shared control plane. It is not the default starting point for normal single-IDE memory use.
Companion commands:
memorix background status
memorix background logs
memorix background stopStartup note:
serve-httpseeds its default project root from--cwd->MEMORIX_PROJECT_ROOT->~/.memorix/last-project-root->process.cwd()- this helps the dashboard and control plane start in a sensible project even before any agent binds explicitly
- in multi-session workflows, agents should still call
memorix_session_start(projectRoot=...)to avoid cross-project drift - HTTP MCP sessions idle out after 30 minutes by default. For clients that do not transparently recover from stale HTTP session IDs, set
MEMORIX_SESSION_TIMEOUT_MSbefore starting the control plane, for exampleMEMORIX_SESSION_TIMEOUT_MS=86400000for 24 hours.
Use memorix serve-http --port 3211 when you want the same HTTP control plane in the foreground for debugging, manual supervision, or a custom port.
Important for multi-project usage:
- In HTTP control-plane mode, agents should call
memorix_session_startwithprojectRootset to the absolute path of the current workspace or repo root when that path is available. projectRootis a detection anchor only; Git remains the source of truth for the final project identity.- If the client cannot provide a reliable workspace path, Memorix should fail closed rather than silently inventing an
untracked/*project.
Recommended when:
- you want to use the dashboard regularly
- you want Team tools to work
- you want multiple IDEs or agents to talk to one Memorix instance
Generic HTTP MCP config:
{
"mcpServers": {
"memorix": {
"transport": "http",
"url": "http://localhost:3211/mcp"
}
}
}Some clients use a different key than transport. The per-client examples below show the exact shape where that differs.
If you want Memorix as a long-lived containerized control plane:
docker compose up --build -dThis repo now ships:
- an official
Dockerfile - an example
compose.yaml - a healthchecked HTTP deployment on port
3211
Docker mode is for:
memorix serve-http- dashboard access
- HTTP MCP clients pointing at
http://localhost:3211/mcp
It is not a containerized form of stdio MCP.
Important path truth:
- project-scoped Git/config behavior only works when the container can see the repo path it is asked to bind
- if you run Memorix in Docker on a different machine than your IDE, you must mount the relevant repos into the container or accept reduced project-scoped semantics
See DOCKER.md for the full deployment guide.
If you want Memorix to generate IDE-specific dot files, install them explicitly:
memorix integrate --agent cursor
memorix integrate --agent windsurf
memorix integrate --agent opencodeThis keeps the default experience MCP-first and zero-write until you opt into a specific IDE integration.
Recommended:
claude mcp add memorix -- memorix serveManual config example:
{
"mcpServers": {
"memorix": {
"command": "memorix",
"args": ["serve"]
}
}
}HTTP example:
{
"mcpServers": {
"memorix": {
"transport": "http",
"url": "http://localhost:3211/mcp"
}
}
}If you use the HTTP control plane and your client supports workspace-aware prompts or rules, make sure it calls memorix_session_start with the current workspace absolute path as projectRoot.
Project config: .cursor/mcp.json
{
"mcpServers": {
"memorix": {
"command": "memorix",
"args": ["serve"]
}
}
}Config file: ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"memorix": {
"command": "memorix",
"args": ["serve"]
}
}
}HTTP example:
{
"mcpServers": {
"memorix": {
"serverUrl": "http://localhost:3211/mcp"
}
}
}For Windsurf-like HTTP clients, pair the MCP URL with agent instructions that pass the current workspace absolute path as projectRoot when starting a Memorix session.
Config file: ~/.codex/config.toml
[mcp_servers.memorix]
command = "memorix"
args = ["serve"]
startup_timeout_sec = 30HTTP example:
[mcp_servers.memorix]
url = "http://localhost:3211/mcp"For Codex-like HTTP clients, the transport URL alone is not enough for multi-project parallel work. The agent should also call memorix_session_start with the current workspace absolute path as projectRoot.
Project config: .vscode/mcp.json
{
"servers": {
"memorix": {
"command": "memorix",
"args": ["serve"]
}
}
}Project config: .kiro/settings/mcp.json
{
"mcpServers": {
"memorix": {
"command": "memorix",
"args": ["serve"]
}
}
}OpenCode integration is usually file-based and managed through Memorix hook installers or workspace sync. If you use stdio MCP directly, the same memorix serve command applies.
If the client supports stdio MCP:
{
"mcpServers": {
"memorix": {
"command": "memorix",
"args": ["serve"]
}
}
}If it supports HTTP MCP, prefer:
http://localhost:3211/mcp
Recommended dashboard entry:
http://localhost:3211
This is the dashboard served by the HTTP control plane. In normal use, start it with memorix background start; use memorix serve-http when you want the same service in the foreground.
It includes:
- Overview
- Git Memory
- Graph
- Observations
- Retention
- Sessions
- Team
- Config
- Identity Health
There is also a standalone memorix dashboard command. It is a local read-mostly dashboard that includes memory, sessions, and autonomous Agent Team state from SQLite. HTTP is optional and only needed for shared MCP access or a live control-plane endpoint.
Agent Team features are explicit autonomous-agent coordination surfaces. Use the CLI for the normal path:
memorix team status
memorix orchestrate --goal "..."These features include:
- agent registry
- direct messages
- file locks
- task board
The standalone dashboard can show this state read-only. Start HTTP only when you also want a shared MCP control plane or a live dashboard endpoint.
npm install -g memorix
memorix init
memorix servenpm install -g memorix
memorix init
memorix git-hook --force
memorix background startThen:
- point your IDE MCP client to
memorix serveorhttp://localhost:3211/mcp - open the dashboard at
http://localhost:3211
Do not launch Memorix with npx in normal MCP configs. It adds startup cost and can cause handshake timeouts.
Prefer:
memorix serveNot:
npx memorix serveOn Windows, ~/.codeium/windsurf/mcp_config.json must be valid JSON encoded as UTF-8 without BOM. A BOM at the start of the file can make Windsurf reject otherwise valid JSON.
If Codex reports MCP startup timeouts, increase:
startup_timeout_sec = 30or higher on slower Windows machines.
If Codex is connected to http://localhost:3211/mcp and fails after a long idle period with a transport/body decoding error, the HTTP session may have expired server-side. Memorix defaults to a 30-minute HTTP session idle timeout. Increase it before starting the background control plane:
$env:MEMORIX_SESSION_TIMEOUT_MS = "86400000" # 24h
memorix background restartThis keeps the default safe for normal users while giving long-running Codex HTTP sessions a practical recovery knob.
Memorix identifies projects from Git. If an IDE launches from a system directory or does not pass the workspace root correctly:
- prefer opening the repository root in the IDE
- if needed, set
MEMORIX_PROJECT_ROOT - use
memorix statusto inspect the active project identity
That usually means no autonomous agent workflow has created tasks, locks, messages, or explicit agent identities for this project yet.
Use:
memorix team status
memorix task listTo create autonomous work, use:
memorix orchestrate --goal "..."If you specifically want shared HTTP MCP or a live dashboard endpoint, then start:
memorix background startCheck:
- the repository has Git initialized
- the hook file exists
- the commit was not filtered as noise
- the active project identity is correct
Use:
memorix statusand see GIT_MEMORY.md.