# OraClaw

> OraClaw is a deterministic decision-intelligence MCP server for AI agents. It exposes 17 tools (11 free, 6 premium) that run real optimization, simulation, forecasting, bandit, graph, and risk algorithms over the Model Context Protocol — each returns structured JSON in under 25ms with no LLM/token cost. Use it when an agent needs a verifiable numerical answer (pick a variant, allocate under constraints, forecast a series, quantify uncertainty, rank graph nodes) instead of having the language model guess the math.

## Install

- npm (stdio MCP server): `npx -y @oraclaw/mcp-server`
- Claude config: add `{ "mcpServers": { "oraclaw": { "command": "npx", "args": ["-y", "@oraclaw/mcp-server"] } } }`
- Premium tools require the `ORACLAW_API_KEY` environment variable; the 11 free tools work without it (25 calls/day per IP).

## Free tools (no API key)

- `optimize_bandit` — pick the next option among variants with reward history (UCB1 / Thompson / epsilon-greedy)
- `optimize_contextual` — pick the best option given a per-call context vector (LinUCB)
- `optimize_evolve` — genetic algorithm for discrete / mixed / multi-objective search
- `solve_schedule` — assign tasks to energy-matched time slots
- `score_convergence` — score how much independent sources agree on a probability
- `score_calibration` — Brier and log score of predictions vs binary outcomes
- `predict_bayesian` — update a prior with weighted evidence (Beta posterior)
- `predict_ensemble` — fuse N model predictions into a consensus with uncertainty decomposition
- `plan_pathfind` — A* shortest / k-shortest path on a weighted graph
- `simulate_montecarlo` — sample one parametric distribution and return stats + percentiles
- `simulate_scenario` — compare what-if scenarios against a base case with a sensitivity ranking

## Premium tools (require ORACLAW_API_KEY)

- `optimize_cmaes` — CMA-ES continuous black-box optimization
- `solve_constraints` — LP / MIP / QP solver (HiGHS), provably optimal
- `analyze_graph` — PageRank, Louvain communities, critical path, bottlenecks
- `analyze_risk` — portfolio Value-at-Risk and Conditional VaR
- `predict_forecast` — ARIMA / Holt-Winters time-series forecast with confidence bands
- `detect_anomaly` — Z-score / IQR outlier detection

## Links

- Repo: https://github.com/Whatsonyourmind/oraclaw
- npm: https://www.npmjs.com/package/@oraclaw/mcp-server
- Live API health: https://oraclaw-api.onrender.com/api/v1/health
- Pricing / docs endpoint: https://oraclaw-api.onrender.com/api/v1/pricing
