
本地MCP服务器,用于COMSOL建模工作流、验证和RAG辅助的多物理自动化。
概览
COMSOL 多物理 MCP 是 COMSOL 多物理工作流程的本地 MCP 服务器。它通过一个 MCP 接口展示了 COMSOL 自动化、桌面辅助、引导建模工作流、验证工具、结果提取和 RAG 辅助文档检索。 这是一个非官方的本地自动化项目。它与COMSOL AB没有任何关联、认可或支持。 - :通过 Python MPH 后端创建、加载、检查、保存和求解 COMSOL 模型。- :检查 COMSOL 桌面窗口,截图,使用 Java Shell 回退操作,并在 GUI 和 MPH 会话之间同步。- :参数、组件、几何、选择、材料、物理、边界、网格、研究、求解、绘图和导出结果。- :为常见多物理任务提供内置模板,提供下一步建议、步骤验证和模型完整性诊断。- :本地 ChromaDB 检索,可通过本地提供的 COMSOL 文档。
概述(AI 翻译)
COMSOL 多物理 MCP 是 COMSOL 多物理工作流程的本地 MCP 服务器。它通过一个 MCP 接口展示了 COMSOL 自动化、桌面辅助、引导建模工作流、验证工具、结果提取和 RAG 辅助文档检索。
中国文献:README.zh-CN.md
这是一个非官方的本地自动化项目。它与COMSOL AB没有任何关联、认可或支持。
特色
- COMSOL 自动化:通过 Python
mph后端创建、加载、检查、保存和求解 COMSOL 模型。 - 桌面辅助:检查COMSOL桌面窗口,截图,使用Java Shell的备援操作,并在GUI与
mph会话之间同步。 - 建模工具:参数、组件、几何、选择、材料、物理、边界、网格、研究、求解、绘图及导出结果。
- 引导式工作流程:常见多物理任务内置模板、下一步建议、步骤验证和模型完整性诊断。
- RAG 辅助建模:基于你本地提供的 COMSOL 文档进行本地 ChromaDB 检索。
- MCP 集成:适用于 Claude Desktop 及其他兼容 MCP 客户端的标准 MCP 服务器。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
COMSOL Multiphysics MCP
COMSOL Multiphysics MCP is a local MCP server for COMSOL Multiphysics workflows. It exposes COMSOL automation, Desktop assistance, guided modeling workflows, validation tools, result extraction, and RAG-assisted documentation retrieval through one MCP interface.
Chinese documentation: README.zh-CN.md
This is an unofficial local automation project. It is not affiliated with, endorsed by, or supported by COMSOL AB.
Features
- COMSOL automation: create, load, inspect, save, and solve COMSOL models through the Python
mphbackend. - Desktop assistance: inspect COMSOL Desktop windows, capture screenshots, use Java Shell fallback actions, and sync between GUI and
mphsessions. - Modeling tools: parameters, components, geometry, selections, materials, physics, boundaries, mesh, studies, solving, plots, and exported results.
- Guided workflows: built-in templates for common multiphysics tasks, next-step suggestions, step validation, and model completeness diagnostics.
- RAG-assisted modeling: local ChromaDB retrieval over COMSOL documentation that you provide locally.
- MCP integration: stdio MCP server for Claude Desktop and other MCP-compatible clients.
Repository Layout
.
├── src/comsol_agent_mcp/ # MCP server and core implementation
│ ├── server.py # FastMCP tool entrypoint
│ ├── config.py # Environment variables and local paths
│ ├── backends/ # mph and COMSOL Desktop backends
│ ├── tools/ # Modeling, solving, plotting, GUI tools
│ ├── workflows/ # Workflow templates and step manager
│ ├── validators/ # Model setup and result validation
│ ├── knowledge/ # Embedded docs and RAG retrieval
│ └── assistants/ # Natural-language modeling assistant
├── scripts/ # Knowledge-base utilities
├── tests/ # Automated tests
├── knowledge_base/ # Placeholder docs for the local RAG index
├── env.local.example # Local configuration template
├── start-comsol-mcp.cmd # Windows launcher
└── pyproject.toml # Python package metadata
Paths written as ./path/ are relative to the repository root.
Requirements
- Python 3.10 or newer.
- A licensed local COMSOL Multiphysics installation for
mphautomation. - Windows interactive desktop access if you want to use the GUI/Java Shell tools.
- Optional: local COMSOL PDF documentation and an embedding service key if you want to build the RAG knowledge base.
The GitHub repository does not include COMSOL, private licenses, .mph model files, generated simulation results, the author’s local Python environment, or a prebuilt vector database.
Installation
Clone or download the repository, then create your own Python environment from the repository root.
Windows PowerShell:
python -m venv .venv
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"comsol-multiphysics-mcp": {
"command": "<absolute-path-to-python>",
"args": ["-m", "comsol_agent_mcp.server"],
"cwd": "<absolute-path-to-repository>"
}
}
}