Rank multi-criteria decisions from code or an AI agent. Same deterministic engines as the studio JSON in, JSON out.
Two ways in, one engine underneath:
/api/* what the studio itself uses./mcp the same operations as tools an LLM/agent can call.429 past that). All computation is
server-side and stateless nothing you send is stored.
Base URL http://www.mcdmstudio.me/. Every endpoint takes and returns JSON. The core call:
curl -sX POST https://mcdmstudio.me/api/compute \
-H "Content-Type: application/json" \
-d '{
"method": "topsis",
"matrix": [[250,16,12],[200,8,8],[300,32,16]],
"weights": [0.4, 0.3, 0.3],
"directions": ["min","max","max"],
"alternatives": ["A","B","C"],
"criteria": ["price","ram","storage"]
}'
| Field | Meaning |
|---|---|
method | topsis · vikor · promethee · electre · waspas · copras · edas · fuzzy-topsis |
matrix | rows = alternatives, columns = criteria (shape must match the two name arrays) |
directions | "max" (higher is better) or "min", one per criterion |
weights | one per criterion, non-negative, positive sum normalized server-side |
params | optional method knobs, e.g. {"lam":0.5} (WASPAS), {"v":0.5} (VIKOR), {"delta":0.1} (fuzzy-TOPSIS) |
Returns the ranking plus the full calculation trace:
{
"method": "topsis",
"ranking": [
{"rank": 1, "alternative": "C", "score": 0.7124},
{"rank": 2, "alternative": "A", "score": 0.3944},
{"rank": 3, "alternative": "B", "score": 0.2876}
],
"steps": [ {"title": "...", "rows": [...], "cols": [...], "data": [...]} ],
"warnings": []
}
| Endpoint | Purpose |
|---|---|
POST /api/compute | rank alternatives + full trace |
POST /api/sensitivity | how far each weight can move before the winner changes |
POST /api/robustness | Monte-Carlo rank stability (extra noise, runs) |
POST /api/weights/ahp | AHP / fuzzy-AHP weights from a pairwise matrix |
POST /api/weights/ahp-group | group AHP over 2 20 participant matrices |
POST /api/weights/ahp-tree | hierarchical AHP (main groups + sub-criteria) |
POST /api/weights/critic | CRITIC objective weights from the data |
POST /api/export · /api/export-pdf | same body → downloadable xlsx / PDF report |
POST /api/parse | multipart file upload → parsed matrix |
Validation errors return 422 with {"detail":{"message":"...","row":?,"column":?}}.
The compute and weighting endpoints are exposed as an MCP
server (streamable HTTP) at http://www.mcdmstudio.me/mcp, so an AI agent can rank decisions as tool calls.
claude mcp add --transport http mcdm https://mcdmstudio.me/mcp
{
"mcpServers": {
"mcdm": { "type": "http", "url": "https://mcdmstudio.me/mcp" }
}
}
Tools (arguments identical to the REST bodies above):
rank_alternatives, analyze_weight_sensitivity, analyze_robustness,
weights_ahp, weights_ahp_group, weights_ahp_tree, weights_critic.
File upload, narration and binary exports are intentionally not exposed over MCP.
Auto-generated OpenAPI schema and a try-it console are available at /docs (Swagger UI) and /openapi.json.