Workflows

Plan Mode: IDE Compatibility

How LeanCTX integrates with Plan Mode across different IDEs. Automatic configuration for VS Code Copilot, Claude Code, Cursor, Kiro, and more.

Many AI-powered IDEs offer a Plan Mode (or Plan Agent) that researches your codebase and creates implementation plans before writing any code. LeanCTX provides read-only tools that are ideal for this research phase, cached file reads, code search, directory maps, and project overviews.

Starting with v3.6.13, lean-ctx setup automatically configures plan mode support for IDEs that require it.

IDE Compatibility Matrix

IDEPlan ModeMCP in Plan?Config needed?
VS Code / Copilot/plan agentOnly if configuredYes — auto-configured by lean-ctx
Claude Codeplan modeOnly if allowedYes — auto-configured by lean-ctx
CursorShift+TabAll MCP toolsNo
Kiro/plan agentAll MCP toolsNo
WindsurfPlan modeAll MCP toolsNo
Codex CLIPlan modeAll MCP toolsNo
ZedNo dedicated modeVia Agent PanelNo
JetBrainsNo dedicated modeVia AI ChatNo

VS Code / GitHub Copilot

VS Code's Plan Agent (/plan) only has access to MCP tools that are explicitly listed in thegithub.copilot.chat.planAgent.additionalTools setting. Without this, Copilot cannot use LeanCTX during the planning phase.

Automatic Setup

Running lean-ctx setup or lean-ctx init --agent vscode automatically adds the required settings to your VS Code settings.json:

VS Code settings.json
{
  "chat.mcp.enabled": true,
  "github.copilot.chat.planAgent.additionalTools": [
    "lean-ctx_ctx_read",
    "lean-ctx_ctx_search",
    "lean-ctx_ctx_tree",
    "lean-ctx_ctx_overview",
    "lean-ctx_ctx_plan",
    ...
  ]
}

Manual Setup

If you prefer manual configuration, add the tools to your VS Code settings.json (Cmd+Shift+P → "Open User Settings (JSON)"):

settings.json
"github.copilot.chat.planAgent.additionalTools": [
  "lean-ctx_ctx_read",
  "lean-ctx_ctx_search",
  "lean-ctx_ctx_tree",
  "lean-ctx_ctx_overview",
  "lean-ctx_ctx_plan",
  "lean-ctx_ctx_metrics",
  "lean-ctx_ctx_compress",
  "lean-ctx_ctx_session",
  "lean-ctx_ctx_knowledge",
  "lean-ctx_ctx_graph",
  "lean-ctx_ctx_retrieve",
  "lean-ctx_ctx_provider"
]

Claude Code

Claude Code blocks MCP tools in plan mode by default unless they are explicitly allowed in the permissions configuration. This is a known limitation.

Automatic Setup

lean-ctx setup or lean-ctx init --agent claude-code automatically adds lean-ctx read-only tools to ~/.claude/settings.json:

~/.claude/settings.json
{
  "permissions": {
    "allow": [
      "mcp__lean-ctx__ctx_read",
      "mcp__lean-ctx__ctx_search",
      "mcp__lean-ctx__ctx_tree",
      ...
    ]
  }
}

Cursor

Cursor's Plan Mode (activated via Shift+Tab) automatically has access to all MCP tools in read-only mode. No additional configuration is needed — LeanCTX works out of the box.

Other IDEs

Kiro (AWS)

Kiro's Plan Agent (/plan or Shift+Tab) automatically accesses MCP tools during the research phase. No configuration needed.

Windsurf

Windsurf's Plan mode provides identical MCP tool access as Code mode. No configuration needed.

Codex CLI

Codex CLI's plan mode uses all configured MCP tools from config.toml. No configuration needed.

Recommended Tools for Plan Mode

The following tools are safe for plan and research phases, they gather context without editing your source code:

ToolDescription
ctx_readRead files with 10 compression modes (cached)
ctx_searchToken-efficient code search across the project
ctx_treeCompact directory maps with filtering
ctx_overviewProject overview with dependency graph
ctx_planContext-aware planning with budget estimation
ctx_metricsToken savings and performance metrics
ctx_compressCompress context when budget is tight
ctx_sessionSession management and state tracking
ctx_knowledgeKnowledge graph: recall decisions and insights
ctx_graphFile dependency graph analysis
ctx_retrieveRetrieve specific cached context
ctx_providerQuery external data sources (GitHub, Jira, etc.)

Troubleshooting

lean-ctx tools not appearing in plan mode

  1. Run lean-ctx doctor — check the "Plan mode" line for your IDE
  2. Run lean-ctx setup to auto-configure plan mode settings
  3. Restart your IDE after configuration changes

VS Code: "0 tool calls" in plan mode

  1. Verify you're in Agent Mode (not Chat mode)
  2. Check that chat.mcp.enabled is true in VS Code settings
  3. Verify planAgent.additionalTools contains lean-ctx tools
  4. Run lean-ctx status to confirm the MCP server is running

Client detected as "unknown (tier 4)"

If VS Code sends "Visual Studio Code" as the client name and LeanCTX shows unknown (tier 4), add LEAN_CTX_CLIENT_HINT to your MCP config as a workaround:

.vscode/mcp.json
"env": {
  "LEAN_CTX_DATA_DIR": "/path/to/.lean-ctx",
  "LEAN_CTX_CLIENT_HINT": "vscode-copilot"
}

This is fixed in v3.6.13+ where "Visual Studio Code" is automatically recognized.

Support this project