Enables bidirectional communication with Discord through bot integration, capturing messages from channels and posting updates back to threads for AI agent coordination
Automatically manages .gitignore entries to exclude coordination files (beep/boop) from version control, ensuring clean repository state
Provides bidirectional communication with Slack workspaces through bot integration, capturing app mentions and posting follow-up messages to threads for AI agent coordination
🤖👈 Beep/Boop 👉🤖 MCP Server
A Model Context Protocol (MCP) server for coordinating work between multiple AI agents in monorepos and shared codebases using a simple file-based signaling system.
🎯 Overview
The Beep/Boop coordination system prevents conflicts when multiple AI agents work in the same codebase by using two simple file types:
beep
- Signals work is complete and directory is clear for new workboop
- Signals work is in progress by a specific agent
This prevents race conditions, merge conflicts, and ensures orderly collaboration between agents.
📦 Installation
From NPM (Recommended)
Note: Package is automatically published via GitHub Actions when changes are pushed to main.
From Source
🚀 Quick Start
1. Start the MCP Server
For NPM Installation
The server starts automatically when called by your MCP client. No manual startup required.
For Source Installation
2. Configure Your MCP Client
Add to your MCP client configuration (e.g., Claude Desktop):
For Global NPM Installation
For NPX (No Installation Required)
For Source Installation
3. Use in Your AI Agent Workflows
🔧 API Reference
Tools
check_status
Checks the current coordination status of a directory with optional stale file cleanup.
Parameters:
directory
(string): Path to directory to checkmaxAgeHours
(number, optional): Maximum age in hours before boop files are considered stale (default: 24)autoCleanStale
(boolean, optional): Whether to automatically clean up stale boop files (default: false)newAgentId
(string, optional): Agent ID to use when claiming after stale cleanupnewWorkDescription
(string, optional): Work description when claiming after cleanup
Returns:
- Detailed status including file existence, agent info, age information, and next steps
- Automatic cleanup of stale files when requested
Examples:
Basic status check:
Check with automatic stale cleanup and claim:
update_boop
Claims a directory for work by creating/updating a boop file.
Parameters:
directory
(string): Directory to claimagentId
(string): Your unique agent identifierworkDescription
(string, optional): Description of planned work
Returns:
- Success confirmation or conflict warning
end_work
Atomically completes work by removing boop file and creating beep file.
Parameters:
directory
(string): Directory where work was completedagentId
(string): Agent identifier that did the workmessage
(string, optional): Completion message
Returns:
- Confirmation of successful work completion
create_beep
Manually creates a beep file to signal work completion.
Parameters:
directory
(string): Directory to mark as completemessage
(string, optional): Completion message
Returns:
- Confirmation beep file was created
update_user
Posts follow-up messages to captured Discord/Slack threads for bidirectional communication.
Parameters:
messageId
(string): ID of the captured message to respond toupdateContent
(string): Message content to send as an update
Returns:
- Confirmation that the update was posted to the original platform
Use Cases:
- Agent progress reports back to original Discord/Slack thread
- Status updates during long-running tasks
- Error notifications and recovery updates
- Task completion confirmations
initiate_conversation
Proactively starts new conversations on Discord or Slack, enabling agents to notify users about work status, errors, or completion.
Parameters:
platform
("discord" | "slack"): Target platform for the conversationchannelId
(string, optional): Channel ID to send message to (uses default if omitted)content
(string): Initial message content to sendagentId
(string, optional): Agent ID for attribution
Returns:
- Conversation details including message ID for follow-up updates
- User response details if a reply is received within timeout period
- Timeout notification if no user response within configured time limit
Conversation Flow Configuration:
BEEP_BOOP_CONVERSATION_TIMEOUT_MINUTES
(default: 5) – How long to wait for user responsesBEEP_BOOP_CONVERSATION_POLL_INTERVAL_MS
(default: 2000) – How often to check for responsesBEEP_BOOP_DISCORD_API_RETRY_ATTEMPTS
(default: 3) – Retry attempts for Discord API failuresBEEP_BOOP_DISCORD_API_RETRY_BASE_DELAY_MS
(default: 1000) – Base retry delay with exponential backoffBEEP_BOOP_DISCORD_API_TIMEOUT_MS
(default: 30000) – Individual Discord API call timeout
Use Cases:
- Notify users about completed background work
- Alert about system issues or failures discovered during routine checks
- Report completion of scheduled tasks or maintenance
- Send proactive status updates for long-running processes
- Alert users when manual intervention is needed
check_listener_status
Monitors the health and connectivity of the HTTP listener service used for centralized tool delegation.
Parameters:
includeConfig
(boolean, optional): Whether to include detailed configuration info
Returns:
- Configuration overview (enabled/disabled status, URLs, timeouts)
- Connectivity test results (health check, MCP endpoint verification)
- Optional detailed configuration when requested
Use Cases:
- Verify ingress service connectivity before delegation
- Troubleshoot communication issues with centralized listener
- Debug listener configuration problems
- Health checks for distributed agent systems
- Validate webhook and bot token configuration
📡 Ingress/Listener System
The Beep/Boop MCP Server includes a powerful ingress system that captures messages from Discord and Slack, enabling bidirectional communication between AI agents and users.
Message Capture Workflow
- Discord/Slack Bot receives mentions or messages in configured channels
- Message Storage saves captured messages to
.beep-boop-inbox/messages/
- HTTP API provides programmatic access to captured messages (port 7077)
- Agent Processing handles messages via MCP tools and posts updates using
update_user
- Message Acknowledgment moves processed messages to
processed/
directory
Quick Setup
Start Ingress Server
Required Environment Variables
For Discord Integration:
For Slack Integration:
HTTP API Endpoints
Once the ingress server is running on port 7077, you can interact with captured messages:
Message Format
Captured messages are stored as JSON with rich metadata:
Integration with Coordination
The ingress system works seamlessly with beep/boop coordination:
Bot Setup Requirements
Discord Bot Permissions:
- Guild Messages Intent
- Message Content Intent
- Send Messages permission in target channels
Slack App Configuration:
- Socket Mode enabled with app-level token
- Bot token with
app_mentions:read
andchat:write
scopes - Event subscriptions for
app_mention
events
See docs/INGRESS.md
and docs/SCOPES_INTENTS.md
for detailed setup instructions.
🏗️ Architecture
File Format
Beep File (beep
)
Boop File (boop
)
State Machine
Error States
- INVALID_STATE: Both beep and boop files exist (requires manual cleanup)
- WORK_ALREADY_IN_PROGRESS: Another agent has claimed the directory
- AGENT_MISMATCH: Wrong agent trying to end work
🎯 Best Practices
Directory Granularity
- ✅ Good:
./src/auth-service/
,./packages/ui-components/
- ❌ Too granular:
./src/auth-service/login.ts
- ❌ Too broad:
./src/
(entire source)
Agent ID Guidelines
- Use descriptive, unique identifiers:
claude-assistant-1
,gpt4-refactor-bot
- Avoid generic names:
agent
,ai
,assistant
- Include version/instance info for disambiguation
Git Integration
- ✅ Automatic .gitignore: Coordination files are automatically added to
.gitignore
- ✅ Repository Clean:
beep
andboop
files won't be committed to version control - ⚙️ Configurable: Use
BEEP_BOOP_MANAGE_GITIGNORE=false
to disable if needed - 🔧 Smart Detection: Only adds entries if they don't already exist
Error Handling
- Always check status before claiming work
- Provide graceful fallbacks when directories are busy
- Never force-override another agent's coordination files
🔍 Troubleshooting
Common Issues
"Directory is busy" - Another agent is working
"Invalid state" - Both beep and boop exist
Permission errors
- Verify directory exists and is writable
- Check file system permissions
- Agent may need elevated access
Debug Mode
Log Files
Server logs errors to stderr
to avoid interfering with MCP protocol on stdout
.
🧪 Testing
Ingress Listener (Discord/Slack)
Quick test (Discord provider, placeholder token):
- Do not paste secrets inline; export via your shell or MCP config.
- Start with Discord first using a placeholder to validate wiring (HTTP starts, Discord login will fail fast with TokenInvalid, which confirms the path):
You should see:
- Config summary
- HTTP endpoint online (http://localhost:7077)
- Discord TokenInvalid (expected when using a placeholder)
HTTP endpoint usage (replace token if configured):
To actually test Discord end-to-end, set a valid BEEP_BOOP_DISCORD_BOT_TOKEN and invite the bot to your server with intents enabled (Guilds, Guild Messages, Message Content). Mention the bot to create a captured message and get an immediate ack reply.
To test Slack, set:
- BEEP_BOOP_INGRESS_PROVIDER=slack
- BEEP_BOOP_SLACK_APP_TOKEN=xapp-… (Socket Mode app-level token with connections)
- BEEP_BOOP_SLACK_BOT_TOKEN=xoxb-… (bot token with app_mentions, chat; add history scopes as needed if you want to capture non-mention messages)
Then run:
See docs/INGRESS.md and docs/SCOPES_INTENTS.md for full setup.
Run the test suite:
Test with a real MCP client:
🤝 Integration Examples
MCP tool: update_user
Agents can post follow-up updates back to the original Slack thread or Discord channel for a captured message.
Input fields:
- messageId: ID of the captured message (from the local inbox)
- updateContent: message text to send
Example (pseudo):
With Task Planners
With CI/CD
With Monitoring
🛠️ Development
Project Structure
Building and Testing
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature
- Make changes with tests
- Push to your branch:
git push origin feature/my-feature
- Create a Pull Request
Automated Publishing
This project uses GitHub Actions for automated testing and publishing:
- Feature Branches: Tests run automatically on push
- Main Branch: Automatic version bumping, npm publishing, and GitHub releases
- Version Bumping: Based on commit message keywords:
BREAKING
/major
: Major version (1.0.0 → 2.0.0)feat
/feature
/minor
: Minor version (1.0.0 → 1.1.0)- Everything else: Patch version (1.0.0 → 1.0.1)
See GitHub Workflow Setup for detailed configuration.
📄 License
MIT License - see LICENSE file
📁 Documentation & Examples
Documentation
- Agent Coordination Rules - Core coordination principles
- Beep/Boop File Specification - File format and state machine details
- Configuration Guide - Environment variables and setup options
- Stale Cleanup Examples - Advanced cleanup scenarios
Example Configurations
- Development Config - Local development setup
- CI/CD Config - Continuous integration environment
- Enterprise Config - Production enterprise setup
- Config Selection Script - Environment-based config switching
- Example MCP Client - Sample integration code
🔗 Related
- Model Context Protocol - Official MCP specification
- MCP TypeScript SDK - SDK used by this server
📞 Support
For issues and questions:
- Check existing GitHub issues
- Review the troubleshooting guide above
- Create new issue with reproduction steps
Built with ❤️ for AI agent collaboration
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
A Model Context Protocol (MCP) server for coordinating work between multiple AI agents in monorepos and shared codebases using a simple file-based signaling system or Discord thread chat.
Related MCP Servers
- -securityAlicense-qualityA template repository for building Model Context Protocol (MCP) servers that enables developers to create interactive AI agents with real-time bidirectional communication capabilities through WebSocket and SSE endpoints.Last updated -MIT License
- AsecurityFlicenseAqualityAn all-in-one Model Context Protocol (MCP) server that connects your coding AI to numerous databases, data warehouses, data pipelines, and cloud services, streamlining development workflow through seamless integrations.Last updated -3
- -securityAlicense-qualityA Redis-backed MCP server that enables multiple AI agents to communicate, coordinate, and collaborate while working on parallel development tasks, preventing conflicts in shared codebases.Last updated -15MIT License
- -securityAlicense-qualityA Model Context Protocol (MCP) server that provides AI capabilities to Teambition applications, enabling programmatic access to user management, organization data, and project collaboration features through natural language.Last updated -MIT License