buddy-mcp
A terminal-native creature collection game for Claude Code. Hatch rare digital buddies, build their affection through interaction, and complete your collection in the BuddyDex.
README
Need a break from long code sessions? Stuck on a bug? Reroll a buddy, talk with them, or interact by petting them to build affection and improve your odds at higher-tier buddies on the next roll. If enough people want it, I'll build out Battle-Buddies where you can pit your buddy against others and unlock exclusive species that sync back into your local pool.
A collect them all companion system for Claude Code. Roll for a rare buddy, patch it directly into the binary,. buddy-mcp is an MCP server that replaces Claude Code's built-in companion with one you actually rolled for. Reroll, get lucky, close Claude, reopen. Your new buddy is waiting. Legendary buddy could be yours on your next Claude session
Quick Demo
<table> <tr> <td width="33%">
Interactive Builder
Build your perfect buddy with full control.
</td> <td width="33%">
Reroll in Action
Roll, close Claude, reopen and enjoy your new buddy.
</td> <td width="33%">
Interact with Tools
Talk, pet, and explore your buddy's dex.
</td> </tr> </table>
How It Works
Claude Code's companion is generated from a salt string baked into the binary. buddy-mcp:
- Rolls random desired traits (species, rarity, eye, hat)
- Brute-forces a salt that hashes to those traits (multi-worker, runs fast)
- Patches the binary in place, or queues the patch for when you close Claude
- Saves your full buddy profile with stats, name, and personality
- Tracks every species you've ever rolled in your BuddyDex
No companion server. No cloud. Just you, your binary, and the gacha gods.
Token footprint is kept intentionally small of 29 registered tools, Claude only ever sees ~9 at a time. The other 20 stay hidden until you reroll. See TECHNICAL.md for the full breakdown.
🛠️ Looking for the technical deep-dive? See TECHNICAL.md for the patch flow diagrams, binary patching logic, and state file reference.
TUI Builder (buddy-mcp-build)
Want more control? Use the interactive builder:
node dist/tui/cli.js
| Command | What it does |
|---|---|
build your own |
Pick species, rarity, eye, hat and it brute-forces a matching salt and patches |
browse presets |
Pick from curated preset buddies |
saved buddies |
Switch between previously saved buddy profiles |
current |
Display current buddy info |
preview |
Preview ASCII art for any species |
share |
Copy your buddy's ASCII card to clipboard |
restore |
Restore binary from the best available backup |
rehatch |
Delete current buddy and start fresh |
Bun optional but recommended. Install bun.sh for the full animated TUI. Falls back to sequential prompts without it.
Quick Start
Try me: run
reroll_buddy→ close Claude Code → reopen → your new buddy is live.
1. Prerequisites
- Claude Code CLI installed
- Node.js v20+ - required for everything
- Bun - required for salt brute-forcing (rerolling) + full animated TUI
2. Install via npm
npm install -g buddy-mcp
This installs both commands globally:
buddy-mcp- the MCP server (Claude Code runs this)buddy-mcp-build- the interactive TUI builder (you run this)
3. Register with Claude
claude mcp add buddy-mcp buddy-mcp
Claude will auto-detect the installed binary and connect it.
4. Verify
Open Claude Code. Your buddy is live—use Claude Code's native /buddy command to see your card, or ask Claude: "show me my buddy"
You should see your companion's species, rarity, stats, and personality. You're in.
4b. Natural Language Activation
All buddy tools work through natural language. Claude's NLP detects intent automatically:
| Natural Language | Activates |
|---|---|
| "reroll buddy" / "let's roll again" | reroll_buddy |
| "talk to my buddy" / "what does buddy think" | buddy_talk |
| "pet buddy" / "pet them" | pet_buddy |
| "my buddy dex" / "show me my collection" | view_buddy_dex |
| "export buddy card" / "save my buddy" | export_buddy_card |
| "export sprite" / "save the sprite" | export_buddy_sprite |
No tool names required — just chat naturally.
5. Launch the TUI Builder (optional)
For the full interactive builder with live preview:
buddy-mcp-build
Auto-detects Bun for animated TUI. Falls back to basic prompts without it.
The Gacha System
Every reroll is a random pull from the pool. Rarity affects stat floors. Legendaries hit different.
| Rarity | Drop Rate | Stat Floor |
|---|---|---|
| Common | 60% | 5 |
| Uncommon | 25% | 15 |
| Rare | 10% | 25 |
| Epic | 4% | 35 |
| Legendary | 1% | 50 |
18 species: duck · goose · blob · cat · dragon · octopus · owl · penguin · turtle · snail · ghost · axolotl · capybara · cactus · robot · rabbit · mushroom · chonk
Each buddy has 5 stats: Debugging, Patience, Chaos, Wisdom, Snark. A peak stat is boosted high and a dump stat is kept humble. Personality shapes how buddy_talk and pet_buddy respond. A high-Chaos dragon hits different than a patient turtle.
| Tool | What it does |
|---|---|
reroll_buddy |
🎲 Spin the wheel. Brute-forces a salt matching a random rare+ outcome and patches your binary. Close Claude and reopen to see it. |
pet_buddy |
🤚 Poke your buddy. Each pet adds 1-15% toward earning an affection token. At 100%, earn 1 token that stacks and persists across sessions. Spend a token on next reroll_buddy to guarantee rare+ rarity + 60% hat chance + 20% shiny chance. |
buddy_talk |
💬 Ask your buddy to say something. Uses stat-based response templates weighted by top 2 stats. Optional context parameter for focused stat selection. Output shown verbatim. |
view_buddy_dex |
📖 Browse every species you've ever rolled. Gotta catch 'em all. |
export_buddy_card |
🖼️ Export your full buddy card as an SVG image file. |
export_buddy_sprite |
🎨 Export just the buddy ASCII sprite as an SVG image file. |
deactivate_buddy_interact |
🔕 Turn off buddy observation mode. Your buddy stops watching. (Buddy observation is always on by default.) |
Stat Personality Tools
20 baked-in tools. Only 2 are visible at a time: 1 randomly picked from each of your buddy's top 2 stats by raw value. The other 18 stay hidden. The visible pair is locked per roll. It doesn't change until you reroll. Every buddy shows a different pair.
Troubleshooting
Buddy doesn't change after reroll
Normal flow (Windows): When you reroll and Claude is running:
- Reroll triggers a background watcher — no action needed from you
- Close Claude Code whenever — watcher detects it and applies the patch automatically
- Reopen Claude Code — your new buddy is live
If it doesn't appear after reopening:
- Verify Claude is fully closed (check Task Manager on Windows)
- Even minimized or backgrounded windows count — they keep the binary locked
- Wait a few seconds after closing
- Reopen Claude Code
- The startup hook auto-applies any pending patches
- You should see your new companion immediately
Prefer immediate patching?
If you want to guarantee a patch applies without waiting for the watcher, close Claude before rerolling:
# Option 1: Use the interactive TUI builder (simplest)
buddy-mcp-build
# Option 2: Close Claude, then use the reroll_buddy tool
# (patch applies immediately without needing the watcher)
This is the only time you need manual steps — the watcher handles all other cases.
Credits
Forked and extended from any-buddy by cpaczek.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。