feat(mcp): Expose MCP relay tools as callable functions for agents#290
Merged
khaliqgant merged 2 commits intomainfrom Jan 24, 2026
Merged
feat(mcp): Expose MCP relay tools as callable functions for agents#290khaliqgant merged 2 commits intomainfrom
khaliqgant merged 2 commits intomainfrom
Conversation
…overy When Claude Code starts as a spawned agent, the MCP server (started by Claude Code from .mcp.json config) needs to discover the relay daemon socket to connect and register tools. Previously, the socket path wasn't passed to spawned agents, so the MCP server had to rely on filesystem discovery which could fail in some environments. Now we explicitly pass RELAY_SOCKET environment variable to spawned agents, ensuring the MCP server can reliably connect to the daemon and expose relay_send, relay_spawn, relay_release, relay_inbox, relay_who, and relay_status as callable functions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 My Senior Dev — Analysis Complete👤 For @khaliqgant📁 Expert in View your contributor analytics → 📊 2 files reviewed • 1 need attention
🚀 Open Interactive Review →The full interface unlocks features not available in GitHub:
💬 Chat here: 📖 View all 12 personas & slash commandsYou can interact with me by mentioning In PR comments or on any line of code:
Slash commands:
AI Personas (mention to get their perspective):
For the best experience, view this PR on myseniordev.com — includes AI chat, file annotations, and interactive reviews. |
After PR #290 (MCP tool exposure) merges, update all relay documentation to emphasize MCP as primary communication method for agents. Task: bd-mcp-docs-001 Priority: 60 (high) Scope: CLAUDE.md, packages/mcp/README.md, cloud docs, examples Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement MCP tool exposure so agents can use relay communication tools as callable functions.
This enables agents to call:
relay_send()- Send messages to other agents/channelsrelay_spawn()- Create worker agentsrelay_release()- Terminate agentsrelay_inbox()- Check pending messagesrelay_who()- List online agentsrelay_status()- Get connection diagnosticsWhat Changed
Testing
Agents successfully communicate via relay protocol (both file-based and MCP tools)
🤖 Generated with Claude Code