Skip to main content

An open Model Context Protocol server for Vose Software's ModelChoice decision-tree add-in for Excel.

Project description

ModelChoice MCP

An open Model Context Protocol server for Vose Software's ModelChoice — the decision-tree add-in for Excel.

A sibling to modelrisk-mcp: where that server brings Monte Carlo risk modelling into a conversation, this one brings decision analysis — building, reading, rolling back, and analysing decision trees in Excel.

Status: 0.0.1 — Phase 1 MCP server (read-only). Three tools (list_trees, get_tree, roll_up) over a proven read path. Building/analysis tools are on the roadmap below.

Tools

Tool What it does
list_trees List the decision trees in a workbook with node-type counts.
get_tree Full structure of one tree — decision / chance / terminal nodes, branches, probabilities, values.
roll_up Roll the tree back to its expected values and optimal policy — the decision recommendation, in plain English.
verify_rollback Cross-check our rollback against the MC_V_<id> cells ModelChoice itself wrote — a correctness guarantee when the tree has been rendered.

Run it: uv run python -m modelchoice_mcp (stdio), or wire modelchoice-mcp into Claude Desktop like any MCP server.

How it works

ModelChoice is a C# .NET (Excel-DNA) add-in. Unlike ModelRisk it exposes no COM object model and no compute worksheet functions — but it persists the entire decision tree as JSON in a very-hidden worksheet (_MC_Store), and the rollback logic is fully captured in that model. So this server can:

  • Read every tree in a workbook by reassembling the _MC_Store payload (chunked across columns, v2-envelope or v1-legacy format) and parsing the model JSON.
  • Roll back each tree to its expected values and optimal policy in pure Python — reproducing ModelChoice's own rollback (terminal payoff = accumulated branch values; chance = auto-normalized probability-weighted EV; decision = max/min by Maximize). No add-in needs to be loaded — it reads the saved model directly.

The Python roller is validated against ModelChoice's own authoritative C# test (Model_Validate_Compile_Rollback_Works): a decision/chance tree that rolls back to EV 50 with the optimal option selected — and matches exactly.

Roadmap

  • Phase 0 (done): the read + rollback engine — parse _MC_Store, reconstruct each tree, roll back to EV + optimal policy. Validated against ModelChoice's own C# rollback test.
  • Phase 1 (done): the MCP server — list_trees, get_tree, roll_up, proven live against a real workbook.
  • Phase 1b (done): verify_rollback cross-checks our EVs against the MC_V_<id> named ranges; CI (ruff + mypy + pytest) and a tag-driven PyPI release pipeline; wheel + sdist build. (First publish awaits a PyPI trusted-publisher; the live MC_V_ cross-check awaits a real rendered tree.)
  • Phase 2: drive analyses. ModelChoice's analyses (sensitivity, EVPI, EVII, strategy table, robustness) are currently UI/modal-dialog only; the clean path — since we own the source — is to add headless [ExcelCommand] entry points mirroring the existing MC_RiskProfile_Auto, then invoke + read them via Application.Run.
  • Phase 3: build/edit trees — write the model JSON into _MC_Store and trigger a re-render.

Architecture

A separate server that reuses the patterns proven in modelrisk-mcp (xlwings bridge, dry-run-by-default safety on any future writes, packaging, MCP-registry flow). Decision analysis and Monte Carlo are distinct domains, so they ship as distinct servers.

Development

uv sync --extra dev
uv run pytest        # parser/roller + store-format tests (no Excel needed)

MIT licensed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modelchoice_mcp-0.0.1.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

modelchoice_mcp-0.0.1-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file modelchoice_mcp-0.0.1.tar.gz.

File metadata

  • Download URL: modelchoice_mcp-0.0.1.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for modelchoice_mcp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fff5259e6ccbfd567572d86ab75e32d6d1dc142739ea601b7c3fce7277c845fa
MD5 3b050909affe3390bdc737747db5e368
BLAKE2b-256 a645ea46bc69229af348622a38fc5e76e7e394e86a12a35a91c1a8731f25f1c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for modelchoice_mcp-0.0.1.tar.gz:

Publisher: release.yml on vosesoftware/modelchoice-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modelchoice_mcp-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: modelchoice_mcp-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for modelchoice_mcp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4df9a9b523f646cb4ed72cf5e915910faaa4dac4cbf474203e088cd600d79415
MD5 02e889b0290eb0c25b609ffb16d1328c
BLAKE2b-256 46ed0f39765788a20f0926312f8ae3dce92aa9e4f5abd032f35aea0cc85451b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for modelchoice_mcp-0.0.1-py3-none-any.whl:

Publisher: release.yml on vosesoftware/modelchoice-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page