Skip to content

Configuration

The server and the worker read their settings from environment variables prefixed MCOPENFOAM_. List and dict values are JSON, such as MCOPENFOAM_MPI_ARGS='["--use-hwthread-cpus"]'. This table is generated from the settings model in the code.

Defaults that depend on the machine, such as host, uid and gid, show the value on the machine that built these docs.

Environment variableDefaultWhat it does
MCOPENFOAM_JOBS_DIR~/mcopenfoam/jobsdurable job directories (job.json, events.jsonl, the case copy); keep on a large volume, a fine sweep is about 18 GB
MCOPENFOAM_JOBS_HOST_DIRNonejobs_dir as the docker host sees it, when the server runs in a container
MCOPENFOAM_CASES_DIR~/mcopenfoam/casesstaged cases for submit_case(case_name=); default <jobs_dir>/../cases
MCOPENFOAM_CASES_HOST_DIRNonecases_dir as the docker host sees it, when the server runs in a container
MCOPENFOAM_HOSTrpm-bulletthis host's name: the queue jobs run on and the label in every event
MCOPENFOAM_EXECUTORdockerhow steps run; only docker is implemented
MCOPENFOAM_IMAGEopencfd/openfoam-default:2406OpenFOAM image each job container runs
MCOPENFOAM_PARAVIEW_IMAGEmcopenfoam-paraview:5.13.3headless ParaView image for figure rendering (deploy/paraview)
MCOPENFOAM_RANK_BUDGET20max MPI ranks one job may take on this host
MCOPENFOAM_MPI_ARGS[]extra mpirun flags, e.g. --use-hwthread-cpus when cores < ranks
MCOPENFOAM_AXIS_LABELSNonefigure orientation-marker words per body axis, keys +X -X +Y -Y +Z -Z, e.g. {"+X": "+X = CFD port"}; a case.json "axis_labels" entry overrides
MCOPENFOAM_QUEUE_URLNoneProcrastinate Postgres DSN; None uses the in-memory connector
MCOPENFOAM_WORKER_INPROCESStruerun the job worker inside the server (local stdio); false when a separate mcopenfoam-worker process serves the queue
MCOPENFOAM_TASKS_URLmemory://Docket backend for MCP Tasks
MCOPENFOAM_TRANSPORTstdioMCP transport
MCOPENFOAM_HTTP_HOST127.0.0.1bind address for the http transport
MCOPENFOAM_HTTP_PORT8372port for the http transport
MCOPENFOAM_UID1000user id job containers run as
MCOPENFOAM_GID1000group id job containers run as
MCOPENFOAM_WATCHER_INTERVAL_S5seconds between watcher samples while a solver runs
MCOPENFOAM_MESH_WATCHER_INTERVAL_S10seconds between watcher samples while meshing
MCOPENFOAM_PROGRESS_EVERY100solver iterations per progress event
MCOPENFOAM_WAIT_CAP_S85hard cap for wait_for and any blocking tool
MCOPENFOAM_INSTRUMENTATIONtruerecord tool calls and job events with fastmcp-feedback
MCOPENFOAM_INSTRUMENTATION_URLNoneSQLAlchemy async DSN for fastmcp-feedback (postgresql+asyncpg://...); None keeps SQLite at <jobs_dir>/calls.db
MCOPENFOAM_EMBEDDINGS_URLNoneOpenAI-compatible /v1 base URL; set to embed failure text for similar_failures (needs a Postgres instrumentation_url with pgvector)
MCOPENFOAM_EMBEDDINGS_API_KEYNonebearer token for embeddings_url
MCOPENFOAM_EMBEDDINGS_MODELmxbai-embed-largeembedding model name
MCOPENFOAM_EMBEDDINGS_DIM1024vector size the model returns
MCOPENFOAM_FOREIGN_GUARDtruehold a job while an OpenFOAM container this server did not start is running
MCOPENFOAM_FOREIGN_POLL_S30seconds between checks while a queued job is held
MCOPENFOAM_MIN_FREE_GB5hold a queued job while the jobs disk has less free space than this, and warn at submit; a solver that hits a full disk dies mid-write

The compose stack in deploy/ sets the container-specific ones (JOBS_DIR, JOBS_HOST_DIR, QUEUE_URL, INSTRUMENTATION_URL, WORKER_INPROCESS=false) from its own .env; see Run your own server.