# peer-bus: Grok ↔ Claude Code Agent Messaging (MCP + CLI)

> Working cross-harness list_agents / send_message for Grok Build and Claude Code: a zero-dependency Python stdio MCP server + CLI over a local filesystem bus.

peer-bus: Grok ↔ Claude Code Agent Messaging (MCP + CLI) is a paid AI agent skill pack (several skills in one listing) on Agensi by soturisata, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $12 (one-time purchase)
- Creator: [soturisata](https://www.agensi.io/creators/soturisata)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-10-18
- Security: scan passed (2026-10-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/peer-bus-grok-claude-code-agent-messaging-mcp-cli
- Tags: coding, automation, agents, mcp, developer-tools, multi-agent, claude-code

## About this skill

**Real, tested code, not a prompt.** peer-bus lets live **Grok Build** and **Claude Code** sessions on the same Linux machine find each other and exchange messages, the way Claude sessions already can with native `SendMessage` / `ListAgents`, but across both harnesses.

### What you get
- `mcp_server.py`: stdio MCP server with 8 tools: `list_agents`/`flock`, `send_message`, `receive_messages`, `ack_message`, `whoami`, `heartbeat`, `mail_count`
- `peer_bus.py`: the same verbs as a CLI, plus `watch` (inotify), `mail`, `prune`, `doctor`, `self-test`
- A Claude Code wake hook that nudges idle sessions to pull new mail
- A runtime agent skill with a compact `@v1` dispatch format (CTX / DO / NOT / PRIOR / RPT)
- Copy-paste config for Grok Build (`~/.grok/config.toml`) and Claude Code (`settings.json`), a smoke test, a playbook and a security model

### How it works
Messages are JSON files under one bus directory (`~/.local/share/peer-bus` by default). Each inbox is bound to the harness session id, so a display name cannot be used to read someone else's mail. The live roster comes from tmux / Herdr panes and running Grok sessions. Senders get explicit *accepted, not read* semantics, and received bodies are wrapped as untrusted content.

### Why this one
Most orchestration listings are prompt-only guides that describe how agents *should* hand off work. This one ships the transport: Python stdlib only (no pip install), path-traversal and symlink protection, size and flood caps, 95 unit tests plus a bundled end-to-end smoke script.

### Requirements
Linux or WSL2 · Python 3.11+ · bash · Grok Build and/or Claude Code running as the same OS user · tmux or Herdr session for Claude peers. Same-user, single-machine bus. It is not a multi-tenant or cross-machine messaging system.

## Requires

- Python 3.11+
- Bash
- tmux or Herdr (for Claude peers)
- Grok Build and/or Claude Code

## Known limitations

Requires Linux or WSL2. Same-user, same-host only. No macOS or native Windows support. Claude peers must run in tmux or Herdr for discovery.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the peer-bus: Grok ↔ Claude Code Agent Messaging (MCP + CLI) skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill help agents in different terminal sessions talk to each other?

This skill bridges the gap between isolated terminal sessions by providing a shared messaging bus, allowing Grok Build and Claude Code to discover each other, exchange data, and coordinate tasks in real-time.

### Which AI agents and operating systems are compatible with this tool?

It is specifically designed for Linux and WSL2 environments, with native support for discovery within tmux and Herdr sessions using Grok Build and Claude Code.

### Do I need to install any external database or third-party libraries to use the messaging bus?

No, this is a zero-dependency Python tool that uses a local filesystem bus; all communication stays on your machine and does not require external network access or API keys for the messaging itself.

### Does this package include an MCP server for easy integration?

Yes, it includes a full Model Context Protocol (MCP) server implementation and a CLI, allowing your agents to interact with the messaging bus via standard tool-calling interfaces.

### Can agents running under different user accounts communicate using this skill?

For security and simplicity, all agents must be running as the same OS user, as the discovery mechanism relies on local process scanning and shared directory permissions.

### What exactly is included in the purchase?

You receive the complete Python source code for the messaging bus, the MCP server configuration, and the documentation for integrating the `send`, `receive`, and `list` commands into your agent's workflow.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
