LensBench MCP
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| --root | Yes | Strict workspace sandbox root directory (e.g. D:/lens-projects). File reads and writes are confined to this path; E-PATH-ROOT blocks anything outside, including symlinks and '..'. | |
| --toolset | No | Context-friendly on-demand toolset. 'auto' pins 33 core tools and dynamically unlocks tolerancing, thermal defocus, ghost paths, ISO 10110 / GB 2D drawings, 3D STEP CAD and multi-physics study steps on demand. | auto |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
LensBench sequential optical lens design workbench (Zemax-compatible .lens DSL, ray tracing, MTF, tolerancing & optimization with ev-... evidence IDs). Install LensBench Desktop on Windows 10/11 (x64) to run calculations.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| openB | Open a .lens file or design folder as the active session. |
| newB | Create a new lens design from a template (singlet, cooke, blank) and open it. [Mutates design] |
| import_zmxB | Import a sequential Zemax .zmx file into .lens format and open it in the session. |
| export_zmxC | Export the active lens to Zemax .zmx. |
| showB | Display the lens prescription table (Lens Data Editor view). |
| checkB | Run full DSL, glass, build and thickness/clearance diagnostics. |
| lens_applyB | Apply one or more .lens DSL statements in a single call (preview with dry_run=true). [Mutates design] |
| setB | Modify parameters on a single optical surface (minimal edit preserving comments). [Mutates design] |
| paraxialC | Compute paraxial system data (EFFL, BFL, F/#, pupils, TOTR, cardinal points). |
| spotB | Compute RMS and geometric spot radii (µm) across fields and wavelengths. |
| mtfC | Compute polychromatic FFT MTF (tangential & sagittal) vs diffraction limit. |
| plotC | Render framed publication-grade figures (PNG/SVG/PDF) with evidence id. |
| spec_addC | Append acceptance specification ( |
| verifyB | Independently evaluate gating |
| optimizeB | Optimize active variables to minimize the merit function. [Mutates design] [Long-running] |
| find_toolsB | Search extended tools (tolerancing, thermal, ghost, housing, ISO 10110 drawings, STEP CAD) by stage or keyword. |
| run_toolC | Execute an extended tool discovered via find_tools. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 17 tools
Most tools target distinct optical-design actions such as creation, import/export, analysis, plotting, specification, and optimization. There is some overlap between `lens_apply` and `set` (both mutate design parameters), and `new` vs `open` both establish an active session, but the descriptions clarify the boundaries.
Names are readable and mostly lowercase, but they mix single verbs (`new`, `show`, `check`, `set`), verb_noun compounds (`import_zmx`, `find_tools`), and noun_verb compounds (`lens_apply`, `spec_add`). The inconsistent ordering and use of domain nouns rather than a uniform verb_noun pattern makes the convention only moderately predictable.
The server has 17 tools, which is somewhat heavy but justified by the broad optical-design workflow: creation, import/export, editing, diagnostics, analyses, specs, verification, optimization, and extended tools. Each tool maps to a reasonably distinct step rather than redundant functionality.
The surface covers the core lifecycle well: create/open/import, edit, inspect, analyze, add and verify specs, optimize, plot, and access extended domains like tolerancing via `find_tools`/`run_tool`. Minor lifecycle gaps such as explicit save/close or session-management operations remain, but core design workflows are well supported.