Skip to main content

MCP Server for multi-criteria decision analysis (AHP, TOPSIS, Sensitivity, Decision Trees)

Project description

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

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

criterium_mcp-0.1.1.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

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

criterium_mcp-0.1.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file criterium_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: criterium_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for criterium_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d5ba12b815181298c9f4449e301cdd384a78b76e2e17d77491022cd33d42cf9a
MD5 285edc99cf91494efa753d8210aaa5cd
BLAKE2b-256 df37428a6cf54336f386ca7262eecf87006c9066aed06074abe9cf548858f0a8

See more details on using hashes here.

File details

Details for the file criterium_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: criterium_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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}

File hashes

Hashes for criterium_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f323db82d0d5e99776764f807748c1d8adfb99a534422026b98d594c060a9df8
MD5 76cf9c44cee8f8411841a8bf5d4dc38c
BLAKE2b-256 2f39017e84ca27d8793fbef0ad107d88d14640accf5822f36220b9695bc87fc5

See more details on using hashes here.

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