# OptiVibe

OptiVibe lets an AI agent work with Zemax OpticStudio designs through MCP. Use it to edit lenses, run analyses, or optimize an optical system from your coding agent.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 14
- Author: chuang44-tiff
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/chuang44-tiff/optivibe-mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/optivibe

## What it does

OptiVibe exposes typed tools for loading and changing lens data, running analyses, optimizing designs, and checking tolerances through the ZOS-API. The agent can use these operations without writing raw API calls. A separate reference component provides lookups for operands and glass, plus full-text search across the OpticStudio manual.

You need Windows, Zemax OpticStudio with a ZOS-API license, and Python 3.11+. The project was developed against OpticStudio 2025 R1; other versions have not been tested. Licensing matters at startup: the first engine open checks whether the API license is valid.

The PyPI setup builds reference data from your own OpticStudio installation and checks the install. The optional `[manual]` extra uses PyMuPDF to read the manual PDF. Run the data builder in a virtual environment or a user-level Python install, since it writes into the installed package directories.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add optivibe-mcp -- uvx optivibe-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from optivibe-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add optivibe -- uvx optivibe-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from optivibe-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "optivibe": {
            "command": "uvx",
            "args": [
                "optivibe-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from optivibe-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "optivibe": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "optivibe-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from optivibe-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add optivibe uvx optivibe-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from optivibe-mcp <command>

## When to use it
- load an optical design into OpticStudio
- change lens parameters through an agent
- run an analysis or optimize a lens design
- check tolerances for an optical system
- look up OpticStudio operands and glass

## Example prompts
- Load this optical design in OpticStudio and inspect its parameters.
- Optimize this lens design and report the analysis results.
- Search the OpticStudio manual for details about this operand.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74569
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
