Magents logo

Magents

Coordinates local AI-agent sessions for handoffs, messaging, memory, transcript search, and independent task spawning.

Install Magents

Run the project’s own setup commands, in order.

Setup steps from the project

magents installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    brew install abnegate/tap/magents
    
  2. 2. Install
    magents install --all
    
  3. 3. Install
    curl -fsSL https://abnegate.github.io/apt-repo/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/abnegate.gpg
    
  4. 4. Install
    sudo apt update && sudo apt install magents
    
  5. 5. Install
    curl -LSsf -o magents \
      "https://github.com/abnegate/magents/releases/latest/download/magents-$(uname -m | sed 's/arm64/aarch64/')-$(uname -s | tr 'A-Z' 'a-z' | sed 's/darwin/apple-darwin/;s/linux/unknown-linux-musl/')"
    
  6. 6. Run
    chmod +x magents
    

Overview

The magents MCP server provides a shared session bus for local Claude, Codex, Cursor, Grok, and other supported agent sessions. It reads existing transcripts and memory files, lets agents find or message live sessions, and can start persisted headless work. Reach for it when context is split across agent windows or when an independent subtask needs its own session and working directory. It runs as a stdio MCP server through the magents CLI.

Use cases

  • Resume work from another agent session
  • Send a task to a specific live chat
  • Search transcripts for prior decisions
  • Spawn an isolated persisted subtask
  • Share notes across local agent sessions

Key features

  • Cross-session discovery and handoffs
  • Transcript and memory search
  • Mailbox messaging between agents
  • Headless persisted session spawning
  • Working-directory notes and file tracking
  • Learning-state collection and management

Tools18

What Magents lets your agent do. Expand a tool for its parameters.

Self-reported~291 tokens of context

Security & health

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

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 63d

Adoption & maintenance

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

GitHub stars16Stargazers on the source repository.
Last commit10d agoMost recent push to the default branch.
Tools exposed18Callable tools this server registers over MCP.

How Magents works

What magents MCP server does

The magents MCP server exposes a shared API over local agent sessions that already store transcripts on disk. It helps one agent inspect work performed in another session, continue a live conversation, send a message to a specific chat, or start a separate persisted task. Supported session references can identify hosts such as Claude, Codex, Grok, Cursor, OpenCode, Gemini, and Copilot, depending on the host and local installation.

The server is designed around existing chats rather than duplicating conversation history. It can produce compact handoff context containing recent requests, actions, turns, working directory, and branch information. It also provides transcript and memory search, shared notes, mailbox operations, and learning-state operations.

How it works

The magents MCP server runs through the magents mcp command and communicates with MCP clients over stdio. Its session discovery can use connection environment, a local socket, or a unique working directory to resolve the current session. Session records can be filtered by working directory or branch and looked up by identifiers such as title, process ID, live name, or an agent:ref value.

For existing chats, send_message records mailbox mail and prefers a native live delivery route when the host supports one. If a live route is unavailable, it can use a supervised resume path. handoff compacts the current context and injects it into another live session. spawn_session starts a new headless persisted session; an accepted spawn means launch has started, not that the task has completed.

Setup and configuration

Install the CLI with Homebrew, APT, a release binary, a container, or Cargo. Running magents install --all registers the stdio MCP server with detected hosts and installs supported magents and learn skills. The documented host registrations include Grok, Claude Code, Codex, Cursor, OpenCode, Gemini CLI, and GitHub Copilot CLI.

For manual setup, configure an MCP server named magents with the executable path as command and mcp as its argument. Restart the agent session or refresh its MCP connections after registration. Container usage mounts the home directory and passes HOME so the process can access local agent data.

Tools and capabilities

Available operations include:

  • Discover, inspect, digest, and filter live or recent sessions.
  • Read, search, and summarize stored transcripts.
  • Search Claude, Codex, and Grok memory Markdown files, and write supported first-party memory notes.
  • Send messages, perform handoffs, use the cross-session inbox, and inspect files touched by another session.
  • Spawn or stop magents-supervised sessions.
  • Store working-directory notes and resolve the current connection.
  • Collect and update /learn records, decisions, state, and trash.

The CLI also supports JSON output for machine-readable results. Spawn prompts can come from standard input or a file rather than a process argument.

Limitations and notes

The magents MCP server depends on local transcripts, host binaries, sockets, and session formats. Host-specific delivery behavior differs, and automatic installation skips hosts whose required binaries are unavailable. A spawned session inherits its host's approval policy; creating it does not bypass approvals. Existing sessions remain the default unit of work, while spawning is intended for tasks that can proceed independently.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

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

Frequently Asked Questions about Magents

magents is an MCP server that connects local Claude, Codex, Grok, Cursor, and other supported agent sessions through a shared session bus. Its main tools list and inspect sessions, read and search transcripts, send messages, hand off context, manage memory and notes, and spawn persisted headless sessions for independent work.

Install the magents CLI with Homebrew, APT, a release binary, a container, or Cargo, then run `magents install --all`. The command registers the stdio MCP server with detected supported hosts. You can also configure an MCP entry that runs the magents executable with `mcp` as its argument.

Yes, magents can hand off context between supported Claude and Codex sessions. Use session discovery and transcript tools to identify the target, then use `handoff` for an existing live chat or `send_message` to deliver a user turn and record mailbox mail.

Yes, `spawn_session` starts a new headless persisted session for independent work. Provide a complete task, and use an isolated working directory when edits could collide. The returned accepted state confirms that launch was accepted, not that the task has finished.

Yes, Cursor is one of the hosts supported by the installation flow and has a bundled plugin path. The CLI can register the stdio MCP server in Cursor's MCP configuration, subject to the local Cursor installation and available session data.

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 PreviewMagents AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/magents?style=directory)](https://allmcps.com/mcp/magents)
HTML Embed
<a href="https://allmcps.com/mcp/magents"><img src="https://allmcps.com/api/badge/magents?style=directory" alt="Magents on AllMCPs" /></a>