+1
Daily
1,013
stars
92
forks
4
watchers
23
prs
3
issues
0
releases
README
COMSOL MCP Server
MCP Server for COMSOL Multiphysics simulation automation via AI agents.
English | 中文
Star History
Publication and Citation
The research paper describing COMSOL-MCP is available in Neurocomputing:
Naiyin Zhang and Junchao Wang, “COMSOL-MCP: An open-source model context protocol interface for AI-assisted multiphysics simulation,” Neurocomputing, vol. 703, article 134481, 2026.
Publisher page: ScienceDirect
If COMSOL-MCP contributes to your research, please cite the paper:
bibtex
@article{Zhang2026COMSOLMCP,
title = {COMSOL-MCP: An Open-Source Model Context Protocol Interface for AI-Assisted Multiphysics Simulation},
author = {Zhang, Naiyin and Wang, Junchao},
journal = {Neurocomputing},
volume = {703},
pages = {134481},
year = {2026},
doi = {10.1016/j.neucom.2026.134481},
url = {https://doi.org/10.1016/j.neucom.2026.134481}
}
Citation guidance
- Cite the paper when referring to the COMSOL-MCP method, architecture, capabilities, or evaluation.
- If you use or modify the software, cite both the paper and the repository. Use GitHub’s Cite this repository menu, which is backed by CITATION.cff.
- For reproducibility, identify the exact release tag or commit used and include the repository URL and access date in your data/code availability statement.
Project Goal
Build a complete COMSOL MCP Server enabling AI agents (like Claude, opencode) to perform multiphysics simulations through the MCP protocol:
1. Model Management - Create, load, save, version control
2. Geometry Building - Blocks, cylinders, spheres, boolean operations
3. Physics Configuration - Heat transfer, fluid flow, electrostatics, solid mechanics
4. Meshing & Solving - Auto mesh, stationary/time-dependent studies
5. Results Visualization - Evaluate expressions, export plots
6. Knowledge Integration - Embedded guides + PDF semantic search
Requirements
- COMSOL Multiphysics (version 5.x or 6.x)
- Python 3.10+ (NOT Windows Store version)
- Java runtime (required by MPh/COMSOL)
Installation
bash
Clone repository
git clone https://github.com/wjc9011/COMSOL_Multiphysics_MCP.git
cd COMSOL_Multiphysics_MCP
Install dependencies
python -m pip install -e .
Test server
python -m src.server
Building PDF Knowledge Base
bash
Install additional dependencies
pip install pymupdf chromadb sentence-transformers
Build knowledge base
python scripts/build_knowledge_base.py
Check status
python scripts/build_knowledge_base.py --status
Usage
Option 1: With opencode
Create opencode.json in project root:
json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"comsol": {
"type": "local",
"command": ["python", "-m", "src.server"],
"enabled": true,
"environment": {
"HF_ENDPOINT": "https://hf-mirror.com"
},
"timeout": 30000
}
}
}
Option 2: With Claude Desktop
json
{
"mcpServers": {
"comsol": {
"command": "python",
"args": ["-m", "src.s