regional-ocean-debugger-mcp
MCP server that lets an LLM agent debug regional ocean (MOM6 + CESM) model runs by inspecting log/parameter/diagnostic files and querying an expert-interview knowledge base.
Log triage:
read_run_log(recent CESM/MOM6 log lines per component),find_errors(scan all logs for FATAL/ERROR/NaN/CFL/negative thickness/OOM),classify_error(match error text to known MOM6 failure modes with cause and fix suggestions).Parameter inspection:
read_mom6_params(MOM_input + MOM_override as KEY = VALUE, with overrides flagged),diff_params(side-by-side comparison of two cases),get_parameter_advice(expert guidance on a specific parameter).Stability checks:
check_cfl(sanity-check DT/DT_THERM vs. apparent resolution; caveat: no real grid dx/dy),suggest_timestep(recommended DT and DT_THERM for a given resolution).Diagnostics:
read_diag_table(parse enabled MOM6 diagnostics by module),suggest_diagnostics(recommend fields for symptoms like temperature drift, OBC instability, tidal mixing, BGC).Knowledge base search:
query_domain_knowledge(top-k expert Q&A pairs on OBC setup, tides, bathymetry, stability, BGC, grid design), backed by a keyword search over private interview transcripts.Resources:
ocean://case/{case_dir*}/params,ocean://case/{case_dir*}/errors,ocean://knowledge/indexfor direct URI access to the same data.Note: the README also lists
check_obc_forcing_status(CrocoDash OBC/IC/WW3/CICE forcing check) andread_cesm_timing(CESM timing/throughput summary), but neither appears in the supplied server schema.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@regional-ocean-debugger-mcp Find errors in my croc case logs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
regional-ocean-debugger-mcp
MCP server for debugging regional ocean (MOM6 + CESM) model runs.
Combines practical log analysis tools with a searchable knowledge base of expert interview transcripts, giving an LLM agent both the ability to inspect model output files and access to domain-expert guidance.
Tools
Tool | Purpose |
| Read recent CESM/MOM6 run log lines |
| Scan all logs for FATAL/NaN/CFL/etc. |
| Match error against known MOM6 failure modes |
| Check CrocoDash forcing outputs: OBC raw data + |
| Read MOM_input + MOM_override |
| Compare MOM_input between two cases |
| Evaluate CFL stability from MOM_input timestep settings |
| Recommend DT and DT_THERM for a given resolution |
| Parse enabled MOM6 diagnostics |
| Suggest useful diagnostics for a given problem |
| Search expert interview knowledge base |
| Look up guidance for a specific MOM6 parameter |
| Summarise CIME's |
Related MCP server: log-mcp
Resources
URI | Content |
| MOM_input + MOM_override as KEY = VALUE (same as |
| Error lines from the latest run's logs (same as |
| Summary of knowledge base contents |
{case_dir*} takes the case path as-is, slashes included, e.g.
ocean://case//glade/u/home/<user>/croc_cases/my_case/errors.
Knowledge Base
Domain knowledge comes from expert interviews on regional MOM6 modelling (private repo:
AidanJanney/RegionalOceanModelingInterviews). Topics include:
OBC setup, tidal forcing, bathymetry, stability, BGC, grid design, and regional ocean dynamics.
The transcripts are a git submodule in data/transcripts/. After cloning this repo:
git submodule update --init data/transcriptsSetup
pip install -e .
# with the transcripts submodule:
git submodule update --init data/transcriptsRunning
regional-ocean-debugger-mcp
# or
python server.pyAdd to .mcp.json:
{
"mcpServers": {
"ocean-debugger": {
"command": "python",
"args": ["/path/to/MCP_regional_ocean_debugger/server.py"]
}
}
}Design
Stateless: reads from the filesystem per call
No ML dependencies: knowledge search is keyword-based (fast, transparent, works without GPU)
Composable: use
find_errors→classify_error→query_domain_knowledgein sequence for triagePrivate data: transcripts submodule is private; do not make public without authorisation
CESM / MOM6 paths on Derecho
Cases: ~/croc_cases/
Run dir: the case's RUNDIR (default $CIME_OUTPUT_ROOT/$CASE/run, read from env_run.xml)
MOM_input: RUNDIR/MOM_input or <case_dir>/Buildconf/momconf/MOM_input
diag_table: RUNDIR/diag_table or <case_dir>/Buildconf/momconf/diag_table
Available Tools
11 toolscheck_cflA
Evaluate CFL stability condition for a MOM6 case.
Reads DT, DT_THERM, and resolution-related parameters from MOM_input. Compares against recommended safe values for the apparent resolution. Returns a stability assessment and flags potential violations.
Note: A full CFL check requires the actual grid file (dx, dy values). This tool uses MOM_input parameters as a proxy for a quick sanity check.
Inputs: case_dir (required). Returns: result
classify_errorA
Classify a MOM6/CESM error message and return probable cause and fix suggestions.
Pass a snippet of error text (e.g. from find_errors output) and get back a structured diagnosis. Matches against a library of known MOM6 failure modes.
Inputs: error_text (required). Returns: result
diff_paramsA
Compare MOM_input parameters between two CESM/MOM6 cases.
Returns parameters that differ, with values from both cases side by side. Useful for diagnosing why two configurations behave differently.
Inputs: case_dir_a (required), case_dir_b (required). Returns: result
find_errorsA
Scan all run logs in a CESM case for error indicators.
Searches for FATAL, ERROR, NaN, CFL violations, negative thickness, OOM, and similar. Returns a structured list of matches with filename, line number, and error type. Call classify_error() on the error text for probable cause and fix suggestions.
Inputs: case_dir (required). Returns: result
get_parameter_adviceA
Look up expert guidance for a specific MOM6 parameter name.
Searches the interview knowledge base for mentions of the parameter, along with context about what it does, typical values, and pitfalls.
param_name: MOM6 parameter name (e.g. 'DT', 'MINIMUM_DEPTH', 'OBC_SEGMENTS', 'SPONGE', 'TIDES', 'KD_MAX', 'KHTH').
Inputs: param_name (required). Returns: result
query_domain_knowledgeA
Search expert interview transcripts for scientific guidance on a question.
The knowledge base contains interviews with regional ocean modelling experts covering topics like: MOM6 configuration, OBC setup, tidal forcing, bathymetry, stability, BGC, grid design, known failure modes, and regional ocean dynamics.
Returns the top matching Q&A pairs from the expert interviews. top_k: number of results to return (default 5, max 10).
Inputs: question (required), top_k. Returns: result
read_diag_tableA
Read and parse the MOM6 diag_table from a CESM case.
Returns enabled diagnostics grouped by module/component. diag_table is typically in case_dir/run/ or case_dir/Buildconf/momconf/.
Inputs: case_dir (required). Returns: result
read_mom6_paramsA
Read MOM_input and MOM_override parameter files for a CESM/MOM6 case.
Returns all parameters as KEY = VALUE pairs. Pass filter to show only parameters containing that substring (e.g. 'DT', 'OBC', 'SPONGE'). MOM_override values take precedence and are marked with [override].
Inputs: case_dir (required), filter. Returns: result
read_run_logA
Return recent lines from a CESM or MOM6 run log.
component: 'cesm', 'ocn' (MOM6), 'atm', 'ice', 'rof', or 'all'. Searches case_dir and case_dir/run/ for log files. Returns the most recent match.
Inputs: case_dir (required), component, lines. Returns: result
suggest_diagnosticsA
Suggest useful MOM6 diagnostics to add to diag_table based on a description of the problem.
symptoms: describe what you're investigating (e.g. 'temperature drift', 'OBC instability', 'CFL violations', 'tidal mixing', 'BGC', 'mixed layer too shallow').
Returns a list of recommended diagnostic fields grouped by relevance.
Inputs: symptoms (required). Returns: result
suggest_timestepA
Suggest safe MOM6 timestep values (DT and DT_THERM) for a given grid resolution.
resolution_deg: approximate horizontal resolution in degrees (e.g. 0.1 for 1/10°). Returns recommended values with caveats about bathymetry and tidal forcing.
Inputs: resolution_deg (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool has a clearly distinct purpose, ranging from CFL checks to error classification, parameter comparison, and diagnostics suggestions. No two tools overlap in functionality.
All tool names follow a consistent verb_noun snake_case pattern (e.g., check_cfl, find_errors, suggest_diagnostics) with no deviations.
Eleven tools is an appropriate number for a specialized debugger, covering core tasks without being excessive or insufficient.
The tool set covers the main debugging workflow (error detection, classification, parameter analysis, diagnostics advice) but lacks a tool for direct parameter modification, which is a minor gap.
Related MCP Connectors
MCP server for the Fail Modes taxonomy — a knowledge base of AI system failure modes
MCP server for querying Forkast documentation
MCP observability: analyse MCP server usage, investigate sessions, and instrument MCP servers.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for intelligent log analysis providing semantic search, error pattern clustering, and smart error detection. It enables users to process, vectorize, and query local logs to efficiently identify issues and generate AI-powered summaries.MIT
- AlicenseAqualityDmaintenanceMCP server for log file analysis. Gives LLMs the ability to efficiently analyze large log files without loading them into context.7101MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for accessing SPEAR model output from various sources (AWS, STAC API, local) and integrating with AI assistants like Claude Desktop or a SPEAR Climate Chatbot.-
- FlicenseAqualityDmaintenanceMCP server for semantic log ingestion, hybrid retrieval, and cleanup, enabling natural-language querying of log files with dense+BM25 retrieval and full provenance.4-