Getting Started with Wake Intelligence โ
Welcome to WakeIQX - the temporal intelligence MCP server that gives your AI agent a brain with memory of the Past, awareness of the Present, and vision of the Future.
Prerequisites โ
Before you begin, ensure you have:
- Node.js 20.x or higher - Download here
- Cloudflare account - Sign up free
- Wrangler CLI - Install with
npm install -g wrangler - Claude Desktop (optional) - For MCP integration
Installation โ
1. Clone the Repository โ
git clone https://github.com/semanticintent/semantic-wake-intelligence-mcp.git
cd semantic-wake-intelligence-mcp2. Install Dependencies โ
npm install3. Create D1 Database โ
# Create the database
wrangler d1 create wake-intelligence
# This will output your database ID - copy it!4. Configure Wrangler โ
Update wrangler.jsonc with your database ID:
{
"d1_databases": [{
"binding": "DB",
"database_name": "wake-intelligence",
"database_id": "YOUR-DATABASE-ID-HERE" // โ Paste your ID here
}]
}5. Run Database Migrations โ
Wake Intelligence requires 4 migrations (one for each layer + initial schema):
# Migration 0001: Core context table
wrangler d1 execute wake-intelligence --local --file=migrations/0001_initial_schema.sql
# Migration 0002: Layer 1 - Causality Engine (Past)
wrangler d1 execute wake-intelligence --local --file=migrations/0002_add_causality_engine.sql
# Migration 0003: Layer 2 - Memory Manager (Present)
wrangler d1 execute wake-intelligence --local --file=migrations/0003_add_memory_manager.sql
# Migration 0004: Layer 3 - Propagation Engine (Future)
wrangler d1 execute wake-intelligence --local --file=migrations/0004_add_propagation_engine.sqlFor production deployment, remove --local:
wrangler d1 execute wake-intelligence --file=migrations/0001_initial_schema.sql
wrangler d1 execute wake-intelligence --file=migrations/0002_add_causality_engine.sql
wrangler d1 execute wake-intelligence --file=migrations/0003_add_memory_manager.sql
wrangler d1 execute wake-intelligence --file=migrations/0004_add_propagation_engine.sql6. Start Development Server โ
npm run devYour MCP server is now running at http://localhost:8787 ๐
Verify Installation โ
Test with curl โ
# Health check
curl http://localhost:8787/
# List available tools
curl -X POST http://localhost:8787/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'You should see a list of 12+ MCP tools including:
save_contextload_contextsearch_contextreconstruct_reasoningupdate_predictions- And more...
Deploy to Production โ
When you're ready to deploy to Cloudflare Workers:
# Deploy to production
npm run deployYour MCP server will be available at:
https://semantic-wake-intelligence-mcp.YOUR-ACCOUNT.workers.devConnect to Claude Desktop โ
To use Wake Intelligence with Claude Desktop:
1. Install mcp-remote โ
npm install -g mcp-remote2. Configure Claude Desktop โ
Edit your Claude Desktop configuration file:
macOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.jsonWindows: %APPDATA%\Claude\claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"wake-intelligence": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse"
]
}
}
}For production deployment:
{
"mcpServers": {
"wake-intelligence": {
"command": "npx",
"args": [
"mcp-remote",
"https://semantic-wake-intelligence-mcp.YOUR-ACCOUNT.workers.dev/sse"
]
}
}
}3. Restart Claude Desktop โ
Close and reopen Claude Desktop. You should see Wake Intelligence tools available in the tool palette.
First Steps with Wake Intelligence โ
Save Your First Context โ
Claude, save this context:
"Started Wake Intelligence setup. Database created and migrations successful. Ready to build temporal intelligence features."
Use action type: implementation
Project: wake-intelligence-setupLoad Contexts โ
Claude, load contexts for project "wake-intelligence-setup"Reconstruct Reasoning โ
Claude, reconstruct the reasoning for context [context-id]Check Memory Stats โ
Claude, show me memory statistics for project "wake-intelligence-setup"Understanding the 3 Layers โ
Now that Wake Intelligence is running, let's understand what each layer does:
Layer 1: Causality Engine (Past - WHY) โ
Automatically tracks WHY contexts were created:
// Every save can include causality metadata
{
actionType: "decision", // What kind of action
rationale: "Chose Redis for caching because...", // WHY
dependencies: ["context-123", "context-456"] // Related contexts
}Use it to:
- Understand decision history
- Build causal chains
- Reconstruct reasoning
Layer 2: Memory Manager (Present - HOW) โ
Automatically classifies contexts by relevance:
- ACTIVE - Accessed < 1 hour ago
- RECENT - Accessed 1-24 hours ago
- ARCHIVED - Accessed 1-30 days ago
- EXPIRED - Accessed > 30 days ago
Use it to:
- Prioritize recent contexts
- Automatically prune old data
- Track access patterns
Layer 3: Propagation Engine (Future - WHAT) โ
Predicts what contexts you'll need next:
// Composite prediction score
score = 0.4 * temporal + 0.3 * causal + 0.3 * frequency
// Reasons: ["recently_accessed", "causal_chain_root", "high_frequency"]Use it to:
- Pre-fetch likely-needed contexts
- Optimize cache strategy
- Identify patterns
Next Steps โ
Now that you have Wake Intelligence running:
- Explore the Architecture - 3-Layer Brain Architecture
- Learn the Tools - MCP Tools Reference
- Dive into APIs - API Documentation
- Understand the Pattern - Semantic Intent
Troubleshooting โ
Database Connection Issues โ
Problem: Error: D1 database not found
Solution: Ensure your wrangler.jsonc has the correct database ID:
# List your databases
wrangler d1 list
# Verify the ID matches your configurationMigration Errors โ
Problem: Error: table already exists
Solution: Migrations are idempotent. If a table exists, the migration will skip creation. Check which migrations have run:
wrangler d1 execute wake-intelligence --local --command="SELECT name FROM sqlite_master WHERE type='table'"Local Development Port Conflicts โ
Problem: Error: Address already in use (port 8787)
Solution: Either stop the other process using port 8787, or change the port in wrangler.jsonc:
{
"dev": {
"port": 8788 // Use a different port
}
}Claude Desktop Not Seeing Tools โ
Problem: Tools don't appear in Claude Desktop
Solutions:
- Verify your
claude_desktop_config.jsonpath is correct - Restart Claude Desktop completely (quit and reopen)
- Check that the MCP server is running:
curl http://localhost:8787/ - Verify
mcp-remoteis installed:npm list -g mcp-remote
Getting Help โ
- Documentation: wakeiqx.com
- GitHub Issues: Report bugs
- Discussions: Ask questions
What's Next? โ
You're now ready to use Wake Intelligence! Here are some suggested next steps:
- โ Architecture Deep Dive - Understand the 3-layer brain
- โ Tool Reference - Learn all available MCP tools
- โ Database Schema - Explore the data model
- โ Semantic Intent Pattern - Learn the design philosophy
Welcome to temporal intelligence! ๐ง
The wake persists. ๐ฆ
