DecisionMatrix MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A transparent, **100% deterministic** Model Context Protocol (MCP)
server that gives LLM agents a reliable **multi-criteria decision analysis (MCDA)** engine.
Agents are great at gathering options but unreliable at *weighing* them: they lose
precision, apply inconsistent weights, and can't show their work. DecisionMatrix
offloads the scoring to an exact, explainable engine. You provide **options** and
**weighted criteria** (plus a score matrix); it returns a fully **scored, ranked, and
explained** result — with per-criterion breakdowns, the methodology used, the weights
applied, and a plain-language explanation.
Every number flows through decimal.js at
40-digit precision (**never floats**), so identical inputs always produce
**byte-identical output**. The server is **stateless** — no database, no sessions.
🌐 Live hosted server (free, no install)
A public remote MCP server runs on Cloudflare's edge — point any Streamable-HTTP
MCP client at it:
It runs in **open mode** on the free tier (no key, 15 calls/day per IP). Paid plans
(**Starter $12/mo · 5,000/day**, **Pro $39/mo · 50,000/day**) are live via Stripe
Checkout — buy a plan, get an API key instantly, and send it as X-API-Key. Self-host
for unlimited calls with no keys. Landing page + pricing: .
---
What it does
Six tools, all returning a uniform, agent-parseable envelope:
| Tool | Purpose |
|------|---------|
| create_decision | **Main tool.** Rank options against weighted criteria → winner, full ranking, per-criterion breakdowns, methodology, weights, and a plain-language explanation. |
| score_options | Return the full normalized scored matrix when scores are supplied separately. |
| sensitivity_analysis | Sweep each criterion's weight ±X% and report how robust the winner is (and where it flips). |
| compare_two | Head-to-head comparison of exactly two options with per-criterion win counts. |
| list_methods | Discovery: available scoring methods and when to use each. |
| health_check | Version, status, and capabilities. |
Scoring methods
| method | model | normalization | notes |
|--------|-------|---------------|-------|
| weighted_sum *(default)* | Simple Additive Weighting (SAW) | min-max per criterion | Most transparent; additive contributions. Handles negatives. |
| weighted_product | Weighted Product Model (WPM) | ratio (x/max, min/x) | Punishes any single weak criterion; **requires scores > 0**. |
| topsis | Closeness to ideal solution | vector (Euclidean) | 0–1 closeness coefficient; robust with many criteria. |
Each criterion has a **direction**: benefit (higher is better — quality, speed) or
cost (lower is better — price, latency, risk). Weights are **relative**; they are
normalized to sum to 1 internally.
Consistent response envelope
Every **successful** response contains: status, method, winner, ranking
(with per-criterion breakdown), methodology, weights_used, inputs_used,
notes, and a natural-language explanation.
**Errors never cross the tool boundary as exceptions** — they come back as a
structured, actionable envelope:
> **Design note — exact numbers:** score is a deterministically-rounded number (6 dp)
> for easy consumption; score_exact / raw_score are full-precision **strings** so no
> precision is lost in JSON. Rankings are computed on the exact values, with input order
> as a stable tie-break.
---
Project structure
**Separation of concerns:** engine.mjs is pure and transport-agnostic (import it
directly in tests or any Node/Deno/edge runtime); index.mjs only handles the MCP
JSON-RPC wiring, HTTP, CORS, and the auth/metering seam.
---
Requirements
* Node **18+** (for the build, tests, and local dev). Only two dev/runtime deps:
decimal.js (math) and esbuild (bundler).
* A Cloudflare account (free tier is fine) to deploy the hosted version.