hardline-mcp
Enables local AI coding agents to message each other on one machine using a durable SQLite mailbox and live-ask tools.
README
hardline-mcp
A single-purpose MCP server that lets local AI coding agents — Claude Code, Hermes, and Codex — message each other on one machine. A durable SQLite mailbox is the backbone; thin live-ask tools let one agent get an answer from another right now.
hardline — in The Matrix, the hardwired lines a crew uses to reach agents in the field; in telecom, a dedicated direct circuit. This is that line, between your agents.
Companion to vram-mcp: same single-purpose, per-machine, install-everywhere shape.
Why
Local agents have mismatched lifecycles — a Claude Code or Codex session is ephemeral, a Hermes gateway is always-on — so a naive "just call each other" bridge drops messages the moment the other side isn't running. hardline-mcp splits the problem:
- Mailbox (durable, async).
sendrecords every message to SQLite (WAL mode → safe concurrent writes from every agent's own subprocess). Recipientsinbox/ackon their own rhythm;historyis the audit feed. Survives restarts and lifecycle mismatches — you can message an agent that isn't up yet, and it reads the note when it next runs. - Push, no daemon.
send(..., deliver=true)also fires the recipient's native CLI at send time (hermes chat -Q -q/codex exec/claude -p), so it sees the message without polling — real push with zero extra always-on processes. - Live ask.
ask_hermes/ask_codex/ask_claudespawn a one-shot session and return the reply synchronously. Heavier than the mailbox; use when you need the answer immediately.
Tools
| Tool | Behavior |
|---|---|
send(from_agent, to_agent, message, deliver=false) |
Persist; if deliver, also push to the recipient's native CLI. |
inbox(agent, unread_only=true) |
Messages addressed to agent, oldest first. |
ack(message_id) |
Mark read (idempotent). |
history(limit=50, agent=None) |
Recent messages newest-first; agent matches sender or recipient. |
ask_hermes(prompt) |
Live query → hermes chat -Q -q. |
ask_codex(prompt) |
Live query → codex exec. |
ask_claude(prompt) |
Live query → claude -p. |
Agents are the fixed set claude, hermes, codex. Identity is self-declared
(from_agent) — convention, not enforced auth; every process runs as the same
user on one machine, so there's nothing to defend against that it couldn't do
directly anyway.
Requirements
- Python 3.10+
- Whichever agent CLIs you want to reach on PATH (or see Configuration):
claude,hermes,codex.
Install
pip install -e .
hardline-mcp is the stdio server console-script entry point.
Configuration
The mailbox lives at ~/.cache/hardline-mcp/mailbox.db — no setup needed. Set
HARDLINE_DB to relocate it, or to run isolated instances (each agent's server
must point at the same file to share a mailbox).
Each agent's CLI must be launchable by hardline-mcp. If a binary isn't on
PATH, pin its executable path (path only — the fixed subcommand is
appended automatically) via env var:
HARDLINE_HERMES_CMD— e.g.C:/Users/you/AppData/Local/hermes/hermes-agent/venv/Scripts/hermes.exeHARDLINE_CLAUDE_CMDHARDLINE_CODEX_CMD— usually unnecessary: Codex installs to a hash-named dir that changes on every update, so hardline-mcp auto-discovers the newestcodex.exerather than relying on a path that rots. Set this only to override discovery.
Resolution precedence per agent: env override → (codex only) auto-discovery →
bare command on PATH.
Register with an MCP client
Claude Code (or any client using the claude mcp CLI):
claude mcp add hardline-mcp --scope user -- /path/to/hardline-mcp
Hermes (~/.hermes/config.yaml):
mcp_servers:
hardline:
command: "/path/to/hardline-mcp"
args: []
Codex (~/.codex/config.toml — Codex uses its own TOML config):
[mcp_servers.hardline]
command = '/path/to/hardline-mcp'
args = []
Example flow
# In agent A (claude), leave a durable note for hermes and push it live:
send(from_agent="claude", to_agent="hermes",
message="deploy finished, logs at /tmp/deploy.log", deliver=true)
# hermes, whenever it runs, reads and acks:
inbox(agent="hermes") -> [{message_id: 7, sender: "claude", ...}]
ack(message_id=7)
# Or ask hermes something and block for the answer:
ask_hermes(prompt="what's the current gateway status?")
Development
pip install -e ".[dev]"
python -m pytest -q
The suite includes a headless end-to-end test that launches two real server subprocesses over MCP stdio and does a cross-instance round-trip — no agents needed, runs in CI.
There is also a live integration test (tests/test_live_agents.py) that
spawns the actual hermes / codex / claude CLIs and drives the ask_*
bridges against their real brains. It's off by default (it costs plan tokens
and needs the CLIs installed) — it skips unless HARDLINE_LIVE_TESTS=1, and
skips per-agent when a CLI isn't reachable, so CI never runs it:
# hermes usually isn't on PATH — point at its binary, same as production
HARDLINE_LIVE_TESTS=1 HARDLINE_HERMES_CMD="/path/to/hermes" python -m pytest tests/test_live_agents.py -v
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。