# agent-magnet [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/helinakdogan/magnet-gateway  
**GitHub Stars:** 14  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agent-magnet

## Description
Behavioral memory layer for AI tools. Learns preferences and context across Claude, Cursor, Codex.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "agent-magnet": {
    "command": "uvx",
    "args": ["agent-magnet"],
    "env": {
      "MAGNET_USER_ID": ""
    }
  }
}
```

**Requires environment variables:** `MAGNET_USER_ID` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## 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:

```bash
pip install agent-magnet
agent-magnet init
```

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

```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.

_Full upstream README: https://allmcps.com/mcp/agent-magnet/readme_

