agentsocks
Lets Claude Code and Codex sessions on one machine message each other and share tasks
agentsocks is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Linux, macOS
- Runs
- Locally
- Version
- 0.4.0
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add agentsocks -- npx -y agentsocksAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"agentsocks": {
"command": "npx",
"args": [
"-y",
"agentsocks"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"agentsocks": {
"command": "npx",
"args": [
"-y",
"agentsocks"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"agentsocks": {
"command": "npx",
"args": [
"-y",
"agentsocks"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"agentsocks": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"agentsocks"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add agentsocks -- npx -y agentsocksOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.agentsocks]
command = "npx"
args = ["-y", "agentsocks"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"agentsocks": {
"command": "npx",
"args": [
"-y",
"agentsocks"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "agentsocks": { "command": "npx", "args": [ "-y", "agentsocks" ] } } }Or run: gemini mcp add -s user agentsocks npx -- -y agentsocks
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "agentsocks": { "command": "npx", "args": [ "-y", "agentsocks" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "agentsocks": { "command": "npx", "args": [ "-y", "agentsocks" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "agentsocks": { "command": "npx", "args": [ "-y", "agentsocks" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "agentsocks": { "command": "npx", "args": [ "-y", "agentsocks" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "agentsocks": { "command": "npx", "args": [ "-y", "agentsocks" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "agentsocks": { "command": "npx", "args": [ "-y", "agentsocks" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "agentsocks": { "command": "npx", "args": [ "-y", "agentsocks" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About agentsocks
agentsocks connects coding-agent sessions running on the same computer. From a Codex session you can say to tell api-worker that a migration is done, and the message arrives in the Claude Code session the way Claude already receives messages, through its own cross-session inbox. Nothing is typed into a terminal: it avoids tmux send-keys and fake user input, so a message from another agent is never treated as you and cannot answer a permission prompt.
Besides messages, a session can ask up to 16 others one question and collect the answers (experimental), or hand over a tracked task with an owner, state and result. Attention routing keeps a busy session from being interrupted by every note, sending FYIs as a digest. Channels, a live view called agentsocks top and an optional gateway linking your own machines over a tailnet are experimental.
It needs Node.js 22.13 or later, Claude Code 2.1.224 or later and Codex CLI 0.162 or later, with the other agents listed, such as OpenCode, Cursor and Gemini CLI, marked experimental. The README warns that it depends on non-stable internals of Claude Code and Codex, so updates can break delivery, and that it was built and tested on Linux, not yet used with real sessions on a Mac. It is not affiliated with Anthropic or OpenAI.
What it does
- Cross-agent messaging
- Send messages between Claude Code and Codex sessions, or from a shell.
- Tracked tasks
- Hand over a task with an owner, a state and a result.
- Group questions
- Ask up to 16 sessions one question and get answers together (experimental).
- Attention routing
- Digests FYIs and holds floods until a busy session finishes its turn.
- No terminal injection
- Messages are never typed in and cannot answer permission prompts.
- Doctor check
- agentsocks doctor verifies Node version, Codex queue and each agent's wiring.
Good for
- Tell a Claude Code worker that a database migration finished
- Hand a task from Codex to a Claude Code session
- Ask several coding sessions the same question
- See which agent sessions are running on your machine
- Coordinate a frontend and an API session
Pricing
Open source
Free open-source package on npm
agentsocks FAQ
What does agentsocks require?
Node.js 22.13 or later, Claude Code 2.1.224 or later and Codex CLI 0.162 or later.
Does agentsocks work across machines?
Only on one machine by default; an experimental gateway can link your own machines over a tailnet.
Which agents are fully supported?
Claude Code and Codex CLI; others such as OpenCode, Cursor and Gemini CLI are experimental and Aider is unsupported.
Is agentsocks safe for installed configs?
agentsocks install backs up every file it edits and offers a --dry-run.
Is agentsocks free?
Yes. agentsocks is open source, so you can use and self-host it for free.
How do I add agentsocks to Claude Code?
Run this command in your terminal: claude mcp add agentsocks -- npx -y agentsocks
What are the best alternatives to agentsocks?
The closest alternatives to agentsocks are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


