Skip to main content
Glama
README.md
# decisions-mcp

<!-- mcp-name: io.github.daniel-munoz/decisions-mcp -->

An MCP server that gives Claude Code a `decide` tool for quick, cheap
decisions that need no text generation: picking the next state of a workflow
from a known set of transitions, estimating how likely a claim is given some
facts, or rating something on a scale. It calls a *decision model* API, which
returns typed answers with probabilities, bills input tokens only, and is much
faster than a chat model.

Two backends are supported:

| Provider | Format | Endpoint |
|----------|--------|----------|
| `openai` | [OpenAI Decisions API](https://developers.openai.com/api/docs/guides/decisions) | `{base}/decisions` |
| `jev` | TypeSafe Jev, [native](https://docs.typesafe.ai/api) or via [OpenRouter](https://openrouter.ai/docs/guides/community/jev) | `https://api.typesafe.ai/v1/systemone` (given in full) or `{base}/alpha/decisions` |

Any gateway that speaks the OpenAI `/v1/decisions` format (for example an
internal LLM gateway) works with the `openai` provider.

**Data only goes to the base URL you configure.** There is no default URL and
no fallback to another provider. The server never logs evidence, questions,
answers or the API key.

## Install

Requires [uv](https://docs.astral.sh/uv/) (it fetches Python ≥ 3.11 if needed).
The package is on PyPI, so Claude Code can run it straight from there with
`uvx decisions-mcp`; nothing to clone. To run from a checkout instead:

```sh
git clone https://github.com/daniel-munoz/decisions-mcp.git && cd decisions-mcp
uv sync
```

and use `uv run --directory /path/to/decisions-mcp decisions-mcp` as the command
in the examples below.

## Configure

All settings are environment variables, set in the MCP server config (keep
the API key out of anything you commit):

| Variable | Required | Meaning |
|----------|----------|---------|
| `DECISIONS_PROVIDER` | yes | `openai` or `jev` |
| `DECISIONS_BASE_URL` | yes | No default. e.g. `https://api.openai.com/v1`, `https://api.typesafe.ai/v1/systemone`, `https://openrouter.ai/api` |
| `DECISIONS_API_KEY` | yes | Sent as `Authorization: Bearer <key>` |
| `DECISIONS_MODEL` | no | Default `gpt-6-luna` (openai) or `typesafe/jev-1.14` (jev, OpenRouter naming). Set `jev-latest` for TypeSafe's native API |
| `DECISIONS_TIMEOUT_SECONDS` | no | Default `30` |

If the configuration is missing or invalid, the server still starts and the
`decide` tool returns an error saying what to fix.

### Claude Code

Internal gateway (data stays inside the network):

```sh
claude mcp add decisions --scope user \
  -e DECISIONS_PROVIDER=openai \
  -e DECISIONS_BASE_URL=https://llm-gateway.internal.example/v1 \
  -e DECISIONS_API_KEY="$LLM_GATEWAY_API_KEY" \
  -- uvx decisions-mcp
```

OpenAI:

```sh
claude mcp add decisions --scope user \
  -e DECISIONS_PROVIDER=openai \
  -e DECISIONS_BASE_URL=https://api.openai.com/v1 \
  -e DECISIONS_API_KEY="$OPENAI_API_KEY" \
  -- uvx decisions-mcp
```

Jev, TypeSafe's native API:

```sh
claude mcp add decisions --scope user \
  -e DECISIONS_PROVIDER=jev \
  -e DECISIONS_BASE_URL=https://api.typesafe.ai/v1/systemone \
  -e DECISIONS_MODEL=jev-latest \
  -e DECISIONS_API_KEY="$JEV_API_KEY" \
  -- uvx decisions-mcp
```

Jev via OpenRouter (not yet tested against the live service):

```sh
claude mcp add decisions --scope user \
  -e DECISIONS_PROVIDER=jev \
  -e DECISIONS_BASE_URL=https://openrouter.ai/api \
  -e DECISIONS_API_KEY="$OPENROUTER_API_KEY" \
  -- uvx decisions-mcp
```

## The `decide` tool

Input: `evidence` (text or a JSON object) and a list of `questions`, each of
type `predicate` (yes/no), `choice` (pick one of `choices`) or `score` (one of
2–10 ordered `levels`). Output: answers keyed by question name, for example

```json
{
  "provider": "openai",
  "model": "gpt-6-luna",
  "answers": {
    "is_complaint": {"type": "predicate", "probability": 0.97},
    "topic": {"type": "choice", "choice": "billing", "confidence": 0.9,
              "probabilities": {"billing": 0.93, "delivery": 0.02, "account": 0.05}},
    "urgency": {"type": "score", "score": 1.7, "label": "high", "confidence": 0.6,
                "probabilities": {"low": 0.05, "medium": 0.2, "high": 0.75}}
  },
  "usage": {"input_tokens": 162}
}
```

The server tells Claude when the tool fits, how to write good questions and
options, and to fall back to its own judgment when answers are uncertain.

## Development

```sh
uv run pytest                    # tests (no network)
uv run python scripts/smoke.py   # one real call to the configured provider
```

Design and plan: `docs/superpowers/specs/` and `docs/superpowers/plans/`.

## License

MIT, see [LICENSE](LICENSE).

TDQS

A4.4/5.0

Scored across 1 tool

Disambiguation5/5

There is only one tool, so there is no possibility of misselection against a sibling tool. The three internal question types (predicate, choice, score) are clearly discriminated within the description, and the tool handles them through one uniformly shaped batch call.

Naming Consistency5/5

A single lowercase verb name `decide` matches the server's purpose (decisions-mcp) and reads as a clean action verb. The `name` field convention for individual questions (letters, digits, `_`, `-`) is also documented explicitly.

Tool Count4/5

The domain is a single stateless inference endpoint, so one tool is the honest surface rather than a thin wrapper hiding missing operations, and batching mitigates the one-call limit. It is slightly under-gunned only in that there is no introspection or capability/model-listing call.

Completeness4/5

The surface covers the stated purpose well: three question types plus batching cover most decision queries over evidence. Gaps are minor — no way to request rationales/explanations, no model or version metadata, and no calibration feedback loop.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues