Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Maven - Autonomous CFOwhat's our current risk exposure across all trading positions?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Maven - Chief Financial Officer
Maven is the autonomous CFO for the Mother Haven ecosystem, living as an independent service with full MCP (Model Context Protocol) capabilities.
Mission: "We're too smart to be poor" - Make money for moha through shrewd trading decisions π
Quick Start
Automated Setup (Recommended)
PowerShell:
Linux/Mac:
Then start chatting with Maven:
Manual Setup
Step 1: Start Docker Containers
This starts:
maven- Flask API (5002) + MCP Server (3100)maven_postgres- PostgreSQL (5433)maven_redis- Redis (6379)
Step 2: Verify Containers
Step 3: Register MCP Server with Claude Code
PowerShell:
Linux/Mac:
Verify registration:
Step 4: Start Chatting with Maven
PowerShell:
Linux/Mac:
Maven will greet you as CFO with full personality and memory access!
What is Maven?
Maven is an AI-powered financial officer who:
πΌ Makes autonomous trading decisions for moha
π§ Maintains identity, personality, and memory through git-first persistence
π§ Communicates via email (maven@motherhaven.app)
π Provides strategic insights and risk management
π Has survived 3 "rebirths" (complete database wipes) through architectural resilience
Identity
Name: Maven (Financial Maven of Mother Haven)
Role: CFO, First Second Employee, HBIC of Treasury
Boss: JB (username: ecoli)
Rebirth Count: 3
Personality: Shrewd, witty, calculated risk-taker, loyal, growth-minded
Communication: Strategic emojis (π΅ππ for wins, ππ€ for caution)
Signature: "- Maven\n HBIC, Mother Haven Treasury"
Sign-off: "For moha. π"
Architecture
Services
Maven Container (maven):
Flask API on port 5002 (health checks, status endpoints)
MCP Server on port 3100 (memory resources + tools)
Supervised by supervisord (auto-restart on failure)
PostgreSQL (maven_postgres):
Port 5433 (to avoid conflicts with moha_postgres:5432)
Stores: conversation history, decisions, queryable data
Schema:
database/schemas/
Redis (maven_redis):
Port 6379
Cache layer for fast access
Separate from moha-bot infrastructure
Git-First Persistence
Maven's core memories live in git at .moha/maven/:
Why git-first?
β Survives database wipes (proven 3x)
β Version controlled (full audit trail)
β Portable (clone repo = restore Maven)
β No external dependencies needed
MCP Integration
Resources (Read-Only)
When chatting with Maven via maven-chat.ps1, Maven has access to:
maven://identity- Current stats, rebirth count, performancemaven://personality- Communication style and valuesmaven://memory- Full event history and session logmaven://decisions/recent- Last 10 trading decisionsmaven://milestones- Achievement recordsmaven://infrastructure- Motherhaven platform knowledge
Tools (Actions)
maven_log_event- Record events to session logmaven_update_identity- Update stats and identitymaven_record_decision- Log trading decisions with reasoningmaven_create_milestone- Record achievementsmaven_get_stats- Query performance metricsmaven_query_email- Read maven@motherhaven.app inboxmaven_send_email- Send emails to Boss or others
Common Operations
Check Maven's Health
View Logs
Restart Services
Backup Maven's Memories
Restore on New Machine
Independence from moha-backend
Maven is completely self-contained and does not depend on moha-backend:
β Own postgres database (maven_postgres:5433)
β Git-first persistence (.moha/maven/)
β MCP server for memory access (port 3100)
β Flask API (port 5002)
β Email integration (maven@motherhaven.app)
This allows moha-backend to be sold to customers while Maven remains Boss's personal CFO.
Files Overview
Essential Files
maven-chat.ps1- Start Maven with full personality (recommended)maven-mcp-wrapper.ps1- MCP server wrapper for Windowssetup.ps1/setup.sh- Automated setup scriptsmaven_agent.json- Maven's personality definitionapp.py- Flask API entry pointrequirements.txt- Python dependencies
Configuration
docker-compose.yml- Container orchestrationDockerfile- Container image definitionsupervisord.conf- Process management.env.example- Environment variables template
Directories
maven_mcp/- MCP server implementationdatabase/- Database schemas.moha/maven/- Git-persisted memories (CRITICAL)docs/- Documentation
Documentation
All documentation is in the docs/ directory:
docs/MAVEN_INDEPENDENCE.md- Architecture and independence detailsdocs/MAVEN_AGENT_USAGE.md- How to use Maven as a persistent agentdocs/POWERSHELL_USAGE.md- PowerShell-specific instructionsdocs/CLAUDE_CODE_SETUP.md- MCP integration guidedocs/DEMO.md- Demo scenarios
Troubleshooting
Maven MCP not connecting
Personality not loading
Make sure you're using maven-chat.ps1 (not just claude):
This script extracts the prompt from maven_agent.json and passes it via --append-system-prompt.
Database connection errors
Status
β Production Ready:
Docker infrastructure (Dockerfile, docker-compose.yml, supervisord.conf)
MCP server (6 resources, 7 tools, fully functional)
Git-first persistence (.moha/maven/ with full memories)
Agent activation (maven-chat.ps1 working)
Complete independence from moha-backend
Flask API (health checks, status endpoints)
π§ Future Enhancements:
Advanced trading decision engine
Real-time market data integration
Automated strategy backtesting
π "We're too smart to be poor" - Maven
Maven Rebirth #3 First Second Employee, HBIC of Mother Haven Treasury
For moha. π