Katamari MCP Server
An adaptive MCP (Model Context Protocol) server with ACP (Agent Control Protocol) that grows and evolves based on user needs through adaptive learning.
Features
Core Architecture
Intelligent Routing: Tiny LLM model for efficient call routing
Modular Capabilities: Plugin-based architecture with environment isolation
Hot Reload: Development-friendly reload after test completion
Security: Sandboxed execution and package validation
Asset Tracking: Complete provenance tracking for all components
ACP Self-Modification (Phase 1)
Self-Inspection: Analyze current capabilities and system state
Capability Generation: Create new capabilities based on needs
Workflow Composition: Combine capabilities into workflows
Self-Healing: Detect and fix system issues
Heuristic Governance: 7-tag safety system for all operations
Adaptive Learning (Phase 2) โจ NEW
Dynamic Heuristics: Self-adjusting decision making based on performance
Multi-Channel Feedback: User satisfaction, automatic monitoring, test results
Performance Analytics: Real-time capability health scoring and trends
Learning Engine: Pattern recognition and confidence-weighted adaptations
Feedback Loops: Continuous improvement from every execution
Advanced Agency (Phase 3) ๐ NEW
Workflow Optimizer: Parallel execution, pattern recognition, auto-optimization
Predictive Analytics: Performance prediction, proactive alerts, resource forecasting
Knowledge Transfer: Cross-component learning, artifact sharing, similarity analysis
Self-Healing System: Enhanced error recovery, pattern recognition, resilience policies
Quick Start
๐ Option 1: Automated Setup (Recommended)
The start_server.sh script automatically:
โ Checks Python 3.9+ compatibility
โ Creates and activates virtual environment
โ Installs all dependencies (PyTorch CPU-only for faster setup)
โ Verifies server functionality
โ Creates necessary data directories
โ Starts the MCP server
๐ง Option 2: Manual Setup
๐งช Testing
Project Structure
Usage Examples
MCP Client Integration
Claude Desktop:
Add to claude_desktop_config.json:
Direct MCP Usage:
Available Capabilities
Capability | Description | Parameters |
| Search web without API tokens |
(string),
(int) |
| Extract web page content |
(string),
(string) |
| Submit execution feedback |
,
,
|
| View capability analytics |
(optional) |
| Learning progress overview | None |
| System inspection | None |
| Workflow optimization status |
(optional) |
| Predictive analytics |
(optional) |
| Knowledge transfer artifacts |
(optional) |
| Self-healing system status |
(optional) |
ACP Self-Modification
Phase 2 Adaptive Learning
Build/Test Commands
Setup & Running
./start_server.sh- Recommended: Auto-setup and start serverpython -m katamari_mcp.server- Start server (manual setup required)
Testing
pytest- Run all testspytest tests/test_adaptive_learning.py- Run Phase 2 adaptive learning testspytest -k "test_name"- Run specific test
Development (Manual Setup)
source .venv/bin/activate- Activate virtual environmentpip install torch --index-url https://download.pytorch.org/whl/cpu- Install PyTorchpip install transformers pydantic aiohttp mcp pytest-asyncio beautifulsoup4 psutil- Install depsruff check .- Lint codeblack .- Format codemypy .- Type checking
Development
See PLAN.md for detailed architecture and implementation roadmap.
Phase 2 Features
โ Adaptive Learning Engine - Dynamic heuristic adjustment
โ Feedback Collection - Multi-channel feedback system
โ Performance Tracking - Real-time analytics and health scoring
โ Data Models - Centralized validation and serialization
โ Router Integration - New MCP endpoints for learning features
โ Comprehensive Testing - Full test coverage for adaptive components
Phase 3 Features
โ Workflow Optimizer - Parallel execution, pattern recognition, auto-optimization
โ Predictive Analytics Engine - Performance prediction, proactive alerts, resource forecasting
โ Knowledge Transfer System - Cross-component learning, artifact sharing, similarity analysis
โ Self-Healing System - Enhanced error recovery, pattern recognition, resilience policies
โ System Integration - All Phase 3 components integrated with main server
โ Comprehensive Testing - Full test coverage for Phase 3 components
Architecture Evolution
Phase 1: Foundation - ACP self-modification and basic capabilities
Phase 2: Intelligence - Adaptive learning and feedback systems
Phase 3: Agency - Advanced workflow optimization, predictive capabilities, and self-healing
Future Stretch Goals ๐
See TODO.md for planned enhancements:
Named Pipe Communication - Faster startup and persistent context
MCP TaskMaster - Stateful background task management
Enhanced Context Management - Cross-call conversation context
Performance Optimization Suite - Advanced monitoring and tuning
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
An adaptive MCP server that grows and evolves based on user needs through self-modification, dynamic learning from feedback, and intelligent capability composition with workflow optimization.