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:

  1. Continue storing session state in mcp-config.json (current behavior)
  2. Remove session state from mcp-config.json and use history.json as single source of truth
  3. 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


🔗 Related


Auto-generated by MCP Smart Consolidation