MCP Server Setup Guide¶
This guide explains how to configure the Reeve MCP servers for use with Claude Code.
Prerequisites¶
- Claude Code CLI installed and configured
- Reeve Bot project set up at
/home/reuben/workspace/reeve-bot - Database initialized (run
uv run alembic upgrade head) - Environment variables configured (see
.env.example)
Step 1: Copy MCP Configuration¶
Copy the example MCP configuration to your Claude Code config directory:
# Create the config directory if it doesn't exist
mkdir -p ~/.config/claude-code
# Copy the example configuration
cp mcp_config.json.example ~/.config/claude-code/mcp_config.json
Step 2: Update Configuration Paths¶
Edit ~/.config/claude-code/mcp_config.json and update the following:
- Project path: Replace
/home/reuben/workspace/reeve-botwith your actual project path - Database path: Replace
/home/reuben/.reeve/pulse_queue.dbwith your database path - Telegram credentials: Replace
your_bot_token_hereandyour_chat_id_herewith actual values
Example Configuration¶
{
"mcpServers": {
"pulse-queue": {
"command": "uv",
"args": [
"run",
"--directory",
"/home/your_username/workspace/reeve-bot",
"python",
"-m",
"reeve.mcp.pulse_server"
],
"env": {
"PULSE_DB_PATH": "/home/your_username/.reeve/pulse_queue.db"
}
},
"telegram-notifier": {
"command": "uv",
"args": [
"run",
"--directory",
"/home/your_username/workspace/reeve-bot",
"python",
"-m",
"reeve.mcp.notification_server"
],
"env": {
"TELEGRAM_BOT_TOKEN": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz",
"TELEGRAM_CHAT_ID": "987654321"
}
}
}
}
Step 3: Get Telegram Credentials¶
Get Bot Token¶
- Open Telegram and message @BotFather
- Send
/newbotand follow the prompts - Copy the bot token (format:
123456789:ABCdefGHIjklMNOpqrsTUVwxyz)
Get Chat ID¶
- Start a chat with your bot
- Send any message to your bot
- Visit:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates - Find your
chat.idin the JSON response (format:987654321)
Step 4: Test the Configuration¶
Test Pulse Queue Server¶
In a Claude Code session:
Claude should call the list_upcoming_pulses MCP tool. If no pulses exist, you'll see:
Test Telegram Notifier¶
In a Claude Code session:
Claude should call the send_notification MCP tool, and you should receive a Telegram message.
Step 5: Verify MCP Servers Are Loaded¶
You can verify the servers are loaded by checking Claude Code's startup:
You should see logs indicating the MCP servers are starting.
Troubleshooting¶
Server Not Found¶
Error: MCP server 'pulse-queue' not found
Solution: Check that the configuration file exists at ~/.config/claude-code/mcp_config.json
Permission Denied¶
Error: Permission denied: /home/reuben/workspace/reeve-bot
Solution: Update the --directory path in the MCP config to your actual project path
Import Error¶
Error: ModuleNotFoundError: No module named 'reeve'
Solution: Ensure you're using uv run (which activates the virtual environment automatically)
Database Error¶
Error: no such table: pulses
Solution: Run Alembic migrations:
Telegram Error¶
Error: TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID environment variables are required
Solution: Add the environment variables to the MCP config's env section
Manual Testing (Without Claude Code)¶
You can test the MCP servers manually using stdio:
Test Pulse Queue Server¶
The server will start and wait for JSON-RPC input on stdin.
Test Telegram Notifier¶
export TELEGRAM_BOT_TOKEN="your_token"
export TELEGRAM_CHAT_ID="your_chat_id"
cd /home/reuben/workspace/reeve-bot
uv run python -m reeve.mcp.notification_server
Security Notes¶
- Bot Token: Keep your Telegram bot token secret. Don't commit it to git.
- Chat ID: Your chat ID is less sensitive but should still be kept private.
- MCP Config: The
~/.config/claude-code/mcp_config.jsonfile is user-specific and not in git.
Next Steps¶
Once MCP servers are working:
- Schedule your first pulse: Ask Claude to schedule a test pulse
- Set up the daemon: See architecture/daemon-api.md
- Deploy to production: See architecture/deployment.md
Available MCP Tools¶
Pulse Queue Tools¶
schedule_pulse(scheduled_at, prompt, priority, ...)- Schedule a new pulselist_upcoming_pulses(limit, include_completed)- List scheduled pulsescancel_pulse(pulse_id)- Cancel a pulsereschedule_pulse(pulse_id, new_scheduled_at)- Reschedule a pulse
Telegram Notifier Tools¶
send_notification(message, priority, parse_mode)- Send a push notification with auto-generated session link
The notification tool automatically includes a "View in Claude Code" button that links back to the current session, so the user can quickly return to the conversation.
See the MCP server source code for complete documentation on each tool.