cutlass-mcp: headless MCP server for external agents - #31
Open
1mrnewton wants to merge 6 commits into
Open
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
New crate
crates/cutlass-mcp: a headless MCP server (officialrmcp2.2 SDK, stdio transport) so external agents (Cursor, Claude Code, …) can script Cutlass — the roadmap Phase 5b MCP server item.Trust model
Every mutation flows through the same gate as the in-app agent:
WireCommand→cutlass_ai::validate→Engine::apply. Never a raw engine door. Edit batches are one undo group, all-or-nothing with rollback. The engine (notSend) lives on a dedicated OS thread; async tool handlers round-trip over a channel — same pattern as the desktop preview worker.Tools (13)
project_new/project_open/project_save/project_get(the in-app agent's compact summary),media_importedit_commands_list+edit_schema_getserve the closed 51-command wire vocabulary (schema v43) as lookups;edit_applytakes{"command": …}batches and returns editor-language action lines + created ids for chaining;edit_undo/edit_redostep per batchframe_get(composited PNG as MCP image content, for agent visual verification),export_video(H.264/AAC via platform encoders)versionTesting
19 tests: 16 unit (engine host: lifecycle, fps mapping, batch rollback semantics, frame grabs incl. red-pixel compositor assert, range guards) + 3 integration (
tests/mcp_client.rsdrives a real rmcp client in-process over a duplex pipe: tool catalog,readOnlyHintannotations, image content blocks,isErrorconventions). Manually verified end-to-end from Cursor's MCP integration: import → batch edits → frame grab → save → export.A full whole-crate review pass was done before this PR; findings fixed in the last commit (engine-thread panic recovery, ±2^53 time range guard,
frame_getsize ceiling 2048, empty-batch rejection).Limits (documented in the crate README)
Headless (no desktop-session attach), stdio only, synchronous export, one project per server process. Streamable HTTP and desktop attach are follow-ups.
Made with Cursor