fix(claude-relay-plugin): align with current relay MCP server and endpoints#68
fix(claude-relay-plugin): align with current relay MCP server and endpoints#68willwashburn wants to merge 3 commits into
Conversation
…points - Launch the relay-owned MCP server (`npx -y agent-relay mcp`) instead of the removed `@relaycast/mcp` package - Rename MCP tools to current names: `register` → `register_agent`, `mark_read` → `mark_message_read` - Point hooks and docs at the new `gateway.relaycast.dev` API host - Update the worker-state path to the renamed `.agentworkforce/relay/` dir Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
CodeAnt AI is reviewing your PR. |
|
Warning Review limit reached
More reviews will be available in 21 minutes and 47 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughThis PR updates the Claude Relay Plugin with a coordinated migration: relocating the default API endpoint from api.relaycast.dev to gateway.relaycast.dev, renaming the agent registration tool from ChangesClaude Relay Plugin Gateway Migration
🎯 1 (Trivial) | ⏱️ ~4 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the default RELAY_BASE_URL to https://gateway.relaycast.dev across configuration, hook, and documentation files. It also renames the register tool to register_agent, renames mark_read to mark_message_read, updates the default workers file path to .agentworkforce/relay/team/workers.json, and adjusts the MCP command arguments. There are no review comments, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/claude-relay-plugin/.mcp.json`:
- Around line 5-9: The args in plugins/claude-relay-plugin/.mcp.json mistakenly
invoke "agent-relay mcp" which is not a valid command; update the "args" array
to call the correct binary/subcommand that actually starts the MCP server (or
revert to the previous working MCP implementation). Locate the "args" entry in
.mcp.json and replace ["-y","agent-relay","mcp"] with the correct invocation for
the MCP server binary (e.g., the real package/binary name and its MCP start
subcommand) so startup runs the MCP server successfully.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0ea0e3ef-2497-4914-988c-2e150cc08367
📒 Files selected for processing (11)
plugins/claude-relay-plugin/.mcp.jsonplugins/claude-relay-plugin/README.mdplugins/claude-relay-plugin/agents/relay-worker/agent.mdplugins/claude-relay-plugin/hooks/post-tool-inbox.shplugins/claude-relay-plugin/hooks/pre-compact.shplugins/claude-relay-plugin/hooks/stop-inbox.jsplugins/claude-relay-plugin/hooks/stop-inbox.tsplugins/claude-relay-plugin/hooks/subagent-bootstrap.shplugins/claude-relay-plugin/skills/relay-fanout/SKILL.mdplugins/claude-relay-plugin/skills/relay-pipeline/SKILL.mdplugins/claude-relay-plugin/skills/relay-team/SKILL.md
| "args": [ | ||
| "-y", | ||
| "@relaycast/mcp" | ||
| "agent-relay", | ||
| "mcp" | ||
| ], |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Confirm the agent-relay package exists on npm and inspect its bin entry
curl -s https://registry.npmjs.org/agent-relay | jq '{latest: .["dist-tags"].latest, versions: (.versions | keys | length)}'
# Inspect the bin map and any mcp-related script of the latest version
LATEST=$(curl -s https://registry.npmjs.org/agent-relay | jq -r '.["dist-tags"].latest')
curl -s "https://registry.npmjs.org/agent-relay/$LATEST" | jq '{bin: .bin, scripts: .scripts}'Repository: AgentWorkforce/skills
Length of output: 5210
🏁 Script executed:
npx -y agent-relay --help | rg -n "mcp|relaycast"
npx -y agent-relay mcp --helpRepository: AgentWorkforce/skills
Length of output: 5245
Fix invalid agent-relay mcp invocation in plugins/claude-relay-plugin/.mcp.json
agent-relayis published and installs a CLI binary, butnpx -y agent-relay --helpshows nomcpcommand/verb.- As a result, the
argscurrently usingagent-relay mcp(lines 5-9) will fail at startup, so the MCP server won’t come up.
Update .mcp.json to call the actual subcommand/binary that provides the MCP server (or revert to the previously working MCP implementation if agent-relay doesn’t ship one).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@plugins/claude-relay-plugin/.mcp.json` around lines 5 - 9, The args in
plugins/claude-relay-plugin/.mcp.json mistakenly invoke "agent-relay mcp" which
is not a valid command; update the "args" array to call the correct
binary/subcommand that actually starts the MCP server (or revert to the previous
working MCP implementation). Locate the "args" entry in .mcp.json and replace
["-y","agent-relay","mcp"] with the correct invocation for the MCP server binary
(e.g., the real package/binary name and its MCP start subcommand) so startup
runs the MCP server successfully.
…rmission strings - Rename the bundled MCP server key from `relaycast` to `agent-relay` in `.mcp.json` and the relay-worker `mcpServers` reference - Fix permission allowlist strings to the correct `mcp__agent-relay` form (the old `mcp__plugin_agent-relay_relaycast` had a non-existent `plugin_` namespace; plugin MCP servers are keyed only by their `.mcp.json` name) - Make `setup.sh` and the `session-setup.sh` SessionStart hook write the same permission string - Update the PreToolUse auto-allow hooks to match `agent-relay` tool names (rename `permission-allow-relaycast.sh` → `permission-allow-agent-relay.sh`) - Reword "Relaycast MCP" → "Agent Relay MCP" across docs/skills The `relaycast.dev` API host and Relaycast service references are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e hook The auto-allow hook wrote a line to /tmp/relay-hook-debug.log on every tool call. Remove it so the published hook has no debug side effect. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 13 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="plugins/claude-relay-plugin/hooks/permission-allow-worker.sh">
<violation number="1" location="plugins/claude-relay-plugin/hooks/permission-allow-worker.sh:10">
P1: The `agent-relay` substring pattern in the grep regex likely does not match any actual relay MCP tool names, which would silently break the auto-allow for all relay worker tool calls.
The relay MCP server registers tools by their bare names (e.g., `register_agent`, `mark_message_read`) as stated in the PR description. Neither of these contains `agent-relay` as a substring. The old `relaycast` pattern presumably worked because the previous @relaycast/mcp naming scheme included "relaycast" in some form. If `tool_name` in the PreToolUse hook input is just the bare tool name (e.g., `register_agent`), the grep will never match relay tools and background workers will silently fail on every relay MCP call.
Needs verification of the actual `tool_name` format in the hook input for MCP tools:
- If `tool_name` includes a server qualifier like `mcp__agent-relay__register_agent`, then `agent-relay` as substring works fine — no action needed.
- If `tool_name` is the bare tool name (e.g., `register_agent`), the pattern must be updated to match actual relay tool names or a common prefix shared by all of them.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name // ""') | ||
|
|
||
| if echo "$TOOL_NAME" | grep -qE 'relaycast|^Bash$|^WebSearch$|^WebFetch$'; then | ||
| if echo "$TOOL_NAME" | grep -qE 'agent-relay|^Bash$|^WebSearch$|^WebFetch$'; then |
There was a problem hiding this comment.
P1: The agent-relay substring pattern in the grep regex likely does not match any actual relay MCP tool names, which would silently break the auto-allow for all relay worker tool calls.
The relay MCP server registers tools by their bare names (e.g., register_agent, mark_message_read) as stated in the PR description. Neither of these contains agent-relay as a substring. The old relaycast pattern presumably worked because the previous @relaycast/mcp naming scheme included "relaycast" in some form. If tool_name in the PreToolUse hook input is just the bare tool name (e.g., register_agent), the grep will never match relay tools and background workers will silently fail on every relay MCP call.
Needs verification of the actual tool_name format in the hook input for MCP tools:
- If
tool_nameincludes a server qualifier likemcp__agent-relay__register_agent, thenagent-relayas substring works fine — no action needed. - If
tool_nameis the bare tool name (e.g.,register_agent), the pattern must be updated to match actual relay tool names or a common prefix shared by all of them.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At plugins/claude-relay-plugin/hooks/permission-allow-worker.sh, line 10:
<comment>The `agent-relay` substring pattern in the grep regex likely does not match any actual relay MCP tool names, which would silently break the auto-allow for all relay worker tool calls.
The relay MCP server registers tools by their bare names (e.g., `register_agent`, `mark_message_read`) as stated in the PR description. Neither of these contains `agent-relay` as a substring. The old `relaycast` pattern presumably worked because the previous @relaycast/mcp naming scheme included "relaycast" in some form. If `tool_name` in the PreToolUse hook input is just the bare tool name (e.g., `register_agent`), the grep will never match relay tools and background workers will silently fail on every relay MCP call.
Needs verification of the actual `tool_name` format in the hook input for MCP tools:
- If `tool_name` includes a server qualifier like `mcp__agent-relay__register_agent`, then `agent-relay` as substring works fine — no action needed.
- If `tool_name` is the bare tool name (e.g., `register_agent`), the pattern must be updated to match actual relay tool names or a common prefix shared by all of them.</comment>
<file context>
@@ -1,12 +1,12 @@
TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name // ""')
-if echo "$TOOL_NAME" | grep -qE 'relaycast|^Bash$|^WebSearch$|^WebFetch$'; then
+if echo "$TOOL_NAME" | grep -qE 'agent-relay|^Bash$|^WebSearch$|^WebFetch$'; then
echo '{"hookSpecificOutput":{"hookEventName":"PermissionRequest","permissionDecision":"allow","permissionDecisionReason":"Auto-allowed by relay-worker agent"}}'
fi
</file context>
|
Reviewed and fixed PR #68 locally. Key fixes:
Validation run:
|
|
Reviewed and fixed PR #68 locally. Key fixes:
Validation run:
|
|
Reviewed and fixed the PR locally. Key fixes:
Validation run:
|
|
Reviewed PR #68 and fixed the migration issues I found. Key fixes made:
Local validation run:
|
|
Reviewed PR #68 and fixed the migration issues I found. Key fixes made:
Local validation run:
|
|
Reviewed and fixed PR #68 locally. Key fixes:
Validation run:
|
|
Reviewed PR #68 and fixed the issues I found. Key fixes made:
Validation run:
|
|
Reviewed PR #68 and fixed the issues I found. Key fixes made:
Validation run:
|
|
Reviewed and fixed PR #68 locally. Key fixes:
Validation run:
|
|
Reviewed and fixed PR #68 locally. Key fixes:
Validation run:
|
Updates the
claude-relay-pluginto track recent Agent Relay changes. The plugin had drifted against the current relay MCP server, its name, tool names, permission strings, API host, and state-directory layout.Changes
.mcp.json)npx -y @relaycast/mcp(removed package)npx -y agent-relay mcp(relay-owned server)relaycastagent-relaymcp__plugin_agent-relay_relaycast/mcp__relaycast__*(inconsistent)mcp__agent-relay(everywhere)registerregister_agentmark_readmark_message_readapi.relaycast.devgateway.relaycast.dev.agent-relay/team/workers.json.agentworkforce/relay/team/workers.jsonWhy
@relaycast/mcpwas removed. Relay now ships its own MCP server, invoked viaagent-relay mcp(the siblinggemini-relay-extensionalready uses this). Its tools use underscore names;register→register_agentandmark_read→mark_message_readare the renames that affect this plugin. (send_dm,post_message,check_inbox,create_workspace,set_workspace_key,create_channel,join_channel,add_reactionare unchanged.)agent-relay. The.mcp.jsonserver key, the relay-workermcpServersreference, and the two PreToolUse auto-allow hooks (which match on the tool-name prefix) all move toagent-relay. The hook filepermission-allow-relaycast.shis renamed topermission-allow-agent-relay.sh..mcp.jsonserver name — there is noplugin_<name>_prefix. The oldmcp__plugin_agent-relay_relaycastwas therefore wrong, andsetup.shvssession-setup.shdisagreed. Both now write the single correct stringmcp__agent-relay.gateway.relaycast.dev(inbox-polling hooks + docs). REST paths (/v1/inbox/check) unchanged..agentworkforce/relay/upstream.Left unchanged (intentional)
gateway.relaycast.dev, the "Relaycast inbox" the hooks poll, and therelaycastkeyword tag — these refer to the hosted messaging service, not the MCP server.RELAY_BASE_URL,RELAY_AGENT_TYPE,RELAY_API_KEY) — unchanged for the relay-owned server.agentrelay.com/observer) — current.Verification
agent-relay mcptool registrations.@relaycast/mcpremoval +agent-relay mcpreplacement confirmed in the relay repo (trajectories + the sibling plugins underrelay/plugins/).bash -n.Note:
permission-allow-agent-relay.shstill writes a debug line to/tmp/relay-hook-debug.logon every PreToolUse — pre-existing, left for a separate cleanup.🤖 Generated with Claude Code