API & MCP

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:

Open & unauthenticated. No key, no signup. Please be a good citizen: requests are rate-limited to 120 per minute per IP (a 429 past that). All computation is server-side and stateless nothing you send is stored.

REST API

Base URL http://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"]
  }'
FieldMeaning
methodtopsis · vikor · promethee · electre · waspas · copras · edas · fuzzy-topsis
matrixrows = alternatives, columns = criteria (shape must match the two name arrays)
directions"max" (higher is better) or "min", one per criterion
weightsone per criterion, non-negative, positive sum normalized server-side
paramsoptional 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": []
}

All endpoints

EndpointPurpose
POST /api/computerank alternatives + full trace
POST /api/sensitivityhow far each weight can move before the winner changes
POST /api/robustnessMonte-Carlo rank stability (extra noise, runs)
POST /api/weights/ahpAHP / fuzzy-AHP weights from a pairwise matrix
POST /api/weights/ahp-groupgroup AHP over 2 20 participant matrices
POST /api/weights/ahp-treehierarchical AHP (main groups + sub-criteria)
POST /api/weights/criticCRITIC objective weights from the data
POST /api/export · /api/export-pdfsame body → downloadable xlsx / PDF report
POST /api/parsemultipart file upload → parsed matrix

Validation errors return 422 with {"detail":{"message":"...","row":?,"column":?}}.

MCP server

The compute and weighting endpoints are exposed as an MCP server (streamable HTTP) at http://mcdmstudio.me/mcp, so an AI agent can rank decisions as tool calls.

Connect from Claude Code

claude mcp add --transport http mcdm https://mcdmstudio.me/mcp

Or in an MCP client config

{
  "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.

Interactive reference

Auto-generated OpenAPI schema and a try-it console are available at /docs (Swagger UI) and /openapi.json.