Skip to main content
Glama
OFFTECH

gmsh-mcp-server

by OFFTECH

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GMSH_MCP_OPENFOAM_ENVNoJSON text describing the OpenFOAM environment, e.g., '{"mode":"wsl","distribution":"Ubuntu-24.04","bashrc":"/opt/openfoam13/etc/bashrc"}'.
GMSH_MCP_KNOWLEDGE_DIRNoDirectory to share the knowledge cache between workspaces.
GMSH_MCP_RUNTIME_CONFIGNoSelects the Gmsh runtime configuration. Can be 'wheel' for the default wheel baseline, or an absolute path to a .gmsh-runtime.json file for an explicit Gmsh 5 SDK.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
knowledge_statusA

Report documentation versions, provenance, availability and runtime mismatch warnings.

knowledge_searchB

Search manual, API, option, source, guide or capability documents; read hits by ID.

Search is local and bounded. A documented upstream function is not necessarily exposed as an executable MCP tool; consult the capability documents.

knowledge_readB

Read a bounded document excerpt with provenance and character-offset pagination.

knowledge_catalogB

List manual, api, option, source, guide or capability records with pagination.

mesh_grading_calculateA

Calculate structured geometric grading in metres. Supply length and at least two of cells, first_cell_height, growth_ratio (successive-cell ratio, not total expansion). strict rejects incompatible constraints. adjust_ratio preserves first height; adjust_first_height preserves ratio. Without cells, fitting selects the smallest integer count whose requested series spans length (at most 256). direction negative starts at the maximum-coordinate face. Returns cell heights, positions, actual adjustments and mesh_configure arguments; apply them then call mesh_generate. This calculation does not alter a session or generate a mesh by itself.

mesh_layer_planA

Plan one-sided geometric wall layers without modifying a model.

Supply first_cell_height plus at least two of cells, successive-cell growth_ratio and total thickness. strict rejects inconsistent inputs; adjust_ratio preserves the first height and count; adjust_first_height preserves count and ratio. Returned normalized heights are consumable by structured block extrusion. The result is a plan, not evidence that Gmsh created or validated the requested layers.

mesh_grading_two_sidedA

Plan ordered wall-to-wall cell heights over a fixed length.

The default resolves a shared ratio while preserving both wall heights. strict accepts compatible explicit ratios; adjust_first_height scales both wall heights. Odd counts require symmetric wall inputs and contain one centre cell. Returned node positions and normalized extrusion heights are exact planning data; no native mesh is changed or certified.

geometry_structured_blocksA

Construct connected planar quadrilateral blocks and extrude along +Z, in metres. Requires an empty session. parameters contains vertices {name:[x,y]}, edges {name:{kind:'line'|'circle_arc',vertices:[a,b],cells:n,progression:ratio, center:[cx,cy] for arcs}}, faces {name:{edges:[four signed edge names]}}, span, span_cells, and patches {name:[exterior edge names]}. Shared edges must agree on cell counts. Each edge optionally sets its successive-cell progression in its declared direction. Optional span_heights contains span_cells cumulative normalized heights ending at 1; use mesh_layer_plan or mesh_grading_two_sided to calculate them. Inlet/outlet cap and fluid groups are automatic. Then call mesh_generate. Counts are locked to this recipe; no automatic arbitrary CAD decomposition.

geometry_pipe_ohA

Build a straight internal pipe with square core and four curved blocks. The bore is centred at (0,0), extends from z=0 to length, and uses metres. Creates inlet/outlet (patch), wall (wall), and fluid automatically. First cell height controls spacing along radial block edges inward from the circular wall; it is not a guaranteed normal distance everywhere on a curved wall. circumferential_cells must be divisible by four. Requires an empty session, then mesh_generate; never falls back to tetrahedra. axial_heights optionally gives normalized cumulative axial layer endpoints.

mesh_inspectA

Read bounded node/connectivity pages and counts from the completed mesh. Retain expected_revision across pages; stale revisions fail instead of mixing different meshes. Limits are 1..1000. dimension=-1 includes all element types.

mesh_qualityA

Evaluate all volume cells, return quality statistics/histogram and worst failures. minSICN is dimensionless; minDetJac is a dimensional determinant, so choose its threshold for the model scale. This is Gmsh quality, not OpenFOAM checkMesh. Cells at or below threshold fail. The failure list is bounded; counts and coverage describe the complete mesh.

view_clipA

Clip the displayed model at a global coordinate plane in metres. positive retains coordinates >= position; negative retains <= position. enabled=False disables clipping. Affects only the live viewer, preserves camera and mesh revision, and persists through subsequent checkpoints.

system_capabilitiesA

Report the installed broker and optional native/OpenFOAM capabilities.

session_createC

Create a model session and its isolated Gmsh worker.

session_statusB

Read cached session and viewer state while meshing continues.

session_closeB

Close the owned viewer and model worker for a session.

job_getC

Poll a meshing job without waiting for the native mesher.

job_cancelC

Request cancellation of a meshing job.

geometry_applyC

Apply an ordered batch of supported OCC primitives, booleans and transforms.

geometry_external_cylinder_ohA

Build a conformal external-cylinder O-H template in an empty session, in metres. Cylinder centre is (0,0); x spans -upstream to length-upstream, y +/-width/2. Sixteen connected blocks are extruded from z=0 to span with ONE cell for quasi-2D. Names inlet/outlet (patch), cylinder (wall), farfield_top/bottom (symmetryPlane), front/back (empty), and fluid are assigned automatically. Cell counts and radial first-cell height are configured here; then call mesh_generate, mesh_export and openfoam_prepare. mesh_configure cannot override this template. To change its geometry or counts, create a new session. This is external flow, not a pipe bore.

geometry_inspectC

List bounded model entities and their geometry at the current revision.

patch_manageC

Name exterior surfaces and assign their OpenFOAM mesh patch type.

physical_volume_setC

Classify retained fluid volume cells with a named physical volume.

patch_validateB

Check named patch coverage before exporting a CFD mesh.

mesh_configureC

Set structured single-box hex controls; tetrahedral meshing is explicit.

mesh_generateC

Start a durable meshing job and return its job ID immediately.

mesh_exportC

Export classified first-order ASCII MSH 2.2 for OpenFOAM conversion.

view_openC

Launch the owned native Gmsh GUI and show latest validated checkpoint.

view_statusB

Read the GUI heartbeat, displayed revision and last snapshot load time.

view_closeB

Close the owned native viewer while preserving the model session.

view_captureB

Write an on-demand native PNG of the displayed checkpoint to session artifacts.

view_setA

Select a camera preset in the open Gmsh viewer without changing geometry or mesh. Front/back look from +Z/-Z, right/left from +X/-X, top/bottom from +Y/-Y. Isometric looks from (+X,+Y,+Z). fit=True uses orthographic projection and resets pan/zoom to frame the rotated model; fit=False preserves pan/zoom. The viewer must have a displayed checkpoint. This is a display change and does not increment the authoritative session revision.

openfoam_probeC

Probe the server-configured OpenFOAM distribution and converter commands.

openfoam_prepareC

Verify MSH2 cells, patch names, geometry and complete exterior face coverage.

openfoam_convertB

Convert a verified export into a new staged case and run checkMesh.

openfoam_inspectC

Audit stored polyMesh addressing, names, geometry and patch ranges.

Prompts

Interactive templates invoked by user choice

NameDescription
plan_structured_meshPlan a structured-first OpenFOAM mesh using versioned documentation and capability checks.
diagnose_openfoam_meshDiagnose an import or checkMesh failure using evidence and supported operations.
research_gmsh_capabilityResearch a Gmsh setting or function and establish whether this MCP can execute it.

Resources

Contextual data attached and managed by the client

NameDescription
knowledge_inventoryKnowledge versions, integrity status and instructions for missing upstream content.
meshing_guidesDiscover structured-first meshing and OpenFOAM workflow guidance.
implementation_coverageDiscover mappings of upstream functionality to implemented and missing MCP operations.
source_mapDiscover pinned upstream modules and source-symbol references.

TDQS

B3.2/5.0

Scored across 36 tools

Disambiguation4/5

Most tools target distinct resources or lifecycle stages, and the detailed descriptions delineate overlaps such as the mesh grading planners and patch validation versus OpenFOAM preparation. A few pairs, such as patch_validate/openfoam_prepare and physical_volume_set/patch_manage, have partially overlapping verification or classification purposes, but they remain separable.

Naming Consistency5/5

All tool names are lower snake_case with predictable domain prefixes such as knowledge_, mesh_, geometry_, session_, job_, view_, patch_, and openfoam_. Although the set is not uniformly verb_noun, the prefix-based convention is consistent across the server.

Tool Count2/5

36 tools is well above the suggested 3-15 range and crosses the 25+ 'too many' threshold. The Gmsh/OpenFOAM domain is complex, but the surface includes many specialized operations that could be consolidated for an agent.

Completeness5/5

The surface covers the full lifecycle: knowledge documents, session management, geometry construction/application/inspection, grading plans, mesh configuration/generation/inspection/quality/export, patch and physical classification/validation, OpenFOAM conversion/inspection, and viewer control. No obvious core operation is missing for the stated meshing-to-OpenFOAM-prep purpose.

Maintenance

ActivityMaintained
ResponsivenessNo issues