Repository navigation
Studio: start Blender MCP on mcp 2 - #16895
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #16878
Enabling Blender MCP fails with "Could not connect to Blender MCP" since Studio moved to mcp 2 (#16475). The pinned Blender MCP runtime imports
mcp.server.fastmcp, which mcp 2 removed (it was renamed tomcp.server.mcpserver.MCPServer), so the server process dies on import:Upstream Blender MCP has no mcp 2 revision to move the pin to (it constrains
mcp<2), and Studio cannot go back to mcp 1 because data-designer and the newer MCP connection handshake need mcp 2.This change makes the launcher register
mcp.server.fastmcpas an alias ofmcp.server.mcpserverwhen the installed mcp has no such module, before the runtime is imported. The runtime only usesFastMCP(name, instructions=...),@tool(annotations=...),Image(data=..., format=...)andrun(transport="stdio"), all of which keep the same signature onMCPServer.One behaviour differs: mcp 2 hides the text of any exception a tool raises, so the model would only see
Error executing tool execute_blender_code_for_cliinstead of the Blender traceback, orError executing tool get_objects_summaryinstead of "Cannot connect to Blender ... Ensure Blender is running with the MCP addon enabled". The aliasedFastMCPre-raises tool exceptions asToolError, which mcp 2 reports with the sameError executing tool <name>: <message>text mcp 1 produced.With mcp 1 installed the alias is never added, so nothing changes there. The Blender MCP setup flow and UI are unchanged.
Testing
Pinned runtime (
4309a39, checksum-verified archive) launched throughlauncher.pyover stdio, listed and called through a fastmcp client against a fake Blender bridge socket:ModuleNotFoundError: No module named 'mcp.server.fastmcp', connection closedget_screenshot_of_window_as_jsonreturns JSON,get_screenshot_of_window_as_imagereturns animage/pngImageContent with the exact bytesParity: the same harness on mcp 1.30.0 and on mcp 2.3.0 with this change gives byte-identical output (17709 bytes) for all 23 tool input / output schemas, annotations and descriptions, successful JSON, image and
execute_blender_codecalls, bridge errors, invalid arguments, and Blender not running.New test
test_launcher_runs_v1_fastmcp_runtime_on_installed_mcpruns the launcher on a stub runtime written against the v1 API and checks a failing tool's error text. It fails on main with mcp 2 (ModuleNotFoundError), fails with only the plain alias ('Error executing tool fail'), and passes with this change on both mcp 1 and mcp 2.