Architecture: Should session state be stored in .cursor/mcp-config.json?
Documentation for Sessions
🏗️ Architecture: Should session state be stored in .cursor/mcp-config.json?
📋 Decision Context
Question:
Should session state be stored in .cursor/mcp-config.json?
Task: MCP Session Management System Refactor
🎯 Decision Made
Chosen:
Remove session state from mcp-config.json and use history.json as single source of truth
Options Considered:
- Continue storing session state in mcp-config.json (current behavior)
- Remove session state from mcp-config.json and use history.json as single source of truth
- Create a dedicated session-state.json file separate from config
💭 Reasoning
mcp-config.json should contain MCP configuration (behavior settings, agent routing, API endpoints), not runtime session state. Having session state in multiple files (mcp-config.json, history.json, active.json, sessionID.json, hot-memory.json) creates synchronization nightmares and race conditions. The session state was being written to 7+ locations, causing conflicts when agents work concurrently. By consolidating to history.json as the single source of truth, we eliminate data inconsistencies and simplify the architecture.
📁 Files Involved
MCP/mcp-development-ai/src/storage/docs-data-integration.tstools/scripts/database/session-manager.js.cursor/mcp-config.jsonsessions/sessions-history/editor2/history.json
🔗 Related
- Decision ID:
dev_1767995485869_i8gls1e - Session: 35
- Workspace: editor2
Auto-generated by MCP Smart Consolidation