criterium-mcp
Multi-criteria decision analysis tools for LLM agents via the Model Context Protocol (MCP).
Provides four complementary methods that share the same data model (criteria weights + alternative scores), letting the LLM orchestrate cross-validation:
| Method | What it does |
|---|---|
| AHP | Pairwise comparison → priority weights + consistency ratio (CR) |
| TOPSIS | Distance-to-ideal ranking (Euclidean in weighted space) |
| Sensitivity | Weight perturbation to find critical ranking transitions |
| Decision Tree | Sequential decisions with multi-criteria leaf outcomes |
Quick start
# Install from PyPI
uv tool install criterium-mcp
# Or run directly
uvx criterium-mcp
MCP configuration
Add to your MCP client config (e.g. claude_desktop_config.json, roo-code.json, etc.):
{
"mcpServers": {
"criterium": {
"command": "uvx",
"args": ["criterium-mcp"]
}
}
}
Tools
get_saaty_scale()
Returns the Saaty 1-9 scale reference table for pairwise comparisons.
compute_ahp_weights(pairwise_matrix)
Computes priority weights from an n×n pairwise comparison matrix using Saaty's eigenvector method. Reports:
- Weights: normalized priority vector (sum = 1)
- λ_max: principal eigenvalue
- CI: consistency index
- CR: consistency ratio (Saaty's RI table included)
- Consistent?: CR < 0.10 verdict
score_alternatives_ahp(weights, criteria_minimize, alternatives)
Scores and ranks alternatives using AHP weights with min-max normalization. Handles both maximize and minimize criteria (e.g. "cost" → minimize, "quality" → maximize).
evaluate_topsis(weights, criteria_minimize, alternatives)
TOPSIS ranking: finds the alternative closest to the ideal solution and farthest from the nadir. Provides an alternative perspective to the AHP weighted sum — if both methods agree, the decision is more robust.
sensitivity_analysis(base_weights, criteria_minimize, alternatives, steps=20)
Systematically varies each criterion weight from 0 to 1 and tracks ranking changes. Reports critical weight thresholds where the top alternative flips — essential for identifying fragile recommendations.
evaluate_decision_tree(tree, weights, criteria_minimize)
Evaluates a sequential decision tree where leaf outcomes are multi-criteria score vectors. Three node types:
- decision: you choose (maximize utility)
- chance: nature chooses (expected utility with probabilities)
- leaf: terminal outcome with per-criterion scores
Returns the optimal path and the full tree annotated with utilities at every node.
Development
git clone https://github.com/yohann/criterium-mcp
cd criterium-mcp
uv venv
source .venv/bin/activate
uv pip install -e .
criterium
License
MIT
Metadata
Release files for criterium-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| criterium_mcp-0.2.0.tar.gz | 10.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| criterium_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.3 kB
Release files / criterium_mcp-0.2.0.tar.gz
| Download URL | criterium_mcp-0.2.0.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f91be3a2facd037267e3d235a6365e654bd62a7185c53474083f2f837dc520de
|
|
BLAKE2b-256 checksum How to use checksums |
55523b0f29d7bdaae3792eaeebdb39f8edf42a6e21c5b2950532a5cfbdecd0de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / criterium_mcp-0.2.0-py3-none-any.whl
| Download URL | criterium_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29e86b003ed5103ba6444d6f390dcdf6908bf713fbd1ef80f5e0b07a2df4b220
|
|
BLAKE2b-256 checksum How to use checksums |
77d010c6e6c510bb548865e67788c75fa0d081c781125083b10ed763f03d445c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"44","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|