COMSOL

Automates COMSOL multiphysics simulations via MCP with model, geometry, physics, mesh, study, and results management.
  • python

3

GitHub Stars

python

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "wjc9011-comsol_multiphysics_mcp": {
      "command": "python",
      "args": [
        "-m",
        "src.server"
      ],
      "env": {
        "HF_ENDPOINT": "https://hf-mirror.com"
      }
    }
  }
}

You can automate COMSOL Multiphysics simulations using the COMSOL MCP Server, enabling AI agents to manage models, geometry, physics, meshing, solving, and results through a unified protocol. This server-based workflow lets you run complex multiphysics studies with programmatic control and knowledge integration.

How to use

You connect an MCP client to the COMSOL MCP Server to perform actions such as creating models, building geometry, configuring physics, generating meshes, running studies, and evaluating results. You can use different client setups, such as a local operation with a Python-based server entry point or an external client like Claude Desktop or opencode, to run the server through standard Python module execution. Begin by starting the server in your environment and then issue commands from your MCP client to manage models, define materials and physics, create geometries, run studies, and fetch results. The server also supports embedded knowledge guides and PDF-based searches to assist with troubleshooting and best practices.

How to install

Prerequisites you need before installing the COMSOL MCP Server include the following: COMSOL Multiphysics (version 5.x or 6.x) is required, Python 3.10 or newer (not the Windows Store version), and Java runtime (needed by COMSOL). You will clone the project, install Python dependencies, and then start the server to begin using MCP.

Step-by-step commands you should run:

# Clone repository
git clone https://github.com/YOUR_USERNAME/comsol-mcp.git
cd comsol-mcp

# Install dependencies
python -m pip install -e .

# Test server
python -m src.server

Notes for local development and testing: ensure you have COMSOL installed and that Java is available in your system path. Use the Python entry point to start the MCP Server and verify the server responds to client requests.

Additional configurations and usage notes

Two typical client configurations are shown for connecting to the server locally and with an AI agent like opencode or Claude Desktop.

# Opencode configuration (local server)
{
  "mcp": {
    "comsol": {
      "type": "local",
      "command": ["python", "-m", "src.server"],
      "enabled": true,
      "environment": {
        "HF_ENDPOINT": "https://hf-mirror.com"
      },
      "timeout": 30000
    }
  }
}
# Claude Desktop configuration (local server)
{
  "mcpServers": {
    "comsol": {
      "command": "python",
      "args": ["-m", "src.server"],
      "cwd": "/path/to/comsol-mcp"
    }
  }
}

Modeling, resources, and knowledge integration

The server provides components for model management, geometry construction, physics configuration, meshing and solving, results evaluation, and embedded knowledge resources. You can manage model versions, build complex geometries using blocks, cylinders, spheres, and boolean operations, configure heat transfer, fluid dynamics, electrostatics, and solid mechanics, and export plots and datasets. Knowledge integration enables embedded guides and PDF-based semantic search to assist with setup and troubleshooting.

Available tools

Session tools

Manage the COMSOL session lifecycle including start, connect, disconnect, and status checks.

Model tools

Load, create, save, versioning, and inspect models.

Parameters tools

Access and sweep parameters, including setup and description management.

Geometry tools

Create and modify geometry sequences with blocks, cylinders, spheres, and booleans.

Physics tools

Configure physics interfaces, materials, and boundary conditions.

Mesh tools

Generate and inspect meshes for simulations.

Study tools

Create and run studies synchronously or asynchronously and monitor progress.

Results tools

Evaluate expressions, export data, and visualize results.

Knowledge tools

Access embedded guides and perform PDF document search.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational