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_Storepayload (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_rollbackcross-checks our EVs against theMC_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 liveMC_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 existingMC_RiskProfile_Auto, then invoke + read them viaApplication.Run. - Phase 3: build/edit trees — write the model JSON into
_MC_Storeand 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fff5259e6ccbfd567572d86ab75e32d6d1dc142739ea601b7c3fce7277c845fa
|
|
| MD5 |
3b050909affe3390bdc737747db5e368
|
|
| BLAKE2b-256 |
a645ea46bc69229af348622a38fc5e76e7e394e86a12a35a91c1a8731f25f1c8
|
Provenance
The following attestation bundles were made for modelchoice_mcp-0.0.1.tar.gz:
Publisher:
release.yml on vosesoftware/modelchoice-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
modelchoice_mcp-0.0.1.tar.gz -
Subject digest:
fff5259e6ccbfd567572d86ab75e32d6d1dc142739ea601b7c3fce7277c845fa - Sigstore transparency entry: 1789324549
- Sigstore integration time:
-
Permalink:
vosesoftware/modelchoice-mcp@1eb0be1e26b30c1aff0e851972b9ab99bbd287e7 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/vosesoftware
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1eb0be1e26b30c1aff0e851972b9ab99bbd287e7 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4df9a9b523f646cb4ed72cf5e915910faaa4dac4cbf474203e088cd600d79415
|
|
| MD5 |
02e889b0290eb0c25b609ffb16d1328c
|
|
| BLAKE2b-256 |
46ed0f39765788a20f0926312f8ae3dce92aa9e4f5abd032f35aea0cc85451b7
|
Provenance
The following attestation bundles were made for modelchoice_mcp-0.0.1-py3-none-any.whl:
Publisher:
release.yml on vosesoftware/modelchoice-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
modelchoice_mcp-0.0.1-py3-none-any.whl -
Subject digest:
4df9a9b523f646cb4ed72cf5e915910faaa4dac4cbf474203e088cd600d79415 - Sigstore transparency entry: 1789324560
- Sigstore integration time:
-
Permalink:
vosesoftware/modelchoice-mcp@1eb0be1e26b30c1aff0e851972b9ab99bbd287e7 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/vosesoftware
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1eb0be1e26b30c1aff0e851972b9ab99bbd287e7 -
Trigger Event:
push
-
Statement type: