ZO

zym1998year/opticstudiomcpserver

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

31 stars 5 forks 质量 69 趋势 15MIT

修复了mcp连接zemax3秒超时自动崩溃的问题,zemax冷启动超过3秒导致mcp无法正常连接已修复,并且添加了实现光学系统的设计、分析与优化。本次新增四个工具:ExportAnalysisTool 支持 17 种分析类型的 BMP 图像及 TXT 数据导出,含二维数据网格的分析(PSF、波前图等)自动渲染为热力图;GeometricImageAnalysisTool 提供 25+...

概览

一个MCP(模型上下文协议)服务器,使AI助手能够与Zemax OpticStudio交互进行光学设计任务。支持、和(本地大型语言模型)。 - (必备 - OpticStudio 仅支持Windows) - (随Windows 10/11自带) - 持有有效许可证(任何最新版本)- 以下 AI 客户端之一:- Claude Code(大多数用户推荐)- 参见安装指南 - Claude Desktop(图形界面替代) - 参见安装指南 - Ollama(适用于本地/离线LLM使用) 1. 在Visual Studio或命令行中提供解决方案 2.将项目指向你的OpticStudio安装 3.自动设置Claude桌面和/或Claude代码 4.通过你的AI助手开始使用OpticStudio 打开开发者命令提示符或终端并运行: 或者在Visual Studio打开OpticStudioMCPServer.sln,然后构建解决方案(Ctrl+Shift+B)。

概述(AI 翻译)

一个MCP(模型上下文协议)服务器,使AI助手能够与Zemax OpticStudio交互进行光学设计任务。支持Claude Desktop、Claude Code和Ollama(本地大型语言模型)。

目录

  • 先决条件
  • 快速入门
  • 第一步:构建解决方案
  • 步骤2:修复二进制(配置ZOS-API路径)
  • 步骤3:配置您的AI客户端
  • Claude桌面设置
  • Claude 代码设置
  • Ollama 设置(本地大型语言模型)
  • 连接模式
  • 工具参考
  • 系统工具
  • 透镜数据工具
  • 分析工具
  • 优化工具
  • 受限优化工具
  • 配置工具
  • 系统设置工具
  • 玻璃目录工具
  • 资源
  • 提示
  • 示例工作流程
  • 项目结构
  • 故障排除
  • 许可证

先修条件

  • Windows(必备 - OpticStudio 仅支持 Windows)
  • .NET Framework 4.8(随 Windows 10/11 包含)
  • Zemax OpticStudio 持有有效许可证(任何最新版本)
  • 以下 AI 客户端之一:
  • Claude Code(大多数用户推荐使用)- 参见安装指南
  • Claude Desktop(图形界面替代方案)- 参见安装指南
  • Ollama(用于本地/离线大型语言模型)

快速启动

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

OpticStudio MCP Server

An MCP (Model Context Protocol) server that enables AI assistants to interact with Zemax OpticStudio for optical design tasks. Works with Claude Desktop, Claude Code, and Ollama (local LLMs).

Table of Contents


Prerequisites

  • Windows (required - OpticStudio is Windows-only)
  • .NET Framework 4.8 (included with Windows 10/11)
  • Zemax OpticStudio with a valid license (any recent version)
  • One of the following AI clients:

Quick Start

  1. Build the solution in Visual Studio or via command line
  2. Run FixBinaries to point the project at your OpticStudio installation
  3. Run ConfigureClaudeMCP to automatically set up Claude Desktop and/or Claude Code
  4. Start using OpticStudio through your AI assistant

Step 1: Build the Solution

Open a Developer Command Prompt or terminal and run:

cd C:\GIT\OpticStudioMCPServer
dotnet build

Or open OpticStudioMCPServer.sln in Visual Studio and build the solution (Ctrl+Shift+B).

This builds all projects:

  • ZemaxMCP.Server - The MCP server (main executable)
  • ZemaxMCP.Core - Core library (session management, models)
  • ZemaxMCP.Documentation - Operand reference database
  • FixBinaries - ZOS-API path configuration tool
  • ConfigureClaudeMCP - Claude Desktop/Code setup tool
  • ConfigureOllama - Ollama bridge setup tool
  • ZemaxMCP.OllamaBridge - Ollama-to-MCP bridge

Step 2: Fix Binaries (Configure ZOS-API Path)

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "zemax-mcp": { "command": "C:\\GIT\\OpticStudioMCPServer\\src\\ZemaxMCP.Server\\bin\\Debug\\net48\\ZemaxMCP.Server.exe", "args": [] } } }