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.0.tar.gz (9.5 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.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: criterium_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 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.0.tar.gz
Algorithm Hash digest
SHA256 a7821cfe575e3e5ee7db0b979b4f76dcfece03c93c905d9ebf50d1e34ed74fe7
MD5 e96401ba599db19747ab14196b084e77
BLAKE2b-256 fd1db3752814cfdd4286026b5e4b701ed8fa0637b2ccd7ecd4526500483de5e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: criterium_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3403fb459c6795e6d4d80ff613337d998e174dab096ba7f929da0cc162c61da0
MD5 2550661f3b3543dae847337975840916
BLAKE2b-256 9e11fb9a1a121bebd7a0297d68004a6ff4eb279074dc3917795bfc9073c88d1e

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