Skip to main content
Glama
hicar-mcp

hicar-mcp

Official
by HICAR-Model

hicar-mcp

A Model Context Protocol (MCP) server that gives AI assistants structured, authoritative knowledge of the HICAR atmospheric model: every namelist option, the physics-scheme registry, the ~375-variable output catalog, the documentation, and the source code.

Point any MCP client (Claude Desktop, Claude Code, Cursor, …) at it and ask things like "what does the mp option do and what are its valid values?", "which microphysics schemes are supported?", "what units is pressure_i in?", "generate a minimal namelist using Morrison microphysics", or "where is the wind solver iterated?".

Install

pipx install "hicar-mcp[semantic]"      # recommended (isolated, with semantic search)
# or
uv tool install "hicar-mcp[semantic]"
# or, lightweight (no semantic search):
pip install hicar-mcp

The server ships with pre-extracted knowledge bundled in, so it works with zero configuration — you do not need a HICAR checkout or a compiled binary. Optional upgrades light up automatically (see Modes below).

Related MCP server: mcp-dalamud

Configure your MCP client

Claude Desktop / Cursor — add to the mcpServers block of the client config:

{
  "mcpServers": {
    "hicar": { "command": "hicar-mcp", "args": ["serve"] }
  }
}

Claude Code:

claude mcp add hicar -- hicar-mcp serve

To enable source-aware tools (code_search, find_symbol, read_source) and always-fresh metadata, point it at a HICAR checkout:

{ "mcpServers": { "hicar": {
    "command": "hicar-mcp", "args": ["serve"],
    "env": { "HICAR_REPO": "/abs/path/to/HICAR" } } } }

Modes & graceful degradation

Feature

Needs

Without it

Namelist / scheme / variable / docs lookup, static validation & generation

nothing (bundled)

—

code_search, find_symbol, read_source, live-fresh metadata

HICAR_REPO set (live mode)

source tools report how to enable

validate_namelist(use_binary=True), --gen-nml parity

a compiled HICAR (HICAR_BINARY or bin/HICAR)

static validation only

semantic_search

hicar-mcp[semantic] (local model, offline after first download)

falls back to lexical search

Higher-quality semantic (live rebuild)

hicar-mcp[api] + VOYAGE_API_KEY/OPENAI_API_KEY

local model

Run hicar-mcp doctor to see exactly what was discovered and what is degraded.

Tools

Namelist: list_namelist_groups, list_namelist_options, get_namelist_option, search_namelist_options, validate_namelist, generate_namelist_tool, explain_namelist. Schemes: list_physics_categories, get_physics_schemes, resolve_physics_scheme. Variables: list_model_variables, get_model_variable, search_model_variables. Examples: list_example_namelists, get_example_namelist, search_example_namelists. Docs: list_docs, get_doc, search_docs. Code: code_search, find_symbol, read_source, semantic_search. Diagnostics: server_status.

Resources (hicar://…) and guided prompts (configure_hicar_run, debug_namelist_error, explain_physics_choice) are also provided.

How the knowledge stays current

The bundled artifacts are regenerated from HICAR source by CI on each HICAR release (a workflow in the HICAR repo dispatches to this one). To regenerate locally:

hicar-mcp regenerate --repo /path/to/HICAR

MCP Registry

Published to the official MCP Registry as io.github.HICAR-Model/hicar-mcp. The line below lets the registry verify that this PyPI package and the registry entry have the same owner; do not remove it.

Available Tools

24 tools
explain_namelistA

Parse a namelist and annotate every option with its description, type, default and allowed values; flag any validation issues.

Inputs: content (required).

find_symbolB

Find Fortran symbols (module/subroutine/function/type) by name. Requires HICAR_REPO (live mode).

Inputs: name (required), kind.

generate_namelist_toolB

Generate a namelist ('full' or 'minimal') with optional physics scheme selections. With use_binary, delegate to HICAR --gen-nml instead.

Inputs: mp, sm, lsm, pbl, +7 more.

get_docC

Return a documentation page by file name or title.

Inputs: name (required).

get_example_namelistC

Return the contents of an example namelist.

Inputs: name (required).

get_model_variableA

Full metadata for a model variable (by netCDF name or kVARS member).

Inputs: name (required).

get_namelist_optionB

Full metadata for one namelist option: group, &block, type, default, allowed values, range, units and description.

Inputs: name (required).

get_physics_schemesA

List selectable schemes for a category (or selector like 'mp'), with codes, originating constants, and supported status.

Inputs: category (required). Returns: result

list_docsA

List HICAR documentation pages.

Inputs: no named parameters. Returns: result

list_example_namelistsB

List bundled example namelists.

Inputs: no named parameters. Returns: result

list_model_variablesB

List kVARS model/output variables (optionally substring-filtered).

Inputs: filter. Returns: result

list_namelist_groupsA

List HICAR namelist groups (&blocks) with option counts.

Inputs: no named parameters. Returns: result

list_namelist_optionsC

List namelist options, optionally filtered to one group.

Inputs: group. Returns: result

list_physics_categoriesA

List physics-scheme categories (microphysics, pbl, radiation, ...).

Inputs: no named parameters. Returns: result

read_sourceA

Read HICAR source by file path (repo-rooted, line range) or by symbol name. Requires HICAR_REPO (live mode).

Inputs: end, path, start, symbol.

resolve_physics_schemeC

Resolve a scheme name or integer code within a category.

Inputs: value (required), category (required).

search_docsC

Search the documentation (substring, with doc + line refs).

Inputs: query (required), max_results. Returns: result

search_example_namelistsC

Search example namelists for a substring.

Inputs: query (required). Returns: result

search_model_variablesA

Search model variables by name/standard_name/description.

Inputs: query (required). Returns: result

search_namelist_optionsB

Search namelist options by name/description (substring).

Inputs: query (required), group. Returns: result

server_statusA

Report server mode, discovered paths, artifact/HICAR version, and which optional features (binary, ripgrep, semantic) are active.

Inputs: no named parameters.

validate_namelistA

Validate a namelist string. Static checks always run (unknown groups/options, bad enum values, out-of-range, type/per-nest issues). If use_binary and a compiled HICAR is available, also run --check-nml.

Inputs: content (required), use_binary.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 24 tools

    Disambiguation4/5

    Each tool targets a distinct resource or action, with clear descriptions. The multiple search tools (code_search, search_docs, etc.) could be confused, but their descriptions specify different domains (source code vs. docs vs. model variables), reducing ambiguity.

    Naming Consistency3/5

    Tool names follow a verb_noun pattern, but there is inconsistency between 'get_' and 'list_' for related resources (e.g., get_model_variable vs. list_model_variables) and some names include 'tool' (generate_namelist_tool) or are noun_noun (server_status). Still, the pattern is mostly predictable.

    Tool Count4/5

    With 24 tools, the count is on the high side of reasonable, but it is justified by the complexity of the HICAR model domain, covering code, namelist, variables, physics, and documentation aspects without being excessive.

    Completeness4/5

    The tool set provides comprehensive coverage for namelist generation, validation, variable metadata, physics scheme resolution, documentation, and source code access. Minor gaps exist (e.g., no tool to modify source or run the model), but these are likely out of scope.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to navigate and query hierarchical documentation structures, supporting markdown files with YAML metadata and OpenAPI 3.x specifications. It features intelligent full-text search, metadata filtering, and a built-in web interface for both human and AI-driven documentation access.
      6
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Exposes the Dalamud plugin API documentation to AI assistants, enabling them to answer questions about services, types, and methods for writing FFXIV Dalamud plugins.
      11
      1
      -
    • F
      license
      Not graded
      quality
      C
      maintenance
      Provides AI assistants with offline, deterministic access to WindUI's structured metadata for component, theme, and icon lookup, enabling accurate UI generation without relying on the AI's internal training.
      1
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to query HITRAN molecular species and spectral lines, compute absorption and transmittance spectra using multiple line profiles, plot spectra, and retrieve partition functions, with data fetched live from HITRANonline via HAPI.
      2
      GPL 3.0