Skip to content

GeoDMS MCP server

MaartenHilferink edited this page Nov 29, 2026 · 1 revision

The GeoDMS MCP server gives an AI agent, such as Claude Code or Claude Desktop, GeoDMS as a set of tools: load a configuration, list its tree, describe an item, compute it and explain a value, without a shell and in restricted mode.

GeoDMS MCP server

geodms-mcp is a server of the Model Context Protocol (MCP), the protocol through which an AI agent calls tools. With it an agent works with GeoDMS configurations through typed tools instead of through a shell. It is the counterpart of the GeoDMS AI skills, which teach an agent that has a shell to run GeoDmsRun itself.

The server holds no engine of its own. Each tool call starts one GeoDmsRun of the installed GeoDMS, which loads the configuration again, and returns what that run reported. Every such run

  • runs in restricted mode: it runs no command line, so exec_ec fails, and it writes only in a LocalData folder of its own and in the export folder that the server was started with. That also holds for the storage of an item that the requested item depends on: such a call fails with a message that names the storage;
  • gets a LocalData folder of its own, which the server makes for the call and removes after it, so that no call sees what another call wrote there. The LocalDataProjDir lies inside it, whatever a config.ini beside the configuration names;
  • is held to a memory limit and a wall-clock limit, by default 8 GB and 300 s. On Windows the memory limit is the commit of the process, held by a job object; on Linux it is the resident memory. A call that reaches a limit is stopped and returns LIMIT(commit), LIMIT(memory) on Linux, or LIMIT(time).

Only configurations under the folders named with --config-root can be loaded. The server talks to its client over stdio and opens no network port.

tools

Tool Arguments What it returns
version the GeoDMS version that the server runs, its configuration folders, its export folder and its limits
load_config config whether the configuration loads, with the errors and warnings of loading it
list_items config, item (default /), depth (default 1) one record per item below item, down to depth levels: its path, kind, value type, domain unit, values unit, expression and the reason it failed, if it did
item_info config, item the record of one item, with its Source Description: the storages and items its value comes from
compute config, item the statistics of the item: count, minimum, maximum, sum, mean, number of nulls and the like, as on the Statistics detail page
explain_value config, item, index the Value Info page of one value of the item, as text: its expression and the values it was calculated from

config is the path of a .dms file, absolute or relative to the first configuration folder. An item path is written from the root of the configuration, which is not part of the path, as for GeoDmsRun: in container example { unit<uint32> Road { attribute<float64> flow; } } the attribute is /Road/flow.

Every result also carries exit_code, seconds, errors and warnings, from the run that produced it, and result with the limit when a limit stopped it.

installing

The server is the wheel geodms_mcp-<version>-py3-none-any.whl among the assets of a GeoDMS release, from version 20.30.0 on. It is pure Python, version 3.10 or later, and needs a GeoDMS of the same version, installed by its setup:

pip install geodms_mcp-20.30.0-py3-none-any.whl

pip installs the MCP Python SDK from PyPI with it. The command geodms-mcp then starts the server. It finds GeoDmsRun on the PATH, or else in the installation folder of the GeoDMS of its own version, such as C:\Program Files\ObjectVision\GeoDms20.30.0.m; --geodmsrun names another.

starting it from a client

In Claude Code:

claude mcp add geodms -- geodms-mcp --config-root C:/prj/mymodel --export-dir C:/LocalData/mymodel_export

In the configuration file of Claude Desktop, claude_desktop_config.json:

"mcpServers": {
  "geodms": {
    "command": "geodms-mcp",
    "args": ["--config-root", "C:/prj/mymodel", "--export-dir", "C:/LocalData/mymodel_export"]
  }
}
Option Meaning
--config-root <folder> a folder whose configurations may be loaded; required, and may be given more than once
--export-dir <folder> the folder that a configuration may write in, besides the LocalData folder of each call
--geodmsrun <exe> the GeoDmsRun to run
--work-dir <folder> where the folder of each call is made; by default geodms_mcp in the temporary folder
--max-commit-gb <n> the memory limit of each call in GB; 0 switches it off; 8 by default
--timeout-sec <n> the wall-clock limit of each call in seconds; 0 switches it off; 300 by default
--keep-work keep the folder of each call, with the log of its run, instead of removing it

source

The server is python/mcp/geodms_mcp in the GeoDMS repository. python/mcp/tests/test_stdio.py drives it over stdio, as a client does, and the release test of the setup runs it on the GeoDmsRun and examples/function.dms of the build. list_items and item_info read the JSON lines of GeoDmsRun's @list command (User Guide GeoDMS Run).

Clone this wiki locally