Step 246: mcp_main.cpp — standalone MCP server entry point
Wires HeadlessEditorState + MCPBridge into a standalone whetstone_mcp binary that any MCP client (Claude Code, Cursor, etc.) can launch over stdio. No SDL, no ImGui, no OpenGL — headless only. 12/12 tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
22
progress.md
22
progress.md
@@ -23,3 +23,25 @@ but with zero GUI dependencies (no ImGui, no SDL, no WebSocket).
|
||||
- JSON roundtrip cloning (matching EditorUtils.h) instead of manual deep copy
|
||||
- Separate HeadlessAgentState (no AgentMarketplace/WebSocket dependency chain)
|
||||
- All files under 600-line architecture limit
|
||||
|
||||
### Step 246: mcp_main.cpp — Standalone MCP Server Entry Point
|
||||
**Status:** PASS (12/12 tests)
|
||||
|
||||
Wires HeadlessEditorState + MCPBridge into a standalone `whetstone_mcp` binary
|
||||
that any MCP client (Claude Code, Cursor, etc.) can launch over stdio.
|
||||
|
||||
**Files created:**
|
||||
- `editor/src/mcp_main.cpp` — Standalone MCP server entry point with CLI arg
|
||||
parsing (--workspace, --language, --verbose), signal handling, resource reader
|
||||
lambda routing whetstone:// URIs, and MCPBridge stdio loop
|
||||
- `editor/tests/step246_test.cpp` — 12 test cases: initialize, notifications,
|
||||
tools/list (10+), resources/list (5), prompts/list (4), tools/call pipeline,
|
||||
tools/call get_ast, resources/read ast, resources/read diagnostics, ping,
|
||||
resources/read settings, CLI arg parsing
|
||||
|
||||
**Key design decisions:**
|
||||
- No SDL, no ImGui, no OpenGL — headless only binary
|
||||
- Fixed "mcp-session" session ID (MCP stdio is single-client)
|
||||
- Default Refactor role for full MCP access
|
||||
- Empty scratch buffer on startup so getAST works immediately
|
||||
- All logging to stderr (stdout is the MCP transport)
|
||||
|
||||
Reference in New Issue
Block a user