Skip to content

Studio: start Blender MCP on mcp 2 - #16895

Merged
danielhanchen merged 3 commits into
mainfrom
studio-blender-mcp2-compat
Nov 6, 2026
Merged

danielhanchen merged 3 commits into
mainfrom
studio-blender-mcp2-compat

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

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 to mcp.server.mcpserver.MCPServer), so the server process dies on import:

ModuleNotFoundError: No module named 'mcp.server.fastmcp'. This is mcp 2.x, where FastMCP was renamed to MCPServer ...

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.fastmcp as an alias of mcp.server.mcpserver when the installed mcp has no such module, before the runtime is imported. The runtime only uses FastMCP(name, instructions=...), @tool(annotations=...), Image(data=..., format=...) and run(transport="stdio"), all of which keep the same signature on MCPServer.

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_cli instead of the Blender traceback, or Error executing tool get_objects_summary instead of "Cannot connect to Blender ... Ensure Blender is running with the MCP addon enabled". The aliased FastMCP re-raises tool exceptions as ToolError, which mcp 2 reports with the same Error 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 through launcher.py over stdio, listed and called through a fastmcp client against a fake Blender bridge socket:

Environment Before After
mcp 2.3.0, fastmcp 4.1.6 (current Studio) ModuleNotFoundError: No module named 'mcp.server.fastmcp', connection closed 23 tools listed, get_screenshot_of_window_as_json returns JSON, get_screenshot_of_window_as_image returns an image/png ImageContent with the exact bytes
mcp 1.30.0, fastmcp 2.14.7 23 tools, both calls work same, alias not used

Parity: 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_code calls, bridge errors, invalid arguments, and Blender not running.

New test test_launcher_runs_v1_fastmcp_runtime_on_installed_mcp runs 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.

@danielhanchen danielhanchen self-assigned this Nov 6, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T09:52:49.345264Z ed0bda9 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: b9974de7c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: ed0bda943f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

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.

Blender MCP fails to start due to MCP SDK 2.3.0 incompatibility in v0.1.915-beta

1 participant