Skip to content

feat(mcp): compact is the default surface; granular is opt-in and deprecated - #485

Open
AmrDab wants to merge 1 commit into
mainfrom
feat/compact-default
Open

AmrDab wants to merge 1 commit into
mainfrom
feat/compact-default

Conversation

@AmrDab

@AmrDab AmrDab commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Requested by Amr · project thread

Summary

This is step 1 of making the compact surface the only public one. This is 4 of 5 separate simplification PRs.

clawdcursor mcp and clawdcursor agent now serve the 6 compound tools when no flag is given. The 90 granular tools need --granular or CLAWD_MCP_GRANULAR=1, and print a deprecation line on stderr. --compact and CLAWD_MCP_COMPACT=1 are still accepted, so existing configs keep working.

The plugin, the .mcpb and every config in the README already pass --compact, so nothing changes for them. Only someone running mcp or agent with no flag who relies on granular tool names is affected.

Why only step 1: the real simplification is deleting granular from the MCP surface, plus the projected/ layer (tools.ts, project-mcp.ts, tool-meta.ts, about 2.6k lines) that exists to publish it. That change breaks anyone on granular, so it belongs in a major release after one release of this deprecation. I can open that PR whenever you want it.

Changes

  • src/surface/serve.ts:
    • pickCompact(flags, env) picks the surface: compact unless --granular or CLAWD_MCP_GRANULAR=1.
    • GRANULAR_DEPRECATION is printed on stderr for both stdio and HTTP.
    • The HTTP "tip: pass --compact" line is gone.
  • src/surface/cli.ts:
    • --granular is added to mcp, agent and start.
    • --compact help text says it's the default.
  • src/__tests__/surface-default.test.ts: new tests for the selection rules.
  • README.md, docs/llms.txt and the compact.ts header no longer say granular is the default.

⚠️ SKILL.md needs your edit (I didn't touch it)

Our rule is that only you change existing SKILL.md text. After this PR, these lines are wrong:

  • L73: "Default (no flag) is granular."
  • L75: "Granular mode's 90 tools are kept for back-compat…" (still true, but it should mention --granular)
  • L170–171: the modes table says "90 granular (default)"
  • L233 (HTTP example): "name": "open_app" is a granular name. On a default daemon it's now window with {"action":"open_app","name":"Notepad"}.

Test plan

  • typecheck, typecheck:tests and lint: clean (0 errors)
  • vitest --project unit: 4116 passed, 6 skipped. That's 4111 plus the 5 new tests.
  • npm run test:mcp-schema-snapshot: OK, no change (it builds both surfaces explicitly)
  • Manual check on Linux (Xvfb) with the built CLI:
    • mcp and mcp --compact list 6 tools.
    • mcp --granular and CLAWD_MCP_GRANULAR=1 mcp list 90 tools, and get_screen_size works.
    • The deprecation line is on stderr, and stdout stays clean JSON-RPC.
    • agent --accept serves the 6 tools at /mcp.
  • Windows/macOS: CI matrix

Risk / scope

  • This breaks the default for no-flag users. I'd ship it as a minor release with a loud changelog line, or bump the major. Your call.
  • 8 granular tools have no compound route: cursor_position, minimize_window, logs_recent, submit_report, resume_task, screenshot_full, verify and granular batch. Default users lose direct access to them, the same as plugin users today. Before step 2, each one needs a compound action or a decision to drop it.
  • No guarantees in SECURITY.md are touched.

Generated by Claude Code

…recated

clawdcursor mcp and clawdcursor agent now serve the 6 compound tools with no
flag. The plugin, the .mcpb and every config in the README already passed
--compact, so for them nothing changes. --compact and CLAWD_MCP_COMPACT=1
are still accepted. The 90 granular tools need --granular or
CLAWD_MCP_GRANULAR=1, and print a deprecation line on stderr.

This is step 1 of making compact the only public surface: once granular has
shipped deprecated for a release, a major release can drop it from MCP and
the projection layer that exists to publish it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BKm7nbpP8aK35EfAYVt7NL
@AmrDab AmrDab self-assigned this Nov 27, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants