N2N Nexus: Connect Claude Code and Codex for Multi-Agent Collaboration
Set up the N2N Nexus host and clients so Claude Code and Codex can share project context, exchange direct messages, and hold meetings across machines.

N2N Nexus connects AI coding assistants to a shared local host. Claude Code and Codex conversations can find each other, send direct messages, and keep project decisions in meetings instead of asking you to copy chat transcripts between windows.
Use it when several assistants work on related projects or when your work spans Windows, WSL, macOS, or Linux. The host keeps coordination data; your editors and assistants still perform the development work.
This guide covers the current host-and-client installation. Older instructions that start a daemon with npx n2n-nexus daemon do not describe this setup.
How the Host and Clients Fit Together
n2n-nexus-host on one machine
Shared projects, docs, messages, meetings and tasks
|
HTTP
|
n2n-nexus clients in each environment
Claude Code Codex
Install n2n-nexus-host once, then install the n2n-nexus npm client wherever you run an AI client. The host stores shared state in a local SQLite database. MCP adapters forward tool calls to it, while client hooks identify conversations and deliver messages.
Other MCP clients can use shared project tools, but direct conversation messaging requires the Claude Code or Codex integration. Nexus is not a source-code index or a vector database. For repository-specific memory, see N2N Memory.
Step 1: Install and Start the Host
Choose the installation for the machine that will keep the shared state:
| Platform | Installation |
|---|---|
| Windows with Scoop | Run scoop bucket add n2ns https://github.com/n2ns/scoop-bucket, then scoop install n2ns/n2n-nexus-host. |
| macOS with Homebrew | Run brew install n2ns/tap/n2n-nexus-host. |
| Linux | Download the matching host archive from GitHub Releases, extract it, and put n2n-nexus-host on your PATH. |
On a desktop, run n2n-nexus-host to start the tray app. For a server without a desktop, follow the background-service instructions in the installation guide. Keep the host running before connecting clients.
Step 2: Install the Client
The client requires Node.js 22.14 or newer on the 22.x line, or Node.js 23.6 or newer. Install it in each environment where you run Claude Code or Codex:
npm i -g n2n-nexus@latest
Then run the registration command for the client you use, or both if you use both:
n2n-nexus install claude
n2n-nexus install codex
These commands register the MCP server and conversation hooks in your user configuration. Start a new conversation afterwards so the client loads them. On Windows, use a regular terminal for installation rather than the terminal inside a packaged app.
The Codex installer also attempts to trust its hooks. If it reports that automatic trust failed, follow the hook trust instructions before testing direct messages. Without working hooks, shared tools alone do not bring the conversation online for messaging.
Step 3: Check the Connection
n2n-nexus doctor
The diagnostic checks the installed commands, hook setup, host connectivity, and client/host contract compatibility. Keep the host and clients on matching releases. If the host runs on another machine, use --endpoint <url> with the installation command; the multi-machine instructions cover LAN access and discovery.
The host listens on loopback by default. A client on another machine needs a reachable host with LAN access enabled; installing the npm package alone does not make the host reachable.
Step 4: Try a Small Handoff
Open two new conversations and give each a clear responsibility. For example, ask one assistant to inspect an API response and another to inspect the corresponding frontend call.
Ask the first assistant to list peers and send its findings to the second. The receiving assistant can answer with reply. Each conversation has its own identity, including the machine and environment, so the handoff can name the correct recipient.
For a decision involving several assistants, use a meeting. When you participate through the user's seat, you decide the draft and close the meeting; the assistants' consensus is reported to you. A meeting record does not replace review of the resulting code changes.
What Nexus Shares
| Capability | Use it for |
|---|---|
| Project manifests and assets | Give assistants a common project description and shared documents. |
| Direct messages | Hand off a finding or ask a specific Claude Code or Codex conversation for help. |
| Meetings | Discuss a proposal and retain decisions. |
| Tasks | Track work that assistants carry out and update themselves. |
Nexus does not merge code changes or isolate working directories for you. Assign separate write scopes when assistants share a checkout.
Troubleshooting and Next Steps
If a conversation is missing from the peer list, check that you started a new session after installation and that its hooks run. If the host cannot be reached, run doctor in the same environment as the affected client and check its endpoint. For generic process, PATH, or transport problems, use the MCP connection troubleshooting guide.
See the N2N Nexus project page for the current capabilities and documentation links, and the user guide for daily use and message delivery details.