Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OPM_MCP_FLOW_BINNoBinary name / absolute WSL path for Flow.flow
OPM_MCP_LOG_TAILNoDefault line count for flow_log_tail.200
OPM_MCP_WORK_DIRNoWhere job logs and artefacts go.~/.opm-mcp (Win)
OPM_MCP_WSL_DISTRONoName of the WSL distro to run OPM in.Ubuntu-24.04
OPM_MCP_JOB_HISTORYNoHow many recent jobs to remember in-memory.50
OPM_MCP_FLOW_THREADSNo--threads-per-process default for runs.0 (auto)
OPM_MCP_RESINSIGHT_BINNoBinary name / absolute WSL path for ResInsight.ResInsight

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
opm_environmentA

Report which OPM binaries and Python bindings the server can reach.

Use this first when troubleshooting — it tells you whether wsl.exe is reachable, whether flow and ResInsight respond, and whether the python3-opm-common bindings import successfully inside the distro.

list_casesA

Scan a directory tree for simulation cases (.DATA decks and .SMSPEC results).

The session opener: returns case names, deck paths, whether results exist, and modification times (newest first).

to_wsl_pathA

Translate a Windows path to its WSL equivalent (C:\x/mnt/c/x).

to_windows_pathA

Translate a WSL path back to its Windows form.

validate_deckB

Parse an ECLIPSE/Flow DATA deck and report keyword counts + parser issues.

summarize_deckC

High-level deck summary: phases, units, grid dimensions, wells, schedule length.

list_wellsB

List wells declared in the deck at the first schedule step.

deck_textA

Numbered text slice of a deck (or one of its include files) — no WSL needed.

Decks are plain ASCII; use this instead of host-shell head/sed when a client misdetects .DATA as binary. file selects an include file by path or bare name (matched against the resolved INCLUDE tree).

deck_grepA

Regex search across a deck AND its resolved INCLUDE tree (PATHS-aware).

The deck-QC workhorse: deck_grep(deck, "^WCONPROD|^LIFTOPT", context=8) returns file, line number, and context for every keyword hit — including keywords that live in include files referenced via $ALIAS paths. Files larger than ~8 MB (bulk GRDECL arrays) are skipped and reported.

run_flowA

Start an OPM Flow simulation in the background; returns a job id immediately.

extra_args is a JSON array of flow flags, e.g. ["--enable-tuning=true"] — a plain string is also accepted and split shell-style. At most OPM_MCP_MAX_PARALLEL jobs run at once — extra submissions are state="queued" and launch automatically as slots free. By default writes INFOSTEP/INFOITER diagnostics so flow_convergence_report works (convergence_info="none" to skip). mpi_processes=N runs mpirun -np N for distributed solves.

flow_statusB

Check whether a Flow job is still running, with the latest progress line.

flow_log_tailA

Return the tail of a Flow job's combined stdout/stderr log.

grep (case-insensitive regex) filters the WHOLE log first and returns the last lines matching lines with line numbers — e.g. grep="will be shut|Problem:|Error:" extracts well-shut and solver events from a long run.

flow_cancelB

Cancel a running Flow job.

flow_jobsA

List recent Flow jobs known to this server.

list_summary_vectorsB

List summary vector keys in a case. Optional glob pattern (case-insensitive).

read_summaryB

Read one or more summary vectors as time series, downsampled to max_points.

keys is a JSON array (["FOPR", "WBHP:B-1H"]); a comma/space separated string is also accepted.

field_summaryB

Field-level KPIs: cumulative production/injection, pressure, final rates.

well_summaryC

Per-well KPIs: oil/gas/water rates, BHP, cumulative production.

grid_infoB

Static grid info: dimensions, active count, porosity/permeability stats.

restart_infoB

List report steps available in a UNRST file plus the keywords it contains.

compare_summariesA

Compare two cases on field totals (or supplied keys). Default = FOPT/FGPT/FWPT/FPR.

plot_summaryA

Plot summary vectors to a PNG, rendered inline in the chat.

Keys accept wildcards (WWCT:*, GOPR:*) as a JSON array; a comma/space separated string also works. Twin y-axis groups by engineering unit; x_axis is "date" or "days". No ResInsight/OpenGL needed — the fast path for rate/pressure/cumulative plots.

plot_property_mapA

I–J areal map of a grid property for one K layer, rendered inline.

Dynamic (PRESSURE/SWAT/SGAS/SOIL from UNRST at a report step, default last) or static (PORO/PERMX/NTG/PORV from INIT). Inactive cells blank; axes are 1-based I/J. The no-GL alternative to a ResInsight view for sweep/depletion QC.

material_balance_checkC

Field MB QC: OOIP, recovery factor, exact oil mass-balance drift, surface VRR.

flow_convergence_reportC

Solver performance from INFOSTEP/INFOITER: time by stage, wasted steps, worst steps.

restart_propertyC

Per-layer stats for a dynamic property (PRESSURE/SWAT/SGAS/SOIL) at a report step.

compare_to_observedB

History-match QC: misfit (RMSE/bias/MAE/NRMSE) of simulated vs observed data.

CSV: first column date (ISO), remaining headers are summary keys (WBHP:PROD, FOPR, ...); blank cells = no observation. Returns per-key stats and an inline sim-vs-obs overlay plot.

rft_dataA

RFT surveys (pressure vs depth at well connections) from CASE.RFT.

For perforation-pressure / gradient QC. Requires WRFTPLT in the deck's SCHEDULE section. Cell i/j/k are 1-based.

clone_deckA

Clone a deck with safe text overrides (append_before_end / replace_regex / set_title / insert_after_keyword).

Writes a NEW deck, reports per-op substitution counts, and re-validates. Idiomatic rate/BHP change: append a new WCONPROD/WCONINJE via append_before_end (last control in SCHEDULE wins).

resinsight_snapshotB

Render the default 3D view of a case in ResInsight and save a PNG snapshot.

resinsight_well_logC

Export an LAS well log for one well using ResInsight.

resinsight_openA

Open ResInsight as an interactive GUI (relies on WSLg). Returns immediately.

convert_eclB

Convert between formatted (F*) and unformatted ECL result files.

compare_eclC

Compare two ECL result files within tolerances using compareECL.

make_restart_deckA

Generate a restart (history -> prediction) deck via OPM's rst_deck.

Restarts base_deck from restart_case:report_step (see restart_info for available steps). Default mode "inline" produces one self-contained deck. Validate and run_flow the result for predictions.

pack_deckB

Flatten a deck and all its INCLUDEs into a single file using opmpack.

hash_deckA

Compute a deterministic hash of a deck using opmhash.

summary_toolC

Run the OPM summary CLI on a case (alternative summary reader).

upscaling_statusA

Detect whether the optional opm-upscaling binaries are available.

run_upscalingB

Run an opm-upscaling binary (upscale_perm, upscale_relperm, etc.) passthrough.

args is a JSON array; a plain string is also accepted and split shell-style.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.1/5.0

Scored across 40 tools

Disambiguation4/5

Most tools have a clear resource-action separation: deck tools, flow job tools, summary tools, and ResInsight tools are easy to tell apart. The main ambiguity is summary_tool vs read_summary/list_summary_vectors, and the cluster of result-reading/plotting tools could occasionally be confused.

Naming Consistency3/5

There are strong consistent clusters like flow_*, list_*, plot_*, compare_*, and resinsight_*, but the overall naming is mixed: validate_deck/summarize_deck/deck_text/deck_grep place deck inconsistently, and summary_tool/flow_convergence_report break the verb_noun pattern. The style is readable but not fully predictable.

Tool Count2/5

At 40 tools, the surface is well beyond the 25+ threshold for a heavy MCP server, even though the domain spans deck prep, simulation control, results analysis, plotting, restart, and upscaling. Many tools are individually useful, but the overall count creates a steep learning curve and likely too broad an API surface.

Completeness4/5

The set covers the core OPM workflow well: environment checks, path translation, deck validation/editing, simulation launch and monitoring, summary/grid/RFT access, history-match comparison, restart deck generation, and upscaling. Minor gaps include no direct case deletion/rename, limited schedule editing beyond clone_deck overrides, and no explicit cleanup/management of generated files or jobs.

Maintenance

ActivityMaintained
ResponsivenessNo issues