About agent-magnet
agent-magnet is a local-by-default memory layer for people using Claude, Cursor, and Codex. It automatically organizes project context and preferences across sessions, with options to remove or complete memories and share them with a team.
Key features
- 01Automatically captures work context
- 02Shared memory across Claude, Cursor, and Codex
- 03Organizes decisions, preferences, and goals
- 04Forget memories or mark them done
- 05Team memory sharing
Use cases
- 01Carry project context between AI sessions
- 02Reuse preferences and conventions across supported tools
- 03Share a team decision as context for others
MCP support
It provides an MCP server for Codex and other MCP clients. The `agent-magnet init` command detects and configures Claude Code, Claude Desktop, and Cursor.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
uvx agent-magnetMAGNET_USER_IDYour identifier used as the memory key across all toolsMAGNET_OPENAI_KEYSecretOpenAI API key for the reflector and classifier modelsMAGNET_LOCAL_MODESet to 1 to use local SQLite storage — no Redis or external services neededMAGNET_REDIS_URLRedis connection URL for persistent shared storage (overrides local mode)MAGNET_PROJECT_IDNamespace for memory isolation across projects (defaults to 'default')Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project README
Your AI forgets your project every new session. This fixes that.
What it does
- Learns automatically as you work — no "remember this" required
- Shares one memory across Claude, Cursor, and Codex
- Lets you forget or mark things done — memory doesn't just pile up
Quick start
pip install agent-magnet
agent-magnet init
That's the whole install. No Redis, no keys, local by default.
What it remembers
Decisions, conventions, watch-outs, failed attempts, goals, preferences, and actions taken — one memory, sorted automatically.
Team memory
Shared memory for a team — one person's decision becomes everyone's context. Requires a paid Agent Magnet key from agentmagnet.app.
Works everywhere
Claude, Cursor, Codex — same memory, local by default. agent-magnet init detects and configures Claude Code, Claude Desktop, and Cursor for you.
Manual MCP config (Codex, or any other MCP client)
{
"mcpServers": {
"agent-magnet": {
"command": "agent-magnet-mcp",
"env": { "MAGNET_USER_ID": "your_name" }
}
}
}
MIT licensed. Contribute — and a ⭐ if this saved your context window.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.