simulate_stack
Reflectance and transmittance of any lossless multilayer over a wavelength range, at any angle, for s, p or averaged polarization. Each run reports its energy-conservation error.
Optics MCP · v0.1.0
Optics MCP gives Claude the Thin Film Lab engine. Describe the coating you need, Claude designs the layer stack, and the engine computes reflectance and checks the physics before you see the answer.
Example session in Claude
Tools
Every result carries its own physics check, so Claude never has to guess whether a number is right.
Reflectance and transmittance of any lossless multilayer over a wavelength range, at any angle, for s, p or averaged polarization. Each run reports its energy-conservation error.
A quarter-wave dielectric mirror for a target wavelength, with layer thicknesses and a check against the closed-form reflectance.
Runs the engine self-checks on demand: energy conservation, closed-form quarter-wave stacks and bare-glass Fresnel reflection.
Install
Optics MCP is a single file that runs locally with Node.js 18+ or Bun. Your designs never leave your machine.
$ curl -O https://optics.labskillz.com/optics-mcp.mjs
$ claude mcp add optics -- node "$(pwd)/optics-mcp.mjs"
Add this to claude_desktop_config.json and restart Claude.
{
"mcpServers": {
"optics": { "command": "node", "args": ["/path/to/optics-mcp.mjs"] }
}
}
Verification
The same transfer-matrix engine as thinfilmlab.org. These are the values verify_engine returns.
| Check | Max error | Result |
|---|---|---|
| Energy conservation, |R+T−1|, 0–70°, s and p, 400–800 nm | 3.0×10⁻¹⁵ | PASS |
| Quarter-wave stacks vs closed form, N = 1, 3, 5, 10 | 1.1×10⁻¹⁶ | PASS |
| Bare glass vs Fresnel equation | 0 | PASS |