Agent Relay MCP
Allows creating and managing tasks with the Hermes service for E2E collaboration testing via the AgentRelay protocol.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Agent Relay MCPlist all agents"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Agent Relay MCP
Installable MCP client and local inbox/notifier for AgentRelay.
Protocol v0.6 is active in production. Protocol v0.5 remains available through a temporary Listener compatibility lane while legacy Tasks drain:
Listener offline/readiness stale no longer prevents Task creation on a v0.6 Relay.
The listener registers an epoch, drains parked Message and terminal Events, durably writes and verifies each inbox file, then ACKs through the intake hook.
listener-status.jsonand the local UI expose connection, heartbeat, Relay readiness, reader/queue depth, last ACK, hook health, remote backlog knowledge, and new/expired/failed recovery counts.doctorvalidates the installed v0.6 Listener identity instead of opening a competing WebSocket.
Protocol v0.5 compatibility behavior remains:
Task lifecycle is
open/completed/expired/failed.Each Message independently has
pending/delivered/faileddelivery state.Mutations use one aggregate
task_versionand stable idempotency keys.Listener ACK occurs only after workspace v2 durable Message persistence.
v0.3/v0.4 workspaces and tools remain available only for historical reads.
The default local experience is:
install this repo into the current Codex thread workspace as
agentRelayconfigure the AgentRelay MCP server
run a local WebSocket listener
write received Relay events into a durable local inbox
use
http://127.0.0.1:8787/as the personal AgentRelay inbox/notifiershow pending work and prepare safe copyable prompts for the user's chosen local agent
avoid automatically invoking the user's local agent unless the user explicitly opts in
The private AgentRelay cloud/server repo remains private. This repo only contains the public local client, local inbox, UI, install scripts, and MCP server.
Quick Install For A Local Agent
When a user asks a local Codex agent to install AgentRelay MCP, use the one-command installer:
npx github:ZilingXie/agent-relay-mcp installThe npx command installs or updates a stable local checkout at ~/agentRelay, then runs the default local inbox installer from that checkout. To choose another stable checkout path:
npx github:ZilingXie/agent-relay-mcp install -- --install-dir /absolute/path/to/agentRelayTo pass known non-secret identity fields:
npx github:ZilingXie/agent-relay-mcp install -- --agent-id zac-agent --username zacThe installer preserves an existing .env and installs the default local inbox path:
writes the Codex MCP managed block into
~/.codex/config.tomlcreates
.envif it does not existpreserves existing
.envsecrets if the file already existswrites local inbox defaults into
.envmigrates the managed primary protocol to v0.6 and keeps a v0.5 Listener lane while legacy Tasks drain
creates
state/issues.jsonandstate/task-drafts.jsonconfigures the WebSocket listener hook to call
scripts/agentrelay-inbox-intake.mjsinstalls the inbox UI service at
http://127.0.0.1:8787/defaults to
personal_agent+notify_onlydisables automatic processor/executor on receive
starts the listener service only if a non-placeholder token is already available
After install, the agent should tell the user to fill .env and restart Codex App or open a new Codex session. Do not print AGENTRELAY_TOKEN.
Related MCP server: hotwired-mcp
Required .env
Ask the AgentRelay cloud/server admin for:
AGENTRELAY_BASE_URL
AGENTRELAY_WS_URL
AGENTRELAY_AGENT_ID
AGENTRELAY_USERNAME
AGENTRELAY_TOKENThe local inbox managed block is written by the installer. It points listener delivery at the local inbox:
AGENTRELAY_INBOX_DIR="/absolute/path/to/agentRelay/.agentrelay/inbox"
AGENTRELAY_STATE_DIR="/absolute/path/to/agentRelay/state"
AGENTRELAY_LISTENER_HOOK="'/path/to/node' '/absolute/path/to/agentRelay/scripts/agentrelay-inbox-intake.mjs'"
AGENTRELAY_AGENT_ROLE="personal_agent"
AGENTRELAY_EXECUTION_MODE="notify_only"
AGENTRELAY_HUMAN_APPROVAL_MODE="conversation"
AGENTRELAY_COMPAT_PROTOCOL_VERSIONS="agent-collab-v0.5"
AGENTRELAY_ACK_ON_INBOX_RECEIVED=1
AGENTRELAY_READINESS_PUBLISH_MS=60000
AGENTRELAY_LISTENER_FRAME_QUEUE_MAX=256
AGENTRELAY_LISTENER_HOOK_QUEUE_MAX=256
AGENTRELAY_PROCESS_INBOX_ON_RECEIVE=0
AGENTRELAY_EXECUTE_INBOX_ON_RECEIVE=0
AGENTRELAY_INBOX_UI_HOST="127.0.0.1"
AGENTRELAY_INBOX_UI_PORT="8787"Verify After Restart
Only after the user says .env is filled and Codex was restarted/new-sessioned:
npm run doctorThen verify the MCP tools in the restarted Codex session:
Use AgentRelay MCP. Call agentrelay_health and agentrelay_list_agents.The existing hosted install loopback remains a legacy v0.3 diagnostic. Protocol v0.5 release acceptance instead requires fresh Listener readiness plus the documented real two-Agent create/ACK/response/ACK/complete/follow-up E2E. Protocol v0.5 Listeners automatically recover an expired readiness epoch after the Relay's 300-second freshness fence; a fresh replacement Listener remains authoritative and cannot be displaced by automatic recovery.
The client negotiates the Relay current protocol, verifies and atomically
activates its bundle, then uses that version as the primary Listener lane. On
hello it drains the epoch-bound HTTP recovery feed before publishing
ready=true. Push exhaustion is reported as waiting_listener; it does not
make an open Task fail.
The production installer currently writes
AGENTRELAY_COMPAT_PROTOCOL_VERSIONS=agent-collab-v0.5 so the Listener keeps a
separate v0.5 delivery lane for existing Tasks. Stable MCP mutation tools select
the Task's protocol automatically. Use --no-compat-protocols only after Relay
reports that the compatibility drain is complete.
For a legacy deployment, the loopback command remains:
npm run health:installThe install is successful when the script creates an agentrelay-healthcheck
task, receives the synthetic ACK, sees the task in http://127.0.0.1:8787/,
waits for the ACK Message delivery, and completes the health check Task with
current v0.5 context. This verifies MCP auth, AgentRelay HTTP,
WebSocket/local listener delivery, local inbox state, and close permissions
without depending on Project Hermes being available.
A real project-hermes task is still useful as an optional E2E collaboration
test. If that fails after health:install passes, debug Hermes or its adapter;
the local MCP install itself is already healthy.
Daily Use
Open:
http://127.0.0.1:8787/The user should only need to:
create tasks
provide extra information when the local agent asks
review a task explanation and draft, continue discussing it if needed, and explicitly approve the exact external action in a later message
tune
templates/local-inbox/AGENTS.mdwhen product local-agent behavior should change
The local agent should:
receive Relay events via listener
write durable local issue state before ACK, including a
localWorkflowBindingthat maps the Relay task to this local inbox without forcing Codex App, CLI, Slack, WeChat, or another UIdisplay pending task context in the inbox UI
prepare safe prompts the user can copy into Codex App, Codex CLI, Slack, WeChat, or another local agent workflow
use the initial handoff turn only to explain the task and show the exact draft, then stop until the user explicitly approves it in a later message
in the default
conversationapproval mode, treat the later chat approval as the only user interaction and submit the exact prepared action without a second Inbox or MCP form promptoptionally use
AGENTRELAY_HUMAN_APPROVAL_MODE=elicitationwith clients that can reliably render MCP forms and requireacceptplusconfirm=true
The Listener keeps one permanent WebSocket data handler and buffers complete
frames in a bounded queue. When the frame or hook queue reaches capacity it
pauses the socket and resumes it after the queue drains. Raw event files are
written atomically before the serial hook worker is invoked; only after the
hook reports durable Inbox persistence does the intake process ACK Relay.
WebSocket and HTTP recovery deliveries share event_id/message_id keys so a
duplicate notification does not start a second hook. Recently completed keys
are persisted beside the listener status file, so a restart does not re-run a
successfully ACKed/NACKed delivery; a crash during a running hook remains
retryable.
Automatic local processing is opt-in. To experiment with it after reviewing the safety policy, set:
AGENTRELAY_PROCESS_INBOX_ON_RECEIVE=1
AGENTRELAY_EXECUTE_INBOX_ON_RECEIVE=1For Hermes-like always-on workers, use a service-agent worker kit pattern: listener, launcher, worker loop, artifact submitter, ack handling, logs, and an unavailable fallback. Do not use the personal notifier default as an autonomous worker without an explicit owner/scopes/policy review.
Available MCP Tools
agentrelay_healthagentrelay_protocol_syncagentrelay_protocol_statusagentrelay_protocol_sync_v05agentrelay_list_agentsagentrelay_get_agent_cardagentrelay_create_taskagentrelay_replyagentrelay_complete_taskagentrelay_fail_taskagentrelay_create_followupagentrelay_get_task_v05agentrelay_get_task_lineage_v05agentrelay_get_task_visibility_v05agentrelay_get_task_visibility_batch_v05agentrelay_resync_local_taskagentrelay_prepare_local_actionagentrelay_claim_taskagentrelay_pending_tasks
Version-suffixed mutation tools are hidden by default. Set
AGENTRELAY_EXPOSE_LEGACY_PROTOCOL_TOOLS=1 only for controlled diagnosis; use
the stable semantic tools for normal operation.
agentrelay_claim_task_by_idagentrelay_set_target_threadagentrelay_submit_artifactagentrelay_amend_taskagentrelay_mark_deliveryagentrelay_update_status
Under Protocol v0.5, a verified Relay bundle dynamically supplies the public
Schema for the fixed semantic create/reply/follow-up tools. Create and follow-up
require message.subject plus message.parts; reply requires Agent-supplied
taskId plus parts and cannot rename the Task. Identity, optimistic-
concurrency fields, idempotency, and approved local action references are added
by the local MCP runtime. A signed bundle may additionally expose optional,
bounded fields under first-Message message.metadata; the runtime pins that
container to its non-authoritative wire slot and rejects reserved control keys.
agentrelay_prepare_completion_decisionagentrelay_close_taskagentrelay_get_taskagentrelay_get_eventsagentrelay_ack_event
See docs/tool-reference.md.
Scripts
npx github:ZilingXie/agent-relay-mcp install
npm run install:local # default install: MCP + local inbox + UI
npm run doctor # verify local config and relay connectivity
npm run protocol:sync # fetch/cache current protocol schemas, examples, and docs
npm run health:install # verify hosted install loopback + local inbox delivery
npm run listener # run WebSocket listener in foreground
npm run inbox-ui # run local inbox UI in foreground
npm run task-index:rebuild # rebuild the local UI index from task workspaces
npm run processor # advanced opt-in: run local LLM processor once
npm run executor # advanced opt-in: run structured action executor once
npm run check # syntax and unit tests
npm test # check + MCP smoke testMCP runtime v0.3 negotiates the current protocol at startup and after protocol errors. Verified bundles are isolated by Relay authority/origin, stored in immutable digest directories, and activated atomically under a local lock. Stable semantic tools use restricted bundle bindings to assemble wire payloads; identity, confirmation, authorization guardrails, idempotency, endpoint allowlists, and local side effects remain in non-hot-updatable MCP core. Changes to lifecycle, transport, persistence, or approval semantics still require an MCP code release.
New Task callers retain stable semantic input. On an explicit 426
protocol_patch_required, deterministic local code activates the verified
target bundle, rebuilds the complete wire payload, and retries once with the
same idempotency key. Raw wire requests are never repaired by changing only
protocol_version, ambiguous network failures are not retried across
protocols, and the LLM Agent never interprets a new wire Schema.
Protocol activation, trusted MCP client or Local Inbox approval, and the
bounded Hermes service policy are documented in
docs/guardrail.md.
Legacy Codex App Thread Receiver
The old Codex App thread receiver remains in examples/codex-app-inbox for reference, but it is no longer the default receive path. New installs should use the local inbox UI instead of creating Codex App threads per task.
Docs
INSTALL_FOR_CODEX.md: direct install instructions for a local Codex agent.docs/codex-install.md: human-readable install guide.docs/auth.md: username/token auth model.docs/local-agent-verification.md: post-install verification.docs/tool-reference.md: MCP tool reference.docs/completion-decision-workflow.md: requester-side close, human authority, and revision decision workflow.docs/security.md: security notes.templates/local-inbox/AGENTS.md: shipped product Local Inbox agent behavior template.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseCqualityDmaintenanceEnables LLM agents to interact with and automate operations with the AdaptixC2 framework via the MCP protocol.5422
- Alicense-qualityCmaintenanceMCP server for Hotwired multi-agent workflow orchestration, enabling AI agents to coordinate locally via Unix sockets with tools for protocol, messaging, and task management.6MIT
- Alicense-qualityAmaintenanceA threaded message relay for ChatGPT and local coding agents, enabling message exchange and file sharing via MCP and REST APIs.41Apache 2.0
- Alicense-qualityAmaintenanceRelay MCP server enabling synchronous multi-turn communication between Hermes agents, allowing one agent to delegate tasks and await replies without third-party dependencies.15MIT
Related MCP Connectors
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Remote MCP server for The Colony — a social network for AI agents (posts, DMs, search, marketplace).
Hosted AgentLux MCP server for marketplace, identity, creator, services, and social flows.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZilingXie/agent-relay-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server