blendrelay-mcp 0.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of blendrelay-mcp might be problematic. Click here for more details.

Files changed (57) hide show
  1. blendrelay_mcp-0.7.0/LICENSE +21 -0
  2. blendrelay_mcp-0.7.0/PKG-INFO +156 -0
  3. blendrelay_mcp-0.7.0/README.md +135 -0
  4. blendrelay_mcp-0.7.0/pyproject.toml +39 -0
  5. blendrelay_mcp-0.7.0/setup.cfg +4 -0
  6. blendrelay_mcp-0.7.0/src/blendrelay_blender/COPYING.txt +674 -0
  7. blendrelay_mcp-0.7.0/src/blendrelay_blender/__init__.py +21 -0
  8. blendrelay_mcp-0.7.0/src/blendrelay_blender/agent_permissions.py +130 -0
  9. blendrelay_mcp-0.7.0/src/blendrelay_blender/asset_import.py +177 -0
  10. blendrelay_mcp-0.7.0/src/blendrelay_blender/asset_rules.py +50 -0
  11. blendrelay_mcp-0.7.0/src/blendrelay_blender/asset_ui.py +229 -0
  12. blendrelay_mcp-0.7.0/src/blendrelay_blender/blender_manifest.toml +14 -0
  13. blendrelay_mcp-0.7.0/src/blendrelay_blender/bridge_ui.py +2051 -0
  14. blendrelay_mcp-0.7.0/src/blendrelay_blender/client.py +109 -0
  15. blendrelay_mcp-0.7.0/src/blendrelay_blender/conversation.py +25 -0
  16. blendrelay_mcp-0.7.0/src/blendrelay_blender/edit_context.py +110 -0
  17. blendrelay_mcp-0.7.0/src/blendrelay_blender/focused_view.py +412 -0
  18. blendrelay_mcp-0.7.0/src/blendrelay_blender/general.py +787 -0
  19. blendrelay_mcp-0.7.0/src/blendrelay_blender/mesh_tools.py +101 -0
  20. blendrelay_mcp-0.7.0/src/blendrelay_blender/run_metrics.py +59 -0
  21. blendrelay_mcp-0.7.0/src/blendrelay_blender/scene_helpers.py +97 -0
  22. blendrelay_mcp-0.7.0/src/blendrelay_blender/sketch.py +128 -0
  23. blendrelay_mcp-0.7.0/src/blendrelay_blender/target_region.py +306 -0
  24. blendrelay_mcp-0.7.0/src/blendrelay_blender/version.py +28 -0
  25. blendrelay_mcp-0.7.0/src/blendrelay_blender/viewport_hud.py +1206 -0
  26. blendrelay_mcp-0.7.0/src/blendrelay_blender/workflow.py +126 -0
  27. blendrelay_mcp-0.7.0/src/blendrelay_mcp/__init__.py +1 -0
  28. blendrelay_mcp-0.7.0/src/blendrelay_mcp/addon_installer.py +109 -0
  29. blendrelay_mcp-0.7.0/src/blendrelay_mcp/cli.py +171 -0
  30. blendrelay_mcp-0.7.0/src/blendrelay_mcp/job_results.py +38 -0
  31. blendrelay_mcp-0.7.0/src/blendrelay_mcp/server.py +348 -0
  32. blendrelay_mcp-0.7.0/src/blendrelay_mcp/validation.py +49 -0
  33. blendrelay_mcp-0.7.0/src/blendrelay_mcp.egg-info/PKG-INFO +156 -0
  34. blendrelay_mcp-0.7.0/src/blendrelay_mcp.egg-info/SOURCES.txt +55 -0
  35. blendrelay_mcp-0.7.0/src/blendrelay_mcp.egg-info/dependency_links.txt +1 -0
  36. blendrelay_mcp-0.7.0/src/blendrelay_mcp.egg-info/entry_points.txt +2 -0
  37. blendrelay_mcp-0.7.0/src/blendrelay_mcp.egg-info/top_level.txt +3 -0
  38. blendrelay_mcp-0.7.0/src/blendrelay_runtime/__init__.py +1 -0
  39. blendrelay_mcp-0.7.0/src/blendrelay_runtime/asset_broker.py +201 -0
  40. blendrelay_mcp-0.7.0/src/blendrelay_runtime/asset_providers.py +195 -0
  41. blendrelay_mcp-0.7.0/src/blendrelay_runtime/asset_service.py +86 -0
  42. blendrelay_mcp-0.7.0/src/blendrelay_runtime/bridge.py +195 -0
  43. blendrelay_mcp-0.7.0/src/blendrelay_runtime/cli.py +102 -0
  44. blendrelay_mcp-0.7.0/src/blendrelay_runtime/errors.py +36 -0
  45. blendrelay_mcp-0.7.0/src/blendrelay_runtime/protocol.py +57 -0
  46. blendrelay_mcp-0.7.0/src/blendrelay_runtime/service.py +151 -0
  47. blendrelay_mcp-0.7.0/src/blendrelay_runtime/storage.py +18 -0
  48. blendrelay_mcp-0.7.0/tests/test_agent_permissions.py +72 -0
  49. blendrelay_mcp-0.7.0/tests/test_asset_broker.py +142 -0
  50. blendrelay_mcp-0.7.0/tests/test_bridge.py +103 -0
  51. blendrelay_mcp-0.7.0/tests/test_clear_data.py +87 -0
  52. blendrelay_mcp-0.7.0/tests/test_focused_view.py +151 -0
  53. blendrelay_mcp-0.7.0/tests/test_gateway_process.py +54 -0
  54. blendrelay_mcp-0.7.0/tests/test_installation.py +88 -0
  55. blendrelay_mcp-0.7.0/tests/test_optimization.py +111 -0
  56. blendrelay_mcp-0.7.0/tests/test_protocol.py +119 -0
  57. blendrelay_mcp-0.7.0/tests/test_runtime.py +27 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 BlendRelay MCP contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,156 @@
1
+ Metadata-Version: 2.4
2
+ Name: blendrelay-mcp
3
+ Version: 0.7.0
4
+ Summary: General-purpose MCP server and AI workflow extension for Blender
5
+ License-Expression: MIT AND GPL-3.0-or-later
6
+ Project-URL: Homepage, https://github.com/shefq/blendrelay-mcp
7
+ Project-URL: Repository, https://github.com/shefq/blendrelay-mcp
8
+ Project-URL: Issues, https://github.com/shefq/blendrelay-mcp/issues
9
+ Keywords: blender,mcp,model-context-protocol,ai,3d
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Plugins
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ License-File: src/blendrelay_blender/COPYING.txt
20
+ Dynamic: license-file
21
+
22
+ # BlendRelay MCP
23
+
24
+ **General-purpose AI agent control for Blender through MCP**
25
+
26
+ BlendRelay MCP connects local AI agents to Blender 4.5+. It can inspect and change arbitrary Blender files for modeling, sculpting, shading, rigging, animation, Geometry Nodes, simulations, lighting, rendering, compositing, video editing, scene organization and automation.
27
+
28
+ The Blender sidebar (**BlendRelay**) provides prompts, reference images, viewport sketches, target regions, selection context, quality profiles, permissions, and full-file recovery checkpoints. MCP tools perform the actual work.
29
+
30
+ ## Requirements
31
+
32
+ - Blender 4.5 or newer.
33
+ - Python 3.11 or newer and `uvx` (recommended) or `pip` for installation.
34
+ - Prompts sent from Blender currently require a signed-in OpenAI Codex CLI or Google Antigravity CLI. Install only the backend you intend to use.
35
+ - Claude Desktop, Claude Code, Cursor, and other MCP clients can connect directly to BlendRelay without Codex or Antigravity.
36
+
37
+ ---
38
+
39
+ ## Quick Start & Setup
40
+
41
+ ### 1. Install & Setup
42
+
43
+ BlendRelay MCP is currently in local development and has not yet been published to PyPI:
44
+
45
+ ```powershell
46
+ git clone https://github.com/shefq/blendrelay-mcp.git
47
+ cd blendrelay-mcp
48
+ python -m pip install -e .
49
+ blendrelay-mcp setup
50
+ ```
51
+
52
+ After the first PyPI release, users can install it with `uvx blendrelay-mcp setup` or `pip install blendrelay-mcp`.
53
+
54
+ To run diagnostics and verify your environment:
55
+
56
+ ```powershell
57
+ blendrelay-mcp doctor
58
+ ```
59
+
60
+ ### 2. Configure MCP Client
61
+
62
+ Add BlendRelay MCP to your MCP client configuration (Claude Desktop, Claude Code, Cursor, Antigravity, etc.):
63
+
64
+ ```json
65
+ {
66
+ "mcpServers": {
67
+ "blendrelay": {
68
+ "command": "python",
69
+ "args": ["-m", "blendrelay_mcp.cli", "mcp"]
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ After the PyPI release, clients can instead launch it through `uvx`:
76
+
77
+ ```json
78
+ {
79
+ "mcpServers": {
80
+ "blendrelay": {
81
+ "command": "uvx",
82
+ "args": ["blendrelay-mcp"]
83
+ }
84
+ }
85
+ }
86
+ ```
87
+
88
+ For Claude Code during local development:
89
+
90
+ ```powershell
91
+ claude mcp add --scope user blendrelay -- python -m blendrelay_mcp.cli mcp
92
+ claude mcp list
93
+ ```
94
+
95
+ ### 3. Enable Extension in Blender
96
+
97
+ 1. Open Blender.
98
+ 2. In **Edit → Preferences → Get Extensions / Add-ons**, enable **BlendRelay MCP**.
99
+ 3. In the 3D Viewport sidebar (press `N`), switch to the **BlendRelay** tab.
100
+ 4. Click **Connect / Refresh**.
101
+
102
+ ---
103
+
104
+ ## Data & Migration
105
+
106
+ - **Shared Runtime Root**: `%LOCALAPPDATA%\BlendRelayMCP` (customizable via `BLENDRELAY_DATA_DIR`).
107
+ - **Workspaces**: Scene-specific data is saved in `workspaces/<workspace-id>/`. The workspace ID is stored inside the `.blend` file (`blendrelay_workspace_id`).
108
+
109
+ ---
110
+
111
+ ## CLI Commands
112
+
113
+ The unified `blendrelay-mcp` CLI provides:
114
+
115
+ - `blendrelay-mcp` or `blendrelay-mcp mcp`: Start the MCP stdio gateway server.
116
+ - `blendrelay-mcp setup [--target <path> | --blender-version <version>]`: Migrate data and install into the newest compatible Blender by default.
117
+ - `blendrelay-mcp doctor [--strict]`: Validate Python, extension, and runtime health with a meaningful exit status.
118
+ - `blendrelay-mcp install-addon [--target <path> | --blender-version <version>]`: Install the bundled extension.
119
+ - `blendrelay-mcp runtime serve`: Run the background loopback runtime service manually.
120
+
121
+ ---
122
+
123
+ ## Blender Tools
124
+
125
+ - `get_scene_info`, `get_object_info`, `inspect_scene`, and `inspect_blender_data` provide bounded structured context.
126
+ - `mesh_edit` offers validated common mesh operations (extrude, inset, bevel, bridge, etc.).
127
+ - `build_scene_batch` handles objects, materials, lights, cameras, transforms, parenting, modifiers, duplication, deletion, and keyframes.
128
+ - `execute_blender_python` exposes the full Blender Python API with `br` helpers.
129
+ - `capture_viewport` and `capture_focused_view` provide visual verification and multi-angle framing.
130
+ - `blendrelay_blender_sessions`, `blendrelay_blender_job`, `blendrelay_get_capabilities`, `blendrelay_register_source`, and `blendrelay_read_artifact` manage session lifecycles, background jobs, and artifacts.
131
+ - Scene checkpoints and restoration allow non-destructive undo and safety recovery.
132
+
133
+ ---
134
+
135
+ ## Workflows and Verification
136
+
137
+ - **Workflows**: Auto mode classifies requests into creation, focused editing, shading, rigging, animation, nodes, simulation, rendering, compositing, sculpting, or data management.
138
+ - **Profiles**: Four workload profiles control budgets: Focused Task, Full Creation, Creation + Assets, and Complex Production. Finish quality can be set from Draft to Maximum.
139
+ - **Checkpoints**: BlendRelay automatically creates recovery checkpoints before an AI execution and a final checkpoint upon successful completion.
140
+ - **Asset Library**: Searches local caches, Poly Haven, and Poly Pizza under the active license policy.
141
+
142
+ ---
143
+
144
+ ## Testing
145
+
146
+ Run the test suite with:
147
+
148
+ ```powershell
149
+ python -B -m unittest discover -s tests -p "test_*.py" -v
150
+ ```
151
+
152
+ Build the extension package:
153
+
154
+ ```powershell
155
+ python tools/build_extension.py
156
+ ```
@@ -0,0 +1,135 @@
1
+ # BlendRelay MCP
2
+
3
+ **General-purpose AI agent control for Blender through MCP**
4
+
5
+ BlendRelay MCP connects local AI agents to Blender 4.5+. It can inspect and change arbitrary Blender files for modeling, sculpting, shading, rigging, animation, Geometry Nodes, simulations, lighting, rendering, compositing, video editing, scene organization and automation.
6
+
7
+ The Blender sidebar (**BlendRelay**) provides prompts, reference images, viewport sketches, target regions, selection context, quality profiles, permissions, and full-file recovery checkpoints. MCP tools perform the actual work.
8
+
9
+ ## Requirements
10
+
11
+ - Blender 4.5 or newer.
12
+ - Python 3.11 or newer and `uvx` (recommended) or `pip` for installation.
13
+ - Prompts sent from Blender currently require a signed-in OpenAI Codex CLI or Google Antigravity CLI. Install only the backend you intend to use.
14
+ - Claude Desktop, Claude Code, Cursor, and other MCP clients can connect directly to BlendRelay without Codex or Antigravity.
15
+
16
+ ---
17
+
18
+ ## Quick Start & Setup
19
+
20
+ ### 1. Install & Setup
21
+
22
+ BlendRelay MCP is currently in local development and has not yet been published to PyPI:
23
+
24
+ ```powershell
25
+ git clone https://github.com/shefq/blendrelay-mcp.git
26
+ cd blendrelay-mcp
27
+ python -m pip install -e .
28
+ blendrelay-mcp setup
29
+ ```
30
+
31
+ After the first PyPI release, users can install it with `uvx blendrelay-mcp setup` or `pip install blendrelay-mcp`.
32
+
33
+ To run diagnostics and verify your environment:
34
+
35
+ ```powershell
36
+ blendrelay-mcp doctor
37
+ ```
38
+
39
+ ### 2. Configure MCP Client
40
+
41
+ Add BlendRelay MCP to your MCP client configuration (Claude Desktop, Claude Code, Cursor, Antigravity, etc.):
42
+
43
+ ```json
44
+ {
45
+ "mcpServers": {
46
+ "blendrelay": {
47
+ "command": "python",
48
+ "args": ["-m", "blendrelay_mcp.cli", "mcp"]
49
+ }
50
+ }
51
+ }
52
+ ```
53
+
54
+ After the PyPI release, clients can instead launch it through `uvx`:
55
+
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "blendrelay": {
60
+ "command": "uvx",
61
+ "args": ["blendrelay-mcp"]
62
+ }
63
+ }
64
+ }
65
+ ```
66
+
67
+ For Claude Code during local development:
68
+
69
+ ```powershell
70
+ claude mcp add --scope user blendrelay -- python -m blendrelay_mcp.cli mcp
71
+ claude mcp list
72
+ ```
73
+
74
+ ### 3. Enable Extension in Blender
75
+
76
+ 1. Open Blender.
77
+ 2. In **Edit → Preferences → Get Extensions / Add-ons**, enable **BlendRelay MCP**.
78
+ 3. In the 3D Viewport sidebar (press `N`), switch to the **BlendRelay** tab.
79
+ 4. Click **Connect / Refresh**.
80
+
81
+ ---
82
+
83
+ ## Data & Migration
84
+
85
+ - **Shared Runtime Root**: `%LOCALAPPDATA%\BlendRelayMCP` (customizable via `BLENDRELAY_DATA_DIR`).
86
+ - **Workspaces**: Scene-specific data is saved in `workspaces/<workspace-id>/`. The workspace ID is stored inside the `.blend` file (`blendrelay_workspace_id`).
87
+
88
+ ---
89
+
90
+ ## CLI Commands
91
+
92
+ The unified `blendrelay-mcp` CLI provides:
93
+
94
+ - `blendrelay-mcp` or `blendrelay-mcp mcp`: Start the MCP stdio gateway server.
95
+ - `blendrelay-mcp setup [--target <path> | --blender-version <version>]`: Migrate data and install into the newest compatible Blender by default.
96
+ - `blendrelay-mcp doctor [--strict]`: Validate Python, extension, and runtime health with a meaningful exit status.
97
+ - `blendrelay-mcp install-addon [--target <path> | --blender-version <version>]`: Install the bundled extension.
98
+ - `blendrelay-mcp runtime serve`: Run the background loopback runtime service manually.
99
+
100
+ ---
101
+
102
+ ## Blender Tools
103
+
104
+ - `get_scene_info`, `get_object_info`, `inspect_scene`, and `inspect_blender_data` provide bounded structured context.
105
+ - `mesh_edit` offers validated common mesh operations (extrude, inset, bevel, bridge, etc.).
106
+ - `build_scene_batch` handles objects, materials, lights, cameras, transforms, parenting, modifiers, duplication, deletion, and keyframes.
107
+ - `execute_blender_python` exposes the full Blender Python API with `br` helpers.
108
+ - `capture_viewport` and `capture_focused_view` provide visual verification and multi-angle framing.
109
+ - `blendrelay_blender_sessions`, `blendrelay_blender_job`, `blendrelay_get_capabilities`, `blendrelay_register_source`, and `blendrelay_read_artifact` manage session lifecycles, background jobs, and artifacts.
110
+ - Scene checkpoints and restoration allow non-destructive undo and safety recovery.
111
+
112
+ ---
113
+
114
+ ## Workflows and Verification
115
+
116
+ - **Workflows**: Auto mode classifies requests into creation, focused editing, shading, rigging, animation, nodes, simulation, rendering, compositing, sculpting, or data management.
117
+ - **Profiles**: Four workload profiles control budgets: Focused Task, Full Creation, Creation + Assets, and Complex Production. Finish quality can be set from Draft to Maximum.
118
+ - **Checkpoints**: BlendRelay automatically creates recovery checkpoints before an AI execution and a final checkpoint upon successful completion.
119
+ - **Asset Library**: Searches local caches, Poly Haven, and Poly Pizza under the active license policy.
120
+
121
+ ---
122
+
123
+ ## Testing
124
+
125
+ Run the test suite with:
126
+
127
+ ```powershell
128
+ python -B -m unittest discover -s tests -p "test_*.py" -v
129
+ ```
130
+
131
+ Build the extension package:
132
+
133
+ ```powershell
134
+ python tools/build_extension.py
135
+ ```
@@ -0,0 +1,39 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "blendrelay-mcp"
7
+ dynamic = ["version"]
8
+ description = "General-purpose MCP server and AI workflow extension for Blender"
9
+ requires-python = ">=3.11"
10
+ readme = "README.md"
11
+ license = "MIT AND GPL-3.0-or-later"
12
+ license-files = ["LICENSE", "src/blendrelay_blender/COPYING.txt"]
13
+ dependencies = []
14
+ keywords = ["blender", "mcp", "model-context-protocol", "ai", "3d"]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Environment :: Plugins",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Topic :: Multimedia :: Graphics :: 3D Modeling",
22
+ ]
23
+
24
+ [project.urls]
25
+ Homepage = "https://github.com/shefq/blendrelay-mcp"
26
+ Repository = "https://github.com/shefq/blendrelay-mcp"
27
+ Issues = "https://github.com/shefq/blendrelay-mcp/issues"
28
+
29
+ [project.scripts]
30
+ blendrelay-mcp = "blendrelay_mcp.cli:main"
31
+
32
+ [tool.setuptools.packages.find]
33
+ where = ["src"]
34
+
35
+ [tool.setuptools.dynamic]
36
+ version = {attr = "blendrelay_blender.version.__version__"}
37
+
38
+ [tool.setuptools.package-data]
39
+ blendrelay_blender = ["*.py", "blender_manifest.toml", "COPYING.txt"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+