Skip to content
MCP server

Agent Magnet

Behavioral memory layer for AI tools. Learns preferences and context across Claude…

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
0.1.11
Listing updated
5 days ago

About Agent Magnet

Agent Magnet is an open-source MCP server. It runs locally on your machine and is started by your AI client.

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

Install

Run in a terminal

claude mcp add agent-magnet --env MAGNET_USER_ID='<MAGNET_USER_ID>' -- uvx agent-magnet

Add to claude_desktop_config.json

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

Add to ~/.cursor/mcp.json

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

Add to .vscode/mcp.json

{
  "servers": {
    "agent-magnet": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "agent-magnet"
      ],
      "env": {
        "MAGNET_USER_ID": "<MAGNET_USER_ID>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

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

Add to your client's MCP settings (most use this shape)

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

Using several servers? Build one config file with the MCP config generator.

Configuration

  • MAGNET_USER_IDYour identifier used as the memory key across all toolsRequired
  • MAGNET_OPENAI_KEYOpenAI API key for the reflector and classifier models
  • MAGNET_LOCAL_MODESet to 1 to use local SQLite storage — no Redis or external services needed
  • MAGNET_REDIS_URLRedis connection URL for persistent shared storage (overrides local mode)
  • MAGNET_PROJECT_IDNamespace for memory isolation across projects (defaults to 'default')

Pricing

Open source

Agent Magnet FAQ

Is Agent Magnet free?

Yes. Agent Magnet is open source, so you can use and self-host it for free.

How do I add Agent Magnet to Claude Code?

Run this command in your terminal: claude mcp add agent-magnet --env MAGNET_USER_ID='<MAGNET_USER_ID>' -- uvx agent-magnet

Where this comes from

  • Description: from the official MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers