Skip to main content
MCP server CX Codex

agent-magnet — Claude Code MCP server: memory and setup

This MCP server carries project context between sessions and AI tools. Use it for decisions, conventions, preferences, and past attempts.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env MAGNET_USER_ID=<MAGNET_USER_ID> --env MAGNET_OPENAI_KEY=<MAGNET_OPENAI_KEY> --env MAGNET_LOCAL_MODE=<MAGNET_LOCAL_MODE> --env MAGNET_REDIS_URL=<MAGNET_REDIS_URL> --env MAGNET_PROJECT_ID=<MAGNET_PROJECT_ID> --transport stdio agent-magnet -- uvx agent-magnet
Open on GitHub

What agent-magnet does

agent-magnet gives AI coding tools a persistent behavioral memory. It records project decisions, conventions, cautions, goals, preferences, failed approaches, and completed actions, then organizes those records for later use. The same memory can serve Claude, Cursor, and Codex.

The local setup starts with pip install agent-magnet followed by agent-magnet init. That command configures Claude Code, Claude Desktop, and Cursor. Codex and other MCP clients can use a manual setup with agent-magnet-mcp and the MAGNET_USER_ID environment variable.

Local operation needs no key. Team memory does require a paid Agent Magnet key. Configuration may also include MAGNET_OPENAI_KEY, MAGNET_LOCAL_MODE, MAGNET_REDIS_URL, and MAGNET_PROJECT_ID.

What it helps with

  • carry project decisions into new sessions
  • share context across Claude, Cursor, and Codex
  • record conventions and team preferences
  • remove stale memories after work is complete
  • connect persistent context to an MCP client

Example prompts for the agent

  • Remember that this project uses PostgreSQL for persistence.
  • Store the rule that API handlers belong in src/api.
  • Forget the outdated warning about legacy-auth.

How to install agent-magnet

Platform CLI

claude mcp add --env MAGNET_USER_ID=<MAGNET_USER_ID> --env MAGNET_OPENAI_KEY=<MAGNET_OPENAI_KEY> --env MAGNET_LOCAL_MODE=<MAGNET_LOCAL_MODE> --env MAGNET_REDIS_URL=<MAGNET_REDIS_URL> --env MAGNET_PROJECT_ID=<MAGNET_PROJECT_ID> --transport stdio agent-magnet -- uvx agent-magnet

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from agent-magnet <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about agent-magnet

How do I install agent-magnet in Claude Code?

Run claude mcp add agent-magnet -e MAGNET_USER_ID=<MAGNET_USER_ID> -- uvx agent-magnet.

What does agent-magnet do?

It keeps project decisions, conventions, goals, preferences, and prior attempts available across sessions. The memory can be used by several supported AI coding tools.

Does agent-magnet need an API key?

Local use works without a key. Shared team memory requires a paid Agent Magnet key.

Similar MCP servers

MCP servers catalog →
lead-magnet-generator ognjengt Generates two lead magnet posts designed to collect comments and direct-message requests. Use it for Twitter/X or LinkedIn giveaways. CX Codex +1 1,200installs lead-magnet OpenClaudia A skill that helps you design a lead magnet — checklist, template, calculator, mini-course or whitepaper — and the landing page that captures emails. CX Codex +1 452installs REA morluto Analyzes binaries, Electron bundles, and JavaScript runtimes directly from your agent. It inspects compiled apps without source code to recreate specific features. CX Codex +1 ★ 392,262repo stars GitHub official github Wires your AI agent into GitHub: read code, open issues and pull requests, watch Actions runs. Saves a trip to the browser. CX Codex +1 ★ 33,989repo stars World Monitor koala73 Connects real-time global intelligence across geopolitics, markets, energy, and cyber incidents to your AI assistant. Ideal for tracking country risk and trade disruptions. CX Codex +1 ★ 89,609repo stars Netdata netdata Hands your AI agent live monitoring data: metrics, logs, alerts and anomaly detection. Useful when you need to know what a server is doing without opening the dashboard. CX Codex +1 ★ 81,163repo stars Front-End Checklist thedaviddias Connect an MCP server that checks frontend code and public pages against quality rules. Use it to review components or audit accessibility, SEO, and performance. CX Codex +1 ★ 74,569repo stars Scrapling MCP Server D4Vinci Web scraping MCP server with stealth browsers, JavaScript rendering, and Cloudflare bypass. Extracts clean Markdown and structured page data for AI agents. CX Codex +1 ★ 89,899repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor