# 🚀 MCP Auto-Startup Setup Guide
## What This Does
The MCP system will now automatically:
- ✅ Monitor every conversation for token usage
- ✅ Create handoff documents at conversation end
- ✅ Ensure continuity between conversations
- ✅ Track all agent activities
## Quick Setup (2 Steps)
### Step 1: Test It Works
1. Open PowerShell or Command Prompt
2. Run this command:
```
cd C:\MCP
node startup.js
```
3. You should see the MCP system start up
4. Press `Ctrl+C` to stop it
### Step 2: Make It Auto-Start on Boot
**Option A: Startup Folder (Easiest)**
1. Press `Win + R`
2. Type: `shell:startup`
3. Press Enter (Startup folder opens)
4. Right-click in the folder → New → Shortcut
5. Browse to: `C:\MCP\START-MCP-SYSTEM.bat`
6. Name it: "MCP System"
7. Click Finish
**Done!** Next time you restart Windows, MCP system starts automatically.
---
**Option B: Task Scheduler (More Control)**
1. Press `Win + R`
2. Type: `taskschd.msc`
3. Press Enter
4. Click "Create Basic Task"
5. Name: "MCP System Startup"
6. Trigger: "When I log on"
7. Action: "Start a program"
8. Program: `C:\MCP\START-MCP-SYSTEM.bat`
9. Click Finish
**Done!** MCP runs on every login.
---
## How It Works
### Automatic Handoff Creation
When you reach the end of a conversation (around 170k-180k tokens), the system will:
1. **Detect** token limit approaching
2. **Collect** all conversation context:
- Key decisions made
- Files created
- Next steps planned
- Warnings or issues
3. **Create** handoff document in 2 formats:
- JSON: `C:\MCP\handoffs\handoff-[timestamp].json`
- Markdown: `C:\MCP\handoffs\handoff-[timestamp].md`
4. **Display** location of handoff file
### What Gets Saved
Every handoff document includes:
- Where you are in the project
- What's been built already
- What needs to happen next
- File locations
- Agent status
- Critical context
### Starting Your Next Conversation
Simply say:
```
"Check the latest handoff document and continue from where we left off"
```
The next Claude conversation will:
- Read the handoff file
- Understand full context
- Continue seamlessly
- Not rebuild anything already done
---
## File Locations
- **Handoff Documents**: `C:\MCP\handoffs\`
- **System Logs**: `C:\MCP\logs\system\`
- **Agent Logs**: `C:\MCP\logs\agent-actions\`
- **Startup Script**: `C:\MCP\startup.js`
- **Config**: `C:\MCP\config.json`
---
## Checking System Status
To see if MCP is running:
1. Open Task Manager (`Ctrl + Shift + Esc`)
2. Go to "Details" tab
3. Look for `node.exe` running `startup.js`
---
## Manual Handoff Creation
If you want to create a handoff document manually (not waiting for auto-trigger):
```javascript
// In your code or console:
import { conversationContinuityAgent } from './src/agents/core/conversation-continuity-agent.js';
await conversationContinuityAgent.manualHandoff('Your summary here');
```
---
## Troubleshooting
**System not starting?**
- Check Node.js is installed: `node --version`
- Check file exists: `C:\MCP\startup.js`
- Run manually first to see errors
**No handoff created?**
- Check `C:\MCP\handoffs\` folder exists
- System may not have reached token threshold yet
- Check logs in `C:\MCP\logs\system\`
**Need to stop it?**
- Close the command window, or
- Find process in Task Manager and end it
---
## What Happens on Boot
1. Windows starts
2. `START-MCP-SYSTEM.bat` runs
3. Node.js starts `startup.js`
4. System loads configuration
5. Auto-handoff monitoring begins
6. Console window shows status
7. System runs in background
**You can minimize the window** - it will keep running!
---
## Costs
- ✅ Uses existing Node.js (already installed)
- ✅ No additional API calls (just monitoring)
- ✅ Minimal CPU usage (checks every 30 seconds)
- ✅ No internet required for monitoring
- ✅ Only creates files when needed
---
## Next Steps
1. Run `C:\MCP\START-MCP-SYSTEM.bat` to test
2. Add to Windows startup (Option A or B above)
3. Restart computer to verify auto-start
4. Continue your conversation normally
5. System handles handoffs automatically!
---
✅ **You're all set!** The system will now ensure continuity between all your conversations with Claude.