blender-optics-simulator — Claude Code MCP server
Connects a Blender optical bench simulation to coding agents over MCP. Useful for automated beam tracing, mirror alignment, and hardware layout.
claude mcp add --env OPTICS_BRIDGE_PORT=<OPTICS_BRIDGE_PORT> --env OPTICS_BRIDGE_HOST=<OPTICS_BRIDGE_HOST> --transport stdio blender-optics-simulator -- uvx blender-optics-mcpWhat blender-optics-simulator does
The server links Blender 4.2 LTS or 5.x to your AI assistant through a local JSON bridge. The simulation calculates ray paths, Gaussian propagation, polarization states, dispersion, and Fresnel losses. Users can place 35 component categories in 3D space, including lasers, waveplates, prisms, and sensors mounted on kinematic posts.
Instead of hallucinating coordinates, the agent inspects real scene geometry. Calling get_state() returns component poses, mechanical travel boundaries, and optical detector readouts. From there, the assistant adjusts kinematic knobs, steps mounts, and runs alignment routines directly.
A running Blender instance with the companion add-on is mandatory. If you do not activate the bridge under the integration panel inside Blender first, the MCP server fails to connect.
What it helps with
- inspect beam paths and detector metrics directly from an agent
- automate kinematic mount adjustments to minimize pointing error
- lay out multi-element optical benches inside Blender
- test polarization, dispersion, and interference effects programmatically
Example prompts for the agent
- Read the optical bench state from Blender and report the beam power at the detector.
- Adjust the kinematic mount on the first mirror to center the beam.
- Inspect the interferometer setup and check alignment residuals.
How to install blender-optics-simulator
Platform CLI
claude mcp add --env OPTICS_BRIDGE_PORT=<OPTICS_BRIDGE_PORT> --env OPTICS_BRIDGE_HOST=<OPTICS_BRIDGE_HOST> --transport stdio blender-optics-simulator -- uvx blender-optics-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from blender-optics-mcp <command>
Platform CLI
codex mcp add blender-optics-simulator --env OPTICS_BRIDGE_PORT=<OPTICS_BRIDGE_PORT> --env OPTICS_BRIDGE_HOST=<OPTICS_BRIDGE_HOST> -- uvx blender-optics-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from blender-optics-mcp <command>
Config file
{
"mcpServers": {
"blender-optics-simulator": {
"command": "uvx",
"args": [
"blender-optics-mcp"
],
"env": {
"OPTICS_BRIDGE_PORT": "<OPTICS_BRIDGE_PORT>",
"OPTICS_BRIDGE_HOST": "<OPTICS_BRIDGE_HOST>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from blender-optics-mcp <command>
Config file
{
"servers": {
"blender-optics-simulator": {
"type": "stdio",
"command": "uvx",
"args": [
"blender-optics-mcp"
],
"env": {
"OPTICS_BRIDGE_PORT": "<OPTICS_BRIDGE_PORT>",
"OPTICS_BRIDGE_HOST": "<OPTICS_BRIDGE_HOST>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from blender-optics-mcp <command>
Platform CLI
gemini mcp add -e OPTICS_BRIDGE_PORT=<OPTICS_BRIDGE_PORT> -e OPTICS_BRIDGE_HOST=<OPTICS_BRIDGE_HOST> blender-optics-simulator uvx blender-optics-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from blender-optics-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about blender-optics-simulator
How to install blender-optics-simulator in Claude Code?
Run claude mcp add blender-optics-simulator -- uvx blender-optics-mcp. If you run the bridge on custom network settings, add --env OPTICS_BRIDGE_PORT=<OPTICS_BRIDGE_PORT> and --env OPTICS_BRIDGE_HOST=<OPTICS_BRIDGE_HOST>.
What does blender-optics-simulator do?
It provides an MCP interface between coding agents and Blender optical setups. The agent can inspect ray paths, tweak physical mounts, and review sensor readings.
What prerequisites are needed before connecting?
You need Blender 4.2 LTS or 5.x with the simulation add-on installed. The local MCP bridge must be started from Blender's interface before your coding client can communicate with the bench.