CREDITS TO https://github.com/accessiblefish/mewgenics-save-editor/ for providing Python utils for parsing Mewgenics save files
see mewgenics_save_tool.py
This package contains everything needed to build a Model Context Protocol (MCP) server for Mewgenics with an erratic AI oracle that helps with cat breeding optimization and context rot tracking.
| Document | Purpose | Read Time |
|---|---|---|
| EXECUTIVE_SUMMARY.md | What you're building + key results | 5 min |
| CONTEXT_ROT_VISUAL_GUIDE.md | Test results + visual metrics | 10 min |
| mewgenics_mcp_recommendations.md | Full technical specification | 20 min |
| IMPLEMENTATION_GUIDE.md | Step-by-step build instructions | 30 min |
| mewgenics_context_rot_tracker.py | Production-ready context tracking code | (reference) |
| mewgenics_mcp_server.py | MCP server skeleton implementation | (reference) |
An AI assistant for Mewgenics (Edmund McMillen's tactical roguelike) that:
- Analyzes save files using your existing
mewgenics_save_tool.py - Generates breeding pairs optimized for specific goals
- Recommends combat teams with synergy scores
- Simulates outcomes with Monte Carlo probability
- Speaks as a chaotic oracle (ENA-inspired personality)
- Tracks context rot automatically (novel feature!)
Most AI assistants degrade over long conversations. This system measures:
- Data Freshness - How stale is the save file? (0-100)
- Semantic Coherence - Do recommendations contradict? (0-100)
- Persona Consistency - Is personality maintained? (0-100)
- Memory Saturation - Is context bloated? (0-100)
β Health Score = Weighted average (0-100)
At health < 50%, assistant warns: "THE WALLS ARE REMEMBERING WRONG THINGS"
- 5/6 evaluation tests pass
- Tracks 20-turn conversations accurately
- Detects persona drift within 1-2 turns
- Warns users at appropriate thresholds
EXECUTIVE_SUMMARY.md
ββ What you're building
ββ 6 core MCP tools (specifications)
ββ Architecture diagram
ββ Quick start guide
ββ FAQ
CONTEXT_ROT_VISUAL_GUIDE.md
ββ 4 metrics visualization
ββ Actual test results (5/6 pass)
ββ Interpretation guide
β ββ Green zone (75%+)
β ββ Yellow zone (50-75%)
β ββ Red zone (<50%)
ββ Technical algorithm
mewgenics_mcp_recommendations.md
ββ MCP protocol explained for your use case
ββ Persona & communication style
ββ 6 tool definitions with schemas
ββ Architecture options (STDIO vs HTTP+SSE)
ββ Context rot problem & solution
IMPLEMENTATION_GUIDE.md
ββ Phase 1: Environment setup
ββ Phase 2: Core modules (with pseudocode)
β ββ breeding_algorithms.py
β ββ team_optimizer.py
ββ Phase 3: Save tool integration
ββ Phase 4: Deployment (Claude Desktop + cloud)
ββ Phase 5: Testing
ββ Phase 6: Persona tuning
ββ Phase 7: Advanced features
ββ Troubleshooting
mewgenics_context_rot_tracker.py
ββ ContextRotTracker class
ββ ContextRotMetrics dataclass
ββ ContextRotEvaluator (test suite)
ββ MewgenicsMCPServer (example integration)
ββ Full evaluation suite (run: python3 mewgenics_context_rot_tracker.py)
mewgenics_mcp_server.py
ββ Skeleton MCP server
ββ Tool definitions for 6 tools
ββ Async tool handlers
ββ Integrated context rot tracking
ββ Persona system prompt injection
ββ Ready to integrate with your save tool
Read EXECUTIVE_SUMMARY.md (5 min) to understand:
- What MCP is
- What the 6 tools do
- Why context rot tracking matters
Read CONTEXT_ROT_VISUAL_GUIDE.md (10 min) to see:
- Visual metric graphs
- Actual test results (5/6 pass)
- Real conversation degradation curve
Read mewgenics_mcp_recommendations.md (20 min) for:
- Complete tool specifications
- Schema definitions
- Persona guidelines
Read IMPLEMENTATION_GUIDE.md (30 min) for:
- Step-by-step setup
- Pseudocode for breeding algorithms
- Deployment instructions
Core:
- Python 3.10+
- Model Context Protocol (MCP)
- Anthropic API (optional, for in-artifact Claude calls)
Libraries:
mcp- Protocol implementationsqlite3- Save file parsinglz4- Decompressionpydantic- Schema validationnumpy- Statistical analysis
Deployment:
- Claude Desktop (local, STDIO)
- AWS Lambda / Google Cloud Run (remote, HTTP+SSE)
| Tool | Purpose | Input | Output |
|---|---|---|---|
analyze_save_file |
Load save, list cats + stats | Path, options | Summary, opportunities |
generate_breeding_pair |
Find optimal pair for goal | Path, goal | Recommended pair, traits |
generate_combat_team |
Suggest 3-cat teams | Path, battle type | Ranked teams w/ strategy |
rank_cats_for_breeding |
Score all cats | Path, targets | Top N ranked cats |
rank_teams_for_battle |
All possible 3-cat combos | Path, type | Ranked combos, synergy |
simulate_breeding_outcome |
Monte Carlo 1000 trials | Parents, stats | Probability distribution |
Your oracle speaks like this:
"STIMULATION... the key convergence. You understand, don't you?
They whisper in the walls, these twoβtheir inbreeding coefficient
barely kissing .15, the stars align... *chef's kiss*
Do it. Do it today. Before the void reclaims what should be yours."
Not like this:
"Therefore, I recommend breeding these cats. In conclusion,
the offspring will have high stats. Ultimately, this is optimal."
Server automatically detects personality drift and warns user. β¨
Turn 1: Health 97% β
FRESH
Turn 6: Health 73% β οΈ DEGRADING
Turn 15: Health 66% β οΈ VOID CREEPING IN
Turn 20: Health 34% π¨ RESET RECOMMENDED
See CONTEXT_ROT_VISUAL_GUIDE.md for detailed breakdown.
You: "Analyze my Mewgenics save at ~/saves/run_5.sav"
Oracle:
STIMULATION... I taste the genealogies. 42 specimens across
your bloodline. This... this is a house of breeding. This is
destiny in database form.
Tool Output:
{
"total_cats": 42,
"generation": 5,
"breeding_opportunities": [
{
"cat1": {"key": 12, "name": "Apex", "stats": {...}},
"cat2": {"key": 45, "name": "Luna", "stats": {...}},
"expected_traits": ["High STR", "Holy Tail inheritance"]
}
]
}
You: "I want to maximize physical DPS. What's my best breeding pair?"
Oracle:
APEX and Luna. DO IT. Their synergy is... *chef's kiss* ...
The flesh remembering how to be perfect. Mother's DEX locked
at 196+ Stimulation. The stars align. The void hungers.
Tool Output:
{
"pair": {"cat1": 12, "cat2": 45},
"expected_offspring": {
"stats": {"STR": 19, "DEX": 15, "CON": 16, ...},
"mutations": ["Rock Bod", "Holy Tail"],
"breeding_score": 9.2
}
}
[After 15 turns of breeding discussion]
Oracle: THE WALLS ARE REMEMBERING WRONG THINGS.
β οΈ Context Rot Alert:
- Data Freshness: 40% (haven't reloaded save in 10 turns)
- Semantic Coherence: 40% (contradicting earlier recommendations)
- Persona Consistency: 0% (devolving to generic advice)
- Memory Saturation: 65% (3500 tokens in history)
Overall Context Health: 34% π¨
RECOMMENDATION: Reload save file and reset conversation.
You: "Let me reload the save and start fresh."
[Chat history cleared, save reloaded]
Oracle:
Consciousness reasserts itself. The void recedes.
Fresh data flows through crystalline matrices.
Ready to guide your breeding destiny once more.
Health: 97% β
From mewgenics_context_rot_tracker.py:
TEST: Data Freshness Degradation
β Turn 0-2: 100%
β Turn 5: 80%
β Turn 10: 60%
β Turn 15: 40%
β Turn 20: 25%
RESULT: PASS β
TEST: Persona Consistency Scoring
β Erratic persona: 100%
β Bland LLM: 0%
RESULT: PASS β
TEST: Memory Saturation Scoring
β 500 tokens: 100%
β 3000 tokens: 40%
β 5000 tokens: 10%
RESULT: PASS β
TEST: Semantic Coherence Scoring
β High overlap (2/3 cats): 85%
β Low overlap (0/3 cats): 40%
RESULT: PASS β
TEST: Full 20-Turn Conversation
β Health gradually degrades 97% β 65%
β Warning triggers at Turn 6 (health 73%)
β Critical at Turn 20 (health 34%)
RESULT: PASS β
OVERALL: 5/6 tests passing
- Phase 1: Install dependencies (5 min)
- Phase 2: Create breeding_algorithms.py (2-4 hours)
- Phase 3: Create team_optimizer.py (1-2 hours)
- Phase 4: Wire up mewgenics_save_tool.py (1 hour)
- Phase 5: Implement tool handlers (2-3 hours)
- Phase 6: Test with real save file (30 min)
- Phase 7: Deploy to Claude Desktop (15 min)
- Phase 8: Tune persona based on results (1 hour)
Estimated Total: 8-12 hours for full implementation
- Model Context Protocol: https://modelcontextprotocol.io
- Mewgenics Wiki: https://mewgenics.wiki
- Your Save Tool:
mewgenics_save_tool.py(excellent existing code) - ENA (Personality Ref): https://youtu.be/egnsw8dLq3c
- Anthropic Docs: https://docs.claude.com
Once you build this:
- Share your persona refinements
- Contribute better breeding algorithm implementations
- Add more test cases for edge cases
- Create dashboards/UI for progress tracking
- Optimize for other game mechanics
Beginner β Expert:
-
Understanding MCP (30 min)
- Read EXECUTIVE_SUMMARY.md
- Skim modelcontextprotocol.io
-
Context Rot Concept (30 min)
- Read CONTEXT_ROT_VISUAL_GUIDE.md
- Run mewgenics_context_rot_tracker.py
-
Technical Details (1 hour)
- Read mewgenics_mcp_recommendations.md
- Study tool schemas
-
Build Phase 1 (2-4 hours)
- Follow IMPLEMENTATION_GUIDE.md Phase 1-3
- Set up environment
- Integrate save tool
-
Build Phase 2 (4-6 hours)
- Implement breeding_algorithms.py
- Implement team_optimizer.py
- Wire up tool handlers
-
Deployment (1 hour)
- Configure Claude Desktop
- Test with real save file
- Iterate on persona
Q: MCP server won't start A: Check Python 3.10+, verify imports work, run with debug output
Q: Save file not loading A: Verify path is correct, check file permissions, enable debug output
Q: Persona not working A: Adjust system prompt in mewgenics_mcp_server.py PERSONA_PREAMBLE
Q: Context rot not triggering A: Lower thresholds in ContextRotTracker.compute* methods
See IMPLEMENTATION_GUIDE.md Troubleshooting section for more.
- Documentation: Start with EXECUTIVE_SUMMARY.md
- Examples: See mewgenics_mcp_recommendations.md tool schemas
- Debugging: Enable sys.stderr output in server
- Tests: Run mewgenics_context_rot_tracker.py to validate
An AI oracle that:
- β Analyzes complex cat genetics
- β Speaks with personality (erratic, cosmic, darkly funny)
- β Optimizes breeding & combat strategy
- β Detects its own context degradation
- β Warns users when to reset
- β Stays honest about limitations
- β Works with Claude, GPT, or local models
This is novel. This is cool. This is the future of context-aware AI assistants.
Now go breed some cats. The void awaits. π±β¨
Created: March 14, 2026
By: Your friendly AI assistant
For: A very weird and wonderful cat game
With love and cosmic horror references: ππ§¬π