Agent Magnet logo

Agent Magnet

Local MCP memory that learns project context and shares it across Claude, Cursor, and Codex.

Install Agent Magnet

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "agent-magnet": {
      "command": "uvx",
      "args": [
        "agent-magnet"
      ],
      "env": {
        "MAGNET_USER_ID": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The agent-magnet MCP server gives Claude, Cursor, and Codex a shared behavioral memory for project decisions, conventions, preferences, and prior attempts. It learns from work automatically, stores memory locally by default, and supports forgetting or completing stored items. Run `agent-magnet init` after installing the package to configure supported clients, or connect another MCP client with the provided command and user ID. Reach for it when separate AI sessions need persistent project context without adding Redis or API keys.

Use cases

  • Remember project decisions across AI coding sessions
  • Share coding conventions between Claude, Cursor, and Codex
  • Remove outdated project context from memory
  • Give a development team shared memory

Key features

  • Automatic behavioral memory
  • Shared memory across supported clients
  • Local operation by default
  • Forget and complete memory items
  • Optional team memory

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

8/8 checks healthy over the last 42d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10h ago via OSV.dev · agent-magnet (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars14Stargazers on the source repository.
Last commit1mo agoMost recent push to the default branch.

How Agent Magnet works

What the agent-magnet MCP server does

The agent-magnet MCP server provides a memory layer for AI-assisted development. It records project context such as decisions, coding conventions, warnings, failed approaches, goals, preferences, and actions already taken. The memory is shared across Claude, Cursor, and Codex, so each supported client can work from the same accumulated context instead of starting with an empty session.

Learning happens during normal work. Stored information can also be forgotten or marked as completed, which helps remove outdated context rather than allowing the memory store to grow without maintenance.

How it works

The agent-magnet MCP server runs locally by default. Its package installation does not require Redis or API keys for the local setup. After installation, agent-magnet init detects and configures Claude Code, Claude Desktop, and Cursor. Codex and other MCP clients can be configured manually.

A manual MCP configuration starts the agent-magnet-mcp command and supplies a MAGNET_USER_ID value. That identifier is shown in the example as a user-defined name.

Team memory is a separate option. It allows one team member’s decision to become available as shared context for others, but it requires a paid Agent Magnet key from the project’s website.

Setup and configuration

Install the Python package and initialize it:

Terminal
pip install agent-magnet
agent-magnet init

For Codex or another MCP client, use an MCP server entry similar to this:

config.json
{
  "mcpServers": {
    "agent-magnet": {
      "command": "agent-magnet-mcp",
      "env": { "MAGNET_USER_ID": "your_name" }
    }
  }
}

The automatic initialization path is documented for Claude Code, Claude Desktop, and Cursor. Manual configuration is the documented route for Codex and unspecified MCP clients. Local use is the default; team memory needs a paid Agent Magnet key.

Tools and capabilities

The agent-magnet MCP server supports these documented capabilities:

  • Automatically learn context while work proceeds.
  • Share one memory across Claude, Cursor, and Codex.
  • Store decisions, conventions, watch-outs, failed attempts, goals, preferences, and actions.
  • Forget stored information when it is no longer useful.
  • Mark items as done so completed context can be managed.
  • Provide team-wide memory when configured with the required paid service key.

Limitations and notes

Local memory and team memory have different requirements. Local operation is described as requiring neither Redis nor keys, while team memory requires a paid Agent Magnet key.

Client support explicitly mentioned in the documentation covers Claude, Cursor, Codex, Claude Code, and Claude Desktop. Other MCP clients may be configured manually, but compatibility details are not provided. The project is MIT licensed.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Agent Magnet

agent-magnet is an MCP server that connects Claude, Cursor, and Codex to shared behavioral memory. Its main capabilities are automatically learning project context, storing decisions and preferences, sharing memory across clients, and letting users forget or mark stored items as completed. Local operation is the default and does not require Redis or keys.

Install it with `pip install agent-magnet`, then run `agent-magnet init`. The initializer detects and configures Claude Code, Claude Desktop, and Cursor. Codex and other MCP clients require manual configuration using the `agent-magnet-mcp` command.

Yes, agent-magnet works with Cursor. The `agent-magnet init` command detects and configures Cursor, and Cursor shares the same memory as the other explicitly supported clients.

Connect agent-magnet to Codex by adding an MCP server entry that runs `agent-magnet-mcp` and sets `MAGNET_USER_ID`. The README provides a manual JSON configuration for Codex and other MCP clients.

Yes, agent-magnet supports team memory with a paid Agent Magnet key. The documented team feature lets one person’s decision become shared context for the team, while local memory remains available without a key.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAgent Magnet AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/agent-magnet?style=directory)](https://allmcps.com/mcp/agent-magnet)
HTML Embed
<a href="https://allmcps.com/mcp/agent-magnet"><img src="https://allmcps.com/api/badge/agent-magnet?style=directory" alt="Agent Magnet on AllMCPs" /></a>