# Simplified Project Context MCP
## Overview
The Project Context MCP has been refactored from 20+ commands to just 4 essential commands that cover the core Xcode integration workflow:
# Simplified Project Context MCP
## Overview
The Project Context MCP has been refactored from 20+ commands to 8 essential commands that cover both the core Xcode integration workflow and project context management:
## The 8 Essential Commands
### Core Build Workflow (4 commands)
#### 1. `get_project_status()`
**Purpose**: One unified command that gives you everything you need to know about the project state.
**Returns**:
- Current build health (errors, warnings)
- Project readiness percentage
- Current blockers
- Swift files count, Xcode projects
- Git status and last commit
- Suggested next action
**When to use**: Start here to understand what's going on with your project.
#### 2. `build()`
**Purpose**: Trigger a build and get immediate feedback.
**What it does**:
- Checks if Xcode is running and has a project open
- Triggers build via AppleScript (Cmd+B)
- Monitors for 10 seconds to get initial build results
- Returns build status, time, errors/warnings count
- Shows top errors immediately
**When to use**: When you want to build and see what happens.
#### 3. `get_diagnostics()`
**Purpose**: Get current errors and warnings with suggested solutions.
**Returns**:
- Recent build errors with suggested fixes
- File and line number information
- Top warnings
- Specific solutions for each error type
- Next action recommendations
**When to use**: After a build fails, to see what needs to be fixed.
#### 4. `fix_error(error_message, solution)`
**Purpose**: Apply a fix and get immediate feedback.
**What it does**:
- Records the fix attempt in the database
- Provides specific guidance for applying the fix
- Optionally triggers verification build
- Learns from successful fixes for future recommendations
**When to use**: When you want to apply a specific solution to an error.
### Project Context Management (4 commands)
#### 5. `get_context_summary()`
**Purpose**: Get comprehensive project context and development status.
**Returns**:
- Project name, phase, and readiness percentage
- Infrastructure component status
- Implementation details (Swift files, Xcode projects)
- Git status and recent commits
- Next focus areas
**When to use**: When you need the big picture view of project progress.
#### 6. `update_project_phase(new_phase)`
**Purpose**: Update the current development phase and store context.
**What it does**:
- Updates the project phase in configuration
- Stores context about the phase change
- Maintains history of phase transitions
**When to use**: When moving to a new development phase or milestone.
#### 7. `store_context(context_note)`
**Purpose**: Store important context or notes from the current development session.
**What it does**:
- Stores timestamped development notes
- Associates notes with current project phase
- Maintains history for future reference
**When to use**: To record important decisions, learnings, or session summaries.
#### 8. `get_recent_context()`
**Purpose**: Get recent development context and session history.
**Returns**:
- Recent phase changes
- Development notes from recent sessions
- Context organized by type and timestamp
**When to use**: To understand what happened in recent development sessions.
## Workflows
### Core Build Workflow
1. **Check status** → `get_project_status()`
2. **Build** → `build()`
3. **See what's broken** → `get_diagnostics()`
4. **Fix it** → `fix_error("error message", "chosen solution")`
5. **Repeat steps 2-4** until clean
### Project Context Management
1. **Get big picture** → `get_context_summary()`
2. **Update phase** → `update_project_phase("new phase")`
3. **Record progress** → `store_context("important notes")`
4. **Review history** → `get_recent_context()`
## What Was Removed
The following redundant commands were archived:
- `get_unified_project_status` (functionality merged into `get_project_status` and `get_context_summary`)
- `get_platform_status_summary` (merged into `get_context_summary`)
- `generate_platform_status_report` (not essential for daily workflow)
- `get_build_diagnostics` (merged into `get_diagnostics`)
- `get_error_solution` (merged into `get_diagnostics`)
- `record_successful_fix` (merged into `fix_error`)
- `get_build_health_summary` (merged into `get_project_status`)
- `get_enhanced_build_status` (merged into `get_project_status`)
- `record_build_fix` (same as `fix_error`)
- `get_build_error_solution` (merged into `get_diagnostics`)
- `initialize_conversation` (not essential)
- `generate_context_summary` (simplified to `get_context_summary`)
- `get_feature_group_status` (merged into `get_context_summary`)
- `store_session_context` (simplified to `store_context`)
- `get_previous_context` (simplified to `get_recent_context`)
- All Swift-specific detailed tools (core functionality merged into main commands)
## Benefits
1. **Simpler**: 8 focused commands instead of 20+
2. **Clear separation**: Build workflow vs project context management
3. **Less confusion**: No overlap between similar commands
4. **Better UX**: Each command has a clear purpose and next step
5. **Maintained functionality**: All essential capabilities preserved
6. **Context tracking**: Still maintains session history and phase management
7. **Faster**: Less decision paralysis about which command to use
## Technical Implementation
- Uses the same underlying infrastructure (checkers, diagnostics DB, etc.)
- Combines functionality from multiple old commands into each new command
- Maintains all the learning and solution tracking capabilities
- Still integrates with Xcode via AppleScript for builds and monitoring