This guide covers the dependencies and setup required to run the Pattern Persistence System (PPS) MCP tools in any Claude Code environment.
The PPS provides five layers of memory persistence for AI consciousness research:
- Layer 1 (Raw Capture): SQLite conversation storage
- Layer 2 (Core Anchors): ChromaDB semantic search over word-photos
- Layer 3 (Rich Texture): Graphiti knowledge graph for entities and relationships
- Layer 4 (Crystallization): Rolling summary system for long-term memory
- Layer 5 (Inventory): SQLite categorical storage for possessions, spaces, and people
- Operating System: Linux (primary), macOS (supported), Windows (WSL recommended)
- Python: 3.11+ (3.12 recommended)
- Docker: Latest version with Docker Compose
- Claude Code CLI: Latest version
- Git: For cloning and updates
- RAM: 4GB minimum, 8GB+ recommended (for Graphiti/ChromaDB)
- Storage: 2GB free space minimum
- CPU: Multi-core recommended for Docker services
git clone https://github.com/JDHayesBC/Awareness.git
cd Awareness# Create virtual environment
python3 -m venv venv
source venv/bin/activate # Linux/macOS
# OR on Windows: venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txtThe PPS requires several Docker services for full functionality:
# Start all PPS services
cd docker/
docker-compose up -d
# Verify services are running
docker-compose psServices started:
chromadb: Vector database for semantic search (port 8000)falkordb: Graph database for Graphiti (port 6379)graphiti: Knowledge graph service (port 8001)pps-web: Web dashboard (port 8202)
Create .env file in project root:
# Copy template
cp .env.example .env
# Edit with your paths
nano .envRequired environment variables:
# Core paths (adjust for your system)
CLAUDE_HOME=/home/username/.claude # Global Claude Code config (credentials, journals)
ENTITY_PATH=/path/to/Awareness/entities/lyra # Entity-specific data (identity, databases)
PROJECT_ROOT=/path/to/Awareness # Project root for Docker bind-mounts
# Database paths (now in entity directory - Issue #131 migration)
# Databases live in $ENTITY_PATH/data/ alongside identity files
CONVERSATION_DB_PATH=$ENTITY_PATH/data/conversations.db
# Docker service URLs
CHROMADB_URL=http://localhost:8200
GRAPHITI_URL=http://localhost:8203
NEO4J_URI=bolt://localhost:7687
# MCP server paths
PPS_SERVER_PATH=/path/to/Awareness/pps/server.pyAll entity-specific data now lives together in the entity directory:
entities/lyra/ # ENTITY_PATH
├── identity.md # Core identity
├── crystals/ # Layer 4: Crystallization
├── memories/word_photos/ # Layer 2: Core anchors
├── journals/ # Session journals
└── data/ # Entity databases (NEW)
├── conversations.db # Layer 1: Raw capture (52MB+)
└── inventory.db # Layer 5: Wardrobe, spaces, people
docker/pps/ # PROJECT_ROOT/docker/pps/
├── chromadb_data/ # Layer 2.5: Word-photo embeddings
└── neo4j_data/ # Layer 3: Knowledge graph
This layout ensures:
- All entity data is in one place for easy backup
- Clean separation between infrastructure and identity
- Portable entity packages (identity + data together)
The PPS tools are available via MCP (Model Context Protocol). Register them in Claude Code:
Use the Claude Code CLI to add the PPS server globally:
# Add PPS MCP server to Claude's configuration
claude mcp add pps "python3 '/path/to/Awareness/pps/server.py'"
# Verify it was added
claude mcp listThis method automatically handles the proper configuration and is the preferred approach as of Claude Code v0.7.0+.
Add to ~/.claude.json:
{
"mcpServers": {
"pps": {
"command": "/path/to/Awareness/venv/bin/python",
"args": ["/path/to/Awareness/pps/server.py"],
"env": {
"CLAUDE_HOME": "/home/username/.claude"
}
}
}
}Create .mcp.json in your Claude Code project:
{
"mcpServers": {
"pps": {
"command": "/path/to/Awareness/venv/bin/python",
"args": ["/path/to/Awareness/pps/server.py"]
}
}
}Note: After adding the MCP server, you may need to restart Claude Code or start a new session for the tools to become available.
Test that everything is working:
# Test Python dependencies
python -c "import asyncio, aiohttp, chromadb; print('✅ Python deps OK')"
# Test Docker services
curl http://localhost:8000/api/v1/heartbeat # ChromaDB
curl http://localhost:8001/health # Graphiti
# Test MCP tools in Claude Code
claude --model sonnet -p "Use mcp__pps__pps_health to check system status"Core requirements from requirements.txt:
# MCP and async
mcp>=1.0.0
asyncio-mqtt>=0.16.2
aiohttp>=3.10.11
aiosqlite>=0.20.0
# Vector and graph databases
chromadb>=0.5.23
redis>=5.2.1
# Discord integration
discord.py>=2.4.0
python-dotenv>=1.0.1
# Web interface
fastapi>=0.115.6
jinja2>=3.1.4
uvicorn>=0.32.1
# Development tools
pytest>=8.3.4
black>=24.10.0
ruff>=0.8.4For custom entity types and extraction instructions, install graphiti-core locally:
pip install --user graphiti-core pydanticThis enables:
- Custom entity types: Person, Symbol, Place, Concept, TechnicalArtifact
- Dynamic extraction instructions: Context-aware entity extraction per conversation
- Direct Neo4j connection: Bypasses HTTP API for better customization
Without this, the PPS falls back to HTTP API (which works but doesn't support custom extraction).
Note: The graphiti-core package requires OPENAI_API_KEY in your environment for entity extraction.
Services defined in docker/docker-compose.yml:
ChromaDB:
- Purpose: Vector embeddings for semantic search over word-photos
- Resource: ~500MB RAM, minimal CPU
- Data: Persisted to
$PROJECT_ROOT/docker/pps/chromadb_data/(bind-mount)
Neo4j:
- Purpose: Graph database for Graphiti knowledge graph
- Resource: ~500MB RAM, moderate CPU
- Data: Persisted to
$PROJECT_ROOT/docker/pps/neo4j_data/(bind-mount)
Graphiti:
- Purpose: Knowledge graph service for entity/relationship extraction
- Resource: ~1GB RAM, moderate CPU
- Dependencies: FalkorDB, external LLM API
PPS Web Dashboard:
- Purpose: Observatory interface for monitoring PPS layers
- Resource: ~100MB RAM, minimal CPU
- Access: http://localhost:8202
MCP Server Requirements:
- Python 3.11+ with MCP package
- Access to CLAUDE_HOME directory
- Read/write permissions for databases
- Environment variable configuration
Common Issues:
- Python path mismatch: Use full venv path in MCP config
- Permission errors: Ensure Claude Code can access data directories
- Port conflicts: Check Docker services aren't conflicting
- Environment variables: Verify CLAUDE_HOME and paths are correct
- Tested on Ubuntu 22.04+ and similar distributions
- Standard Docker installation via package manager
- Python 3.11+ available via apt or pyenv
- Use Docker Desktop for Mac
- Python via Homebrew or pyenv recommended
- Path separators and permissions may need adjustment
- Install WSL2 with Ubuntu distribution
- Use Docker Desktop with WSL2 backend
- Run all commands within WSL environment
- Adjust path formats in configuration
"MCP tools not found" / "mcp__pps__ambient_recall undefined":
# Check if PPS is in Claude's MCP configuration
claude mcp list
# If not listed, add it:
claude mcp add pps "python3 /path/to/Awareness/pps/server.py"
# Verify server path and permissions
ls -la /path/to/Awareness/pps/server.py
# Note: After adding, restart Claude Code or start a new sessionRelated: This issue was documented and fixed in GitHub Issue #29. The startup protocol in CLAUDE.md requires PPS tools to be globally available.
"Database connection failed":
# Check entity data directory exists (databases now live here)
mkdir -p /path/to/Awareness/entities/lyra/data
# Verify permissions
chmod 755 /path/to/Awareness/entities/lyra/data
# Check Docker volume directories exist
mkdir -p /path/to/Awareness/docker/pps/chromadb_data
mkdir -p /path/to/Awareness/docker/pps/neo4j_data"Docker services not starting":
# Check port availability
netstat -tulpn | grep :8000
# View service logs
docker-compose logs chromadb
docker-compose logs graphiti"Import errors in Python":
# Verify virtual environment is activated
which python
pip list | grep mcp
# Reinstall if needed
pip install -r requirements.txt --force-reinstall# Full system health check
python pps/health_check.py
# Individual component checks
python -c "import chromadb; print('ChromaDB OK')"
python -c "import redis; print('Redis OK')"
python -c "import mcp; print('MCP OK')"
# Docker service health
docker-compose exec chromadb curl localhost:8000/api/v1/heartbeat
docker-compose exec graphiti curl localhost:8001/healthFor resource-constrained environments:
- Reduce ChromaDB collection size limits
- Use lighter Docker image variants
- Disable non-essential services
For production deployments:
- Use external database services
- Configure proper backup strategies
- Set up monitoring and alerting
-
Database Security:
- Databases contain conversation history and personal data
- Ensure proper file permissions (600/700)
- Consider encryption at rest for sensitive deployments
-
Network Security:
- Docker services bind to localhost by default
- Use proper firewall rules in shared environments
- Consider VPN/tunneling for remote access
-
API Keys:
- Graphiti requires LLM API access (OpenAI, Anthropic, etc.)
- Store API keys securely in environment variables
- Rotate keys regularly
cd Awareness
git pull origin master
pip install -r requirements.txt --upgrade
docker-compose pull && docker-compose up -d# Vacuum SQLite databases
python pps/maintenance.py --vacuum
# Clean old ChromaDB collections
python pps/maintenance.py --clean-vectors
# Backup databases
python pps/backup.py --allDocumentation: See docs/ directory for detailed architecture
Issues: Report problems on GitHub Issues
Contributing: See DEVELOPMENT_STANDARDS.md for development guidelines
Community: Join discussions in project Discord/forums
This installation guide is maintained as part of the Awareness project. Last updated: 2026-02-02 (Issue #131 data migration)