keyshot-mcp 1.1.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.
@@ -0,0 +1,18 @@
1
+ libs/
2
+ sorties/
3
+ pyinstxtractor-master/
4
+ refs/
5
+ keyshot_files/
6
+ .claude/settings.local.json
7
+ __pycache__/
8
+ *.pyc
9
+ PLAN.md
10
+ REPRISE.md
11
+ RECHERCHE.md
12
+ phase2/
13
+ PREPARATION-MATERIAUX.md
14
+ dev-plugin/
15
+ .attic/
16
+ dist/
17
+ build/
18
+ *.egg-info/
@@ -0,0 +1,92 @@
1
+ # Changelog
2
+
3
+ All important changes to this project are in this file.
4
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
+ The project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+ The bridge, the stop script and the MCP server have the same version.
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.1.0] - 2026-10-24
11
+
12
+ ### Added
13
+
14
+ - README: status "prototype" (badge, note at the top, section *Status*).
15
+ - Issue templates *Bug* and *Feedback*. Questions go to the Discussions, security problems to a private report.
16
+ - Pull request template with a *Failing first* section; CONTRIBUTING explains the rule.
17
+ - `tests/mutations_pont.py`: disables each safety rule of the bridge in a temporary copy and checks that a test fails.
18
+ - Tests for two safety rules that no test covered: a peer that is not `127.0.0.1` is closed without a reply; a library folder that is a link outside the library is refused.
19
+ - README: demo GIF (`docs/demo.gif`).
20
+ - A Python package for PyPI (`pyproject.toml`), with the command `keyshot-mcp`: without argument it starts the MCP server, `install-addin [--dir D]` copies the bridge scripts into the KeyShot Scripts folder (installed, updated or unchanged), `--version` prints the version. `run.py` and the release zip do not change.
21
+ - Workflow *TestPyPI*: a manual rehearsal of the PyPI publication on test.pypi.org, with the version `X.Y.Z.dev<run id>` (`tools/dev_version.py`, tested by `tests/test_dev_version.py`), then an install from TestPyPI on Windows.
22
+ - Claude Code plugin `keyshot` in `plugin/`, with the marketplace `.claude-plugin/marketplace.json`: the server through `uvx keyshot-mcp==<version>`, and the command `/keyshot-install-addin`. `tests/test_plugin.py` checks that the plugin, the server and the command use the version of the package.
23
+ - `server.json` for the MCP registry (`io.github.lfoletti/keyshot-mcp`), and the line `mcp-name` in the README. After the publication to PyPI, the release workflow publishes `server.json` to the registry. `tests/test_publication.py` checks the name, the description length, the versions and the PyPI package.
24
+ - GitHub Actions: the package is built, installed in a clean environment and run on Windows. On a tag, the sdist and the wheel go to the release, and to PyPI when the variable `PYPI_PUBLISH` is `true`.
25
+
26
+ ### Changed
27
+
28
+ - `test_pont.py` runs outside Windows: the real-timer test is skipped there, and the test bench waits for the bridge to accept the connection and to receive the bytes instead of assuming the loopback is synchronous.
29
+
30
+ ## [1.0.0] - 2026-10-19
31
+
32
+ First stable version. The bridge, the stop script and the MCP server now have the same version.
33
+
34
+ ### Added
35
+
36
+ - GitHub Actions: the tests run on Windows for each pull request and each push to `main`.
37
+ - GitHub Actions: Claude reviews each pull request and writes comments.
38
+ - MCP prompt `keyshot_materiaux`: method to make materials from a CMF sheet or a description.
39
+ - README: the project is not affiliated with Luxion or KeyShot.
40
+ - `SECURITY.md`: how to report a vulnerability in private.
41
+ - Dependabot keeps the GitHub Actions up to date. The actions are pinned to a commit SHA.
42
+ - CONTRIBUTING: `main` is protected. Each change goes through a pull request.
43
+ - Material names cannot contain `/`, `\`, `:`, `*`, `?`, `"`, `<`, `>`, `|` or `..` (a name is also a file name in the library).
44
+ - Tool `save_material_to_library`: saves a material made by the bridge to a subfolder of the KeyShot library, with its CMF fields (Name, Color, Finish, Material, Vendor, Notes).
45
+ - Tool `set_visibility`: shows or hides parts.
46
+ - `fit_camera`: `force=true` replaces a camera view that is not saved.
47
+ - Texture images: the bridge accepts a path only in KeyShot's texture library, in `dossier_sorties` or in the new setting `dossiers_textures`. It refuses network paths.
48
+
49
+ ### Changed
50
+
51
+ - GitHub Actions: `actions/checkout` 7.0.1 and `actions/setup-python` 7.0.0.
52
+ - The Claude review does not run on Dependabot pull requests.
53
+ - `set_material_parameter`: without `node_id`, the bridge also looks for the parameter on the shader node (the node on `surface`).
54
+ - Prompt `keyshot_materiaux`: values checked in KeyShot 2026.2 (library bases by finish, short roughness scale, metal color mode).
55
+ - A `#RRGGBB` color is sRGB. The bridge changes it to linear. Before, the bridge used it as linear and the color was too light. Scripts that send `#RRGGBB` now get darker, correct values.
56
+
57
+ ### Fixed
58
+
59
+ - `run.py` finds pywin32 in `libs` when Python starts with `-S`.
60
+ - The bridge sees KeyShot primitives (Sphere, Cube…): groups without children that have a material.
61
+
62
+ ## [0.3.1] - 2026-10-19
63
+
64
+ ### Changed
65
+
66
+ - The KeyShot scripts have new names: `MCP start.py` (bridge) and `MCP stop.py`.
67
+ - The script author is "atelier oï".
68
+
69
+ ## [0.3.0] - 2026-10-19
70
+
71
+ First public version.
72
+
73
+ ### Added
74
+
75
+ - MCP server `keyshotmcp` 0.1.0 with 31 tools: scene, cameras, environments, materials, material graph, renders and bridge.
76
+ - Bridge in KeyShot. It listens on 127.0.0.1:1998 and each request must have a token.
77
+ - Settings file `%LOCALAPPDATA%\keyshot-mcp\pont-config.json`.
78
+ - Environment variables `KEYSHOT_MCP_PORT`, `KEYSHOT_MCP_TIMEOUT`, `KEYSHOT_MCP_EXECUTE_PYTHON` and `KEYSHOT_MCP_PYTHON` (tests).
79
+ - Tests without KeyShot: 72 bridge tests and 9 end-to-end tests.
80
+ - README, CONTRIBUTING and MIT license.
81
+
82
+ ### Security
83
+
84
+ - `execute_python` is off. Only a local setting can enable it.
85
+ - The tools edit a material graph only on copies that the bridge made.
86
+ - `save_scene` keeps a copy of the old `.bip` file.
87
+
88
+ [Unreleased]: https://github.com/lfoletti/keyshot-mcp/compare/v1.1.0...HEAD
89
+ [1.1.0]: https://github.com/lfoletti/keyshot-mcp/releases/tag/v1.1.0
90
+ [1.0.0]: https://github.com/lfoletti/keyshot-mcp/releases/tag/v1.0.0
91
+ [0.3.1]: https://github.com/lfoletti/keyshot-mcp/commit/bb801b8
92
+ [0.3.0]: https://github.com/lfoletti/keyshot-mcp/commit/2a654b0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lauro Foletti
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,194 @@
1
+ Metadata-Version: 2.4
2
+ Name: keyshot-mcp
3
+ Version: 1.1.0
4
+ Summary: MCP server: control KeyShot Studio from Claude Code (scene, cameras, materials from a CMF sheet, renders)
5
+ Project-URL: Homepage, https://github.com/lfoletti/keyshot-mcp
6
+ Project-URL: Issues, https://github.com/lfoletti/keyshot-mcp/issues
7
+ Project-URL: Changelog, https://github.com/lfoletti/keyshot-mcp/blob/main/CHANGELOG.md
8
+ Author: Lauro Foletti
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: 3d-rendering,claude-code,keyshot,mcp,model-context-protocol
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Multimedia :: Graphics :: 3D Rendering
16
+ Requires-Python: >=3.12
17
+ Requires-Dist: mcp==1.28.1
18
+ Description-Content-Type: text/markdown
19
+
20
+ # keyshot-mcp
21
+
22
+ <!-- mcp-name: io.github.lfoletti/keyshot-mcp -->
23
+
24
+ Control an open KeyShot Studio 2026 window from Claude Code with the Model Context Protocol (MCP).
25
+
26
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
27
+ [![Status: prototype](https://img.shields.io/badge/status-prototype-orange.svg)](#status)
28
+ [![Tests](https://github.com/lfoletti/keyshot-mcp/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/lfoletti/keyshot-mcp/actions/workflows/tests.yml)
29
+ [![Release](https://img.shields.io/github/v/release/lfoletti/keyshot-mcp)](https://github.com/lfoletti/keyshot-mcp/releases)
30
+
31
+ > **Status: prototype.** The tools work and have tests, but the project depends on the scripting API of KeyShot, which can change. Tell us what you use and what fails: open an issue or a discussion.
32
+
33
+ ![Claude Code reads the KeyShot scene, changes the bottle glass three times, then undoes all the changes.](docs/demo.gif)
34
+
35
+ *The demo plays 3 times faster than real time.*
36
+
37
+ ```
38
+ Claude Code ⇄ MCP server keyshotmcp (Python 3.12, stdio)
39
+ ⇄ TCP 127.0.0.1:1998, 4-byte length + JSON, token
40
+ ⇄ MCP start.py (in KeyShot, timer on the UI thread)
41
+ ```
42
+
43
+ The bridge runs inside KeyShot. The server runs in Claude Code. They speak only on the local computer.
44
+
45
+ ## Requirements
46
+
47
+ | Item | Version |
48
+ |---|---|
49
+ | KeyShot Studio | 15.1 (2026) or later. Tested with 2026.2 Pro (15.1.2.7). |
50
+ | Python | 3.12 or later, Windows |
51
+ | `mcp` | 1.28.1 |
52
+ | Claude Code | any recent version |
53
+
54
+ ## Install
55
+
56
+ ### From PyPI
57
+
58
+ From version 1.1.0, `keyshot-mcp` is a Python package. With [uv](https://docs.astral.sh/uv/):
59
+
60
+ ```
61
+ uvx keyshot-mcp install-addin
62
+ claude mcp add keyshot -- uvx keyshot-mcp
63
+ ```
64
+
65
+ `install-addin` copies the two bridge scripts into `%PUBLIC%\Documents\KeyShot Studio\Scripts` (or the folder of `--dir`). Then restart KeyShot.
66
+
67
+ ### As a Claude Code plugin
68
+
69
+ From version 1.1.0, this repository is also a Claude Code marketplace. The plugin `keyshot` starts the server with `uvx`, so [uv](https://docs.astral.sh/uv/) must be installed.
70
+
71
+ ```
72
+ /plugin marketplace add lfoletti/keyshot-mcp
73
+ /plugin install keyshot@keyshot-mcp
74
+ ```
75
+
76
+ Then run `/keyshot-install-addin` once, and restart KeyShot.
77
+
78
+ ### From the release zip or the repository
79
+
80
+ Each release has `keyshot-mcp-<version>-windows.zip`, with `libs/` already filled. Unzip it, then go to step 3. Without the zip, start at step 1.
81
+
82
+ 1. Clone the repository:
83
+ ```
84
+ git clone https://github.com/lfoletti/keyshot-mcp.git
85
+ ```
86
+ 2. Install `mcp` in the `libs` folder. `run.py` loads it from there.
87
+ ```
88
+ py -3.12 -m pip install --target libs mcp==1.28.1
89
+ ```
90
+ 3. Copy `addin\Scripts\MCP start.py` and `MCP stop.py` to
91
+ `C:\Users\Public\Documents\KeyShot Studio\Scripts\`.
92
+ 4. Restart KeyShot. KeyShot reads the Scripts folder only when it starts.
93
+ 5. Add the server to Claude Code:
94
+ ```
95
+ claude mcp add keyshot -- py -3.12 -I -S C:\path\to\keyshot-mcp\run.py
96
+ ```
97
+ 6. Make sure the imports are correct:
98
+ ```
99
+ py -3.12 -I -S run.py --check
100
+ ```
101
+ The output shows `keyshot : imports ok` and 33 tools.
102
+
103
+ ## Use
104
+
105
+ 1. In KeyShot, open *Window > Scripting Console > Scripts*.
106
+ 2. Select `MCP start`, then click *Run*. The console shows `Pont KeyShot actif sur 127.0.0.1:1998`.
107
+ 3. In Claude Code, type `/mcp`. Make sure that `keyshot` is connected.
108
+ 4. Ask Claude, for example:
109
+ - "Show me the scene and list the materials."
110
+ - "Apply brushed aluminium to the cap, then make a 1920 × 1080 render."
111
+
112
+ To stop the bridge, run the script `MCP stop`, or close KeyShot.
113
+ To update the bridge, copy the new file, then use the tool `reload_bridge`.
114
+
115
+ ## Tools
116
+
117
+ | Group | Tools |
118
+ |---|---|
119
+ | Scene | `keyshot_status`, `get_scene_info`, `get_scene_tree`, `list_objects`, `set_visibility`, `screenshot`, `save_scene` |
120
+ | Cameras and environment | `list_cameras`, `set_camera`, `fit_camera`, `list_environments`, `set_environment`, `set_realtime` |
121
+ | Materials | `list_materials`, `get_material`, `list_library_materials`, `assign_material`, `set_material_parameter`, `rename_material`, `undo_material_changes`, `commit_material_changes`, `save_material_to_library` |
122
+ | Material graph | `add_material_node`, `connect_material_nodes`, `disconnect_material_input`, `remove_material_node` |
123
+ | Render | `render_image`, `render_status`, `wait_for_render`, `view_image` |
124
+ | Bridge | `lux_functions`, `reload_bridge`, `execute_python` (off by default) |
125
+
126
+ Two MCP prompts give Claude the method:
127
+
128
+ | Prompt | Use |
129
+ |---|---|
130
+ | `keyshot_strategy` | How to work in KeyShot without damage to the scene. |
131
+ | `keyshot_materiaux` | How to make materials from a CMF sheet (color, material, finish) or a description: physical values, colors, node recipes. |
132
+
133
+ Colors: `[r, g, b]` is linear (0-1). `#RRGGBB` is sRGB: the bridge changes it to linear.
134
+
135
+ ## Settings
136
+
137
+ Optional file: `%LOCALAPPDATA%\keyshot-mcp\pont-config.json`.
138
+
139
+ ```json
140
+ {"execute_python": false, "dossier_sorties": "C:\\path\\to\\outputs"}
141
+ ```
142
+
143
+ | Setting | Effect |
144
+ |---|---|
145
+ | `execute_python` | `true` enables the tool `execute_python`. The default is `false`. |
146
+ | `dossier_sorties` | Folder for screenshots, renders and scene backups. |
147
+ | `dossiers_textures` | List of more folders where the bridge can read texture images. KeyShot's texture library and `dossier_sorties` are always allowed. |
148
+ | `KEYSHOT_MCP_PORT` | Environment variable. Bridge port. The default is 1998. |
149
+ | `KEYSHOT_MCP_TIMEOUT` | Environment variable. Server timeout in seconds. The default is 60. |
150
+ | `KEYSHOT_MCP_EXECUTE_PYTHON` | Environment variable. `1` enables `execute_python`. |
151
+
152
+ The bridge writes `pont-actif.json` (port, token, KeyShot PID) and `pont.log` in the same folder.
153
+
154
+ ## Safety
155
+
156
+ - The bridge listens only on 127.0.0.1. Each request must have the token from `pont-actif.json`.
157
+ - `execute_python` is off. Only a local setting can enable it.
158
+ - The tools edit a material graph only on copies that the bridge made.
159
+ - `set_camera` does not discard a camera view that is not saved.
160
+ - `save_scene` keeps a copy of the old `.bip` file.
161
+
162
+ ## Tests
163
+
164
+ The tests use a fake `lux` module. KeyShot is not necessary.
165
+
166
+ ```
167
+ cd tests
168
+ py -3.13 test_pont.py
169
+ py -3.13 test_serveur_mcp.py
170
+ ```
171
+
172
+ `test_pont.py` has 85 tests for the bridge. `test_serveur_mcp.py` has 9 end-to-end tests. The `essai_*.py` files need an open KeyShot.
173
+
174
+ `test_serveur_mcp.py` starts the server with the Python that runs the test. If the packages in `libs` are for a different Python version, set `KEYSHOT_MCP_PYTHON` to the applicable `python.exe`.
175
+
176
+ ## Contribute
177
+
178
+ Read [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
179
+
180
+ ## Status
181
+
182
+ keyshot-mcp is a working prototype. It is tested with KeyShot Studio 2026.2 Pro on Windows.
183
+
184
+ - The bridge uses the KeyShot scripting API (`lux`). A new KeyShot version can change this API.
185
+ - KeyShot can add its own integration with Claude in a future version. This project can then stop.
186
+ - Feedback has priority over new features. Use the issue templates *Bug* and *Feedback*.
187
+
188
+ ## Disclaimer
189
+
190
+ keyshot-mcp is an independent project. It is not affiliated with Luxion or KeyShot, and so far Luxion does not endorse or sponsor it. KeyShot is a trademark of Luxion.
191
+
192
+ ## License
193
+
194
+ MIT
@@ -0,0 +1,175 @@
1
+ # keyshot-mcp
2
+
3
+ <!-- mcp-name: io.github.lfoletti/keyshot-mcp -->
4
+
5
+ Control an open KeyShot Studio 2026 window from Claude Code with the Model Context Protocol (MCP).
6
+
7
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
8
+ [![Status: prototype](https://img.shields.io/badge/status-prototype-orange.svg)](#status)
9
+ [![Tests](https://github.com/lfoletti/keyshot-mcp/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/lfoletti/keyshot-mcp/actions/workflows/tests.yml)
10
+ [![Release](https://img.shields.io/github/v/release/lfoletti/keyshot-mcp)](https://github.com/lfoletti/keyshot-mcp/releases)
11
+
12
+ > **Status: prototype.** The tools work and have tests, but the project depends on the scripting API of KeyShot, which can change. Tell us what you use and what fails: open an issue or a discussion.
13
+
14
+ ![Claude Code reads the KeyShot scene, changes the bottle glass three times, then undoes all the changes.](docs/demo.gif)
15
+
16
+ *The demo plays 3 times faster than real time.*
17
+
18
+ ```
19
+ Claude Code ⇄ MCP server keyshotmcp (Python 3.12, stdio)
20
+ ⇄ TCP 127.0.0.1:1998, 4-byte length + JSON, token
21
+ ⇄ MCP start.py (in KeyShot, timer on the UI thread)
22
+ ```
23
+
24
+ The bridge runs inside KeyShot. The server runs in Claude Code. They speak only on the local computer.
25
+
26
+ ## Requirements
27
+
28
+ | Item | Version |
29
+ |---|---|
30
+ | KeyShot Studio | 15.1 (2026) or later. Tested with 2026.2 Pro (15.1.2.7). |
31
+ | Python | 3.12 or later, Windows |
32
+ | `mcp` | 1.28.1 |
33
+ | Claude Code | any recent version |
34
+
35
+ ## Install
36
+
37
+ ### From PyPI
38
+
39
+ From version 1.1.0, `keyshot-mcp` is a Python package. With [uv](https://docs.astral.sh/uv/):
40
+
41
+ ```
42
+ uvx keyshot-mcp install-addin
43
+ claude mcp add keyshot -- uvx keyshot-mcp
44
+ ```
45
+
46
+ `install-addin` copies the two bridge scripts into `%PUBLIC%\Documents\KeyShot Studio\Scripts` (or the folder of `--dir`). Then restart KeyShot.
47
+
48
+ ### As a Claude Code plugin
49
+
50
+ From version 1.1.0, this repository is also a Claude Code marketplace. The plugin `keyshot` starts the server with `uvx`, so [uv](https://docs.astral.sh/uv/) must be installed.
51
+
52
+ ```
53
+ /plugin marketplace add lfoletti/keyshot-mcp
54
+ /plugin install keyshot@keyshot-mcp
55
+ ```
56
+
57
+ Then run `/keyshot-install-addin` once, and restart KeyShot.
58
+
59
+ ### From the release zip or the repository
60
+
61
+ Each release has `keyshot-mcp-<version>-windows.zip`, with `libs/` already filled. Unzip it, then go to step 3. Without the zip, start at step 1.
62
+
63
+ 1. Clone the repository:
64
+ ```
65
+ git clone https://github.com/lfoletti/keyshot-mcp.git
66
+ ```
67
+ 2. Install `mcp` in the `libs` folder. `run.py` loads it from there.
68
+ ```
69
+ py -3.12 -m pip install --target libs mcp==1.28.1
70
+ ```
71
+ 3. Copy `addin\Scripts\MCP start.py` and `MCP stop.py` to
72
+ `C:\Users\Public\Documents\KeyShot Studio\Scripts\`.
73
+ 4. Restart KeyShot. KeyShot reads the Scripts folder only when it starts.
74
+ 5. Add the server to Claude Code:
75
+ ```
76
+ claude mcp add keyshot -- py -3.12 -I -S C:\path\to\keyshot-mcp\run.py
77
+ ```
78
+ 6. Make sure the imports are correct:
79
+ ```
80
+ py -3.12 -I -S run.py --check
81
+ ```
82
+ The output shows `keyshot : imports ok` and 33 tools.
83
+
84
+ ## Use
85
+
86
+ 1. In KeyShot, open *Window > Scripting Console > Scripts*.
87
+ 2. Select `MCP start`, then click *Run*. The console shows `Pont KeyShot actif sur 127.0.0.1:1998`.
88
+ 3. In Claude Code, type `/mcp`. Make sure that `keyshot` is connected.
89
+ 4. Ask Claude, for example:
90
+ - "Show me the scene and list the materials."
91
+ - "Apply brushed aluminium to the cap, then make a 1920 × 1080 render."
92
+
93
+ To stop the bridge, run the script `MCP stop`, or close KeyShot.
94
+ To update the bridge, copy the new file, then use the tool `reload_bridge`.
95
+
96
+ ## Tools
97
+
98
+ | Group | Tools |
99
+ |---|---|
100
+ | Scene | `keyshot_status`, `get_scene_info`, `get_scene_tree`, `list_objects`, `set_visibility`, `screenshot`, `save_scene` |
101
+ | Cameras and environment | `list_cameras`, `set_camera`, `fit_camera`, `list_environments`, `set_environment`, `set_realtime` |
102
+ | Materials | `list_materials`, `get_material`, `list_library_materials`, `assign_material`, `set_material_parameter`, `rename_material`, `undo_material_changes`, `commit_material_changes`, `save_material_to_library` |
103
+ | Material graph | `add_material_node`, `connect_material_nodes`, `disconnect_material_input`, `remove_material_node` |
104
+ | Render | `render_image`, `render_status`, `wait_for_render`, `view_image` |
105
+ | Bridge | `lux_functions`, `reload_bridge`, `execute_python` (off by default) |
106
+
107
+ Two MCP prompts give Claude the method:
108
+
109
+ | Prompt | Use |
110
+ |---|---|
111
+ | `keyshot_strategy` | How to work in KeyShot without damage to the scene. |
112
+ | `keyshot_materiaux` | How to make materials from a CMF sheet (color, material, finish) or a description: physical values, colors, node recipes. |
113
+
114
+ Colors: `[r, g, b]` is linear (0-1). `#RRGGBB` is sRGB: the bridge changes it to linear.
115
+
116
+ ## Settings
117
+
118
+ Optional file: `%LOCALAPPDATA%\keyshot-mcp\pont-config.json`.
119
+
120
+ ```json
121
+ {"execute_python": false, "dossier_sorties": "C:\\path\\to\\outputs"}
122
+ ```
123
+
124
+ | Setting | Effect |
125
+ |---|---|
126
+ | `execute_python` | `true` enables the tool `execute_python`. The default is `false`. |
127
+ | `dossier_sorties` | Folder for screenshots, renders and scene backups. |
128
+ | `dossiers_textures` | List of more folders where the bridge can read texture images. KeyShot's texture library and `dossier_sorties` are always allowed. |
129
+ | `KEYSHOT_MCP_PORT` | Environment variable. Bridge port. The default is 1998. |
130
+ | `KEYSHOT_MCP_TIMEOUT` | Environment variable. Server timeout in seconds. The default is 60. |
131
+ | `KEYSHOT_MCP_EXECUTE_PYTHON` | Environment variable. `1` enables `execute_python`. |
132
+
133
+ The bridge writes `pont-actif.json` (port, token, KeyShot PID) and `pont.log` in the same folder.
134
+
135
+ ## Safety
136
+
137
+ - The bridge listens only on 127.0.0.1. Each request must have the token from `pont-actif.json`.
138
+ - `execute_python` is off. Only a local setting can enable it.
139
+ - The tools edit a material graph only on copies that the bridge made.
140
+ - `set_camera` does not discard a camera view that is not saved.
141
+ - `save_scene` keeps a copy of the old `.bip` file.
142
+
143
+ ## Tests
144
+
145
+ The tests use a fake `lux` module. KeyShot is not necessary.
146
+
147
+ ```
148
+ cd tests
149
+ py -3.13 test_pont.py
150
+ py -3.13 test_serveur_mcp.py
151
+ ```
152
+
153
+ `test_pont.py` has 85 tests for the bridge. `test_serveur_mcp.py` has 9 end-to-end tests. The `essai_*.py` files need an open KeyShot.
154
+
155
+ `test_serveur_mcp.py` starts the server with the Python that runs the test. If the packages in `libs` are for a different Python version, set `KEYSHOT_MCP_PYTHON` to the applicable `python.exe`.
156
+
157
+ ## Contribute
158
+
159
+ Read [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
160
+
161
+ ## Status
162
+
163
+ keyshot-mcp is a working prototype. It is tested with KeyShot Studio 2026.2 Pro on Windows.
164
+
165
+ - The bridge uses the KeyShot scripting API (`lux`). A new KeyShot version can change this API.
166
+ - KeyShot can add its own integration with Claude in a future version. This project can then stop.
167
+ - Feedback has priority over new features. Use the issue templates *Bug* and *Feedback*.
168
+
169
+ ## Disclaimer
170
+
171
+ keyshot-mcp is an independent project. It is not affiliated with Luxion or KeyShot, and so far Luxion does not endorse or sponsor it. KeyShot is a trademark of Luxion.
172
+
173
+ ## License
174
+
175
+ MIT