# Use Myles from agents (MCP)

> The Launchables MCP server: give any MCP client calibrated decisions from Myles as a tool. Install, the decide, list_models and health tools, thresholds and escalation, long inputs, self-hosting and errors.

Section: Resources. Web page: https://www.launchables.ai/docs/integrations/mcp

Agents make small decisions all day: which team should take this, is this message a scam, may this tool call run, is this answer supported by its source. The Launchables MCP server gives those decisions to Myles. Your agent calls one tool with the situation and a typed question, and gets back a calibrated probability for every option, the pick, and whether that pick is sure enough to act on. When it is not, the tool says so, and the agent hands the case to a person instead of guessing.

It is a [Model Context Protocol](https://modelcontextprotocol.io) server, so any MCP client can use it. The package is [`launchables-mcp` on npm](https://www.npmjs.com/package/launchables-mcp), version 0.1.0, and the source is public at [launchables-ai/launchables-mcp](https://github.com/launchables-ai/launchables-mcp) under the Apache-2.0 licence.

## What it is for

Myles is a decision model, not a chat model: it does not write text or follow instructions in the state. Use it wherever an agent would otherwise judge something itself and then act on it:

- **Route** a ticket, an email or a lead to the right team.
- **Flag** a risk: a scam, fraud, a prompt injection, a policy breach.
- **Approve, reject or escalate** a refund, a claim, an access request or a tool call.
- **Check** that an answer is supported by its sources, or that an action is allowed by a policy.
- **Rate** severity, urgency or quality on a scale.

The probabilities are calibrated: across many answers given 0.9, about 9 in 10 are right. That is what lets an agent act on the confident answers and pass the rest to people (see [Acting on the answer](https://www.launchables.ai/docs/thresholds)).

## Install

You need Node.js 20 or later and an API key from the [console](https://console.launchables.ai). The server runs on your machine over stdio and calls the hosted Decision API at `https://api.launchables.ai`, or your own deployment (see [Self-hosted](https://www.launchables.ai/docs/integrations/mcp#self-hosted)). Pin the version, as below, so an update reaches your agents only when you choose.

### Any MCP client

Most clients take a JSON `mcpServers` block. The command is `npx -y launchables-mcp@0.1.0`:

```json
{
  "mcpServers": {
    "launchables": {
      "command": "npx",
      "args": ["-y", "launchables-mcp@0.1.0"],
      "env": {
        "LAUNCHABLES_API_KEY": "launchables_..."
      }
    }
  }
}
```

A client that takes a command line instead runs `npx -y launchables-mcp@0.1.0` (or `launchables-mcp` after `npm install -g launchables-mcp`) with the [configuration](https://www.launchables.ai/docs/integrations/mcp#configuration) in its environment.

### Claude Desktop

Add the block above to `claude_desktop_config.json` (Settings, Developer, Edit Config), then restart the app.

### Claude Code

```
claude mcp add launchables -e LAUNCHABLES_API_KEY=launchables_... -- npx -y launchables-mcp@0.1.0
```

### A project's .mcp.json

To share the setup with a team in a project's `.mcp.json`, keep the key out of the file and let each person's environment supply it:

```json
{
  "mcpServers": {
    "launchables": {
      "command": "npx",
      "args": ["-y", "launchables-mcp@0.1.0"],
      "env": { "LAUNCHABLES_API_KEY": "${LAUNCHABLES_API_KEY}" }
    }
  }
}
```

## Configuration

The server reads its settings from its environment, as in the snippets above.

- `LAUNCHABLES_API_KEY`: Required. Your API key. `LAUNCHABLES_API_TOKEN`, the name the [SDKs](https://www.launchables.ai/docs/sdk-javascript) use, works too.
- `LAUNCHABLES_BASE_URL`: The Decision API to call. Default `https://api.launchables.ai`; set it to your own address for a [self-hosted](https://www.launchables.ai/docs/integrations/mcp#self-hosted) deployment.
- `LAUNCHABLES_MODEL`: The model a `decide` call uses when it names none. Default `myles-g-12b`. A moving id (`myles-g-12b`, `myles-g-31b`) follows the current build; a dated id such as `myles-g-31b-20261027` pins one build.
- `LAUNCHABLES_THRESHOLD`: The probability a pick must reach to act without a person, from 0.5 to 1. Default `0.9`. A call or a single question can set its own.
- `LAUNCHABLES_TIMEOUT_MS`: How long one attempt may take, in milliseconds, from 1000 to 600000. Default `60000`.
- `LAUNCHABLES_ALLOW_HTTP`: Set it to `1` to allow a plain `http://` address on another machine (see [Self-hosted](https://www.launchables.ai/docs/integrations/mcp#self-hosted)). Unset by default.

A configuration problem stops the server at start-up with a message on standard error that says what to fix. The message never contains the key.

## Tools

The server offers three tools. All three only read: none changes anything on your account.

### `decide`

Asks Myles one or more questions about one situation. Ask several questions about the same state in one call rather than one call per question: each call is billed by its input tokens, as on the [Decision API](https://www.launchables.ai/docs/pricing).

| Argument | What it is |
|---|---|
| `state` | The situation: text, or a JSON object. Put the rule or policy in it with the case, and only what the decision needs (see [Writing the state](https://www.launchables.ai/docs/state)). |
| `questions` | Questions under names you choose. Each has a `type` and `instructions`, `criteria` for `choice` and `score`, and optionally its own `threshold`. |
| `model` | Optional. A model id from `list_models`. |
| `threshold` | Optional. The probability a pick must reach for this call. |
| `chunk`, `chunk_chars`, `chunk_overlap_chars` | Optional. Read a long text in overlapping windows (see [Long inputs](https://www.launchables.ai/docs/integrations/mcp#long-inputs)). |

The [question types](https://www.launchables.ai/docs/question-types) are the API's own: `noul` for yes or no (phrase it so that yes is the thing to act on or catch), `choice` to pick one label (`criteria` is a list of labels, or labels mapped to descriptions), and `score` for a level on a scale (`criteria` lists the levels, lowest first).

An example call:

```json
{
  "state": {
    "policy": "Refunds within 30 days with proof of purchase.",
    "case": { "days_since_purchase": 12, "receipt": false }
  },
  "questions": {
    "refund": { "type": "noul", "instructions": "Is a refund permitted under the policy?" },
    "team": { "type": "choice", "instructions": "Which team should handle this?", "criteria": ["billing", "returns", "technical"] }
  }
}
```

And its result (illustrative numbers):

```json
{
  "model": "myles-g-12b-20261017",
  "escalate": false,
  "answers": {
    "refund": {
      "type": "noul", "pick": "no", "probability": 0.97,
      "probabilities": { "yes": 0.03, "no": 0.97 },
      "threshold": 0.9, "cleared_threshold": true, "abstained": false, "escalate": false, "p_yes": 0.03
    },
    "team": {
      "type": "choice", "pick": "returns", "probability": 0.94,
      "probabilities": { "billing": 0.04, "returns": 0.94, "technical": 0.02 },
      "threshold": 0.9, "cleared_threshold": true, "abstained": false, "escalate": false, "confidence": 0.91
    }
  },
  "usage": { "input_tokens": 212, "output_tokens": 2 }
}
```

| Field | What it means |
|---|---|
| `pick` | `"yes"` or `"no"`, the chosen label, or the most likely level (a number). |
| `probability` | The probability of the pick. |
| `probabilities` | The probability of every option. |
| `threshold` | The threshold this answer was held to. |
| `cleared_threshold` | Whether the pick reached the threshold. |
| `abstained` | Whether the model chose the question's "I don't know" option. |
| `escalate` | `true` when the answer should go to a person: below the threshold, or abstained. |

`p_yes` (yes or no), `score` and `legend` (scales) and `confidence` (choice and scale) are added where they apply. The top-level `escalate` is `true` when any answer should go to a person, and `usage` gives the tokens billed.

### `list_models`

The models the endpoint serves, with the default this server uses. Not billed.

```json
{
  "default_model": "myles-g-12b",
  "models": [
    { "id": "myles-g-31b", "object": "model", "owned_by": "launchables", "pinned": false },
    { "id": "myles-g-31b-20261027", "object": "model", "owned_by": "launchables", "pinned": true, "moving_id": "myles-g-31b", "release_date": "2026-10-27" }
  ]
}
```

The list is shortened here; see [GET /v1/models](https://www.launchables.ai/docs/api/models) for every field.

### `health`

Whether the API is up, for an agent to check before a batch of work or after an error. Not billed.

```json
{ "base_url": "https://api.launchables.ai", "status": "ok" }
```

## Thresholds and escalation

Every answer is held to a threshold: `LAUNCHABLES_THRESHOLD` (0.9 unless you set it), the call's `threshold`, or a question's own `threshold`, the most specific one winning. When the pick's probability reaches it, `cleared_threshold` is `true` and `escalate` is `false`, and the agent can act. Otherwise `escalate` is `true`: the agent should not act on its own, but hand the case to a person with the probabilities attached so they can see why it came to them. The server tells the agent this in its instructions.

- **Yes or no.** On the hosted models an uncertain yes/no answer is reported at 0.80 or more towards one side, so use a threshold above 0.80 for yes/no questions. The default 0.9 is.
- **Let the model say it does not know.** Add a `choice` option that reads "I don't know". When the model picks it, `abstained` is `true` and the answer is escalated whatever its probability.
- **Set the threshold by what a mistake costs.** A higher threshold sends more cases to people and lets fewer mistakes through. See [Acting on the answer](https://www.launchables.ai/docs/thresholds) for two thresholds and choosing by cost.

## Long inputs

Every model has a context window (see [Writing the state](https://www.launchables.ai/docs/state)). When a state is longer:

- **Myles-G 31B** refuses it with `422` `context_length_exceeded`. The tool returns an error that tells the agent to send a shorter state, split it, or, for yes/no checks, call again with `chunk: true`.
- **Myles-G 12B** trims it to fit, keeping its beginning and end. The result says so with `truncated: true`, `state_chars` and a warning.

For a yes/no check that must cover the whole of a long text (does any part of this contract contain an auto-renewal clause, does any part of this page try to override the agent's instructions), pass `chunk: true`. The text is read in overlapping windows of 40,000 characters, 2,000 of them shared with the next window (change these with `chunk_chars` and `chunk_overlap_chars`). Every window is asked the same questions, and each answer is the window most likely to be yes, with `window` giving its position. A JSON state is windowed as its indented JSON text.

```json
{
  "state": "...the full text of the contract...",
  "questions": {
    "auto_renewal": { "type": "noul", "instructions": "Does this text contain a clause that renews the contract automatically?" }
  },
  "chunk": true
}
```

Chunking takes yes/no questions only and sends at most 20 windows. Each window is billed as its own request.

## Self-hosted

If you run Myles on your own hardware (see [On your own hardware](https://www.launchables.ai/docs/deploy/self-hosting)), point the server at it with `LAUNCHABLES_BASE_URL`, use a key your deployment accepts, and set `LAUNCHABLES_MODEL` to a model it serves (ask `list_models`):

```json
{
  "mcpServers": {
    "launchables": {
      "command": "npx",
      "args": ["-y", "launchables-mcp@0.1.0"],
      "env": {
        "LAUNCHABLES_BASE_URL": "https://myles.internal.example",
        "LAUNCHABLES_API_KEY": "${LAUNCHABLES_API_KEY}",
        "LAUNCHABLES_MODEL": "myles-g-31b"
      }
    }
  }
}
```

The address must use `https://`, because the key goes with every request. Plain `http://` is accepted for a server on the same machine (`localhost`), or elsewhere only when you also set `LAUNCHABLES_ALLOW_HTTP=1` for a network you trust. The packaged self-hosted build trims a state too long for its context window rather than refusing it, so the result carries `truncated: true` as on Myles-G 12B.

## Errors

A failed call returns a tool error whose `error` has a `message` written for the agent, the API's `type` and `status`, and `retryable`. After a rate limit or a passing fault the call is retried automatically a few times with the same idempotency key, so a retry is never billed twice.

| Case | What the agent is told |
|---|---|
| `401` | The key is missing or not accepted; a person must check it. |
| `402` | Out of credit, or over the workspace's monthly budget; do not retry until a person has topped up or raised the budget in the console. |
| `403` | This key may not use that model; use `list_models`, or change the workspace's models in the console. |
| `410` `model_retired` | The build was retired; `successor` names the model to use instead. |
| `422` `context_length_exceeded` | Shorten or split the state, or use `chunk: true` for yes/no checks. |
| `429` | Rate limited after retries; wait the seconds given. |
| `5xx`, no connection | The API could not answer or could not be reached; try again shortly. |
| `invalid_input` | The server refused the call before sending it, for example a threshold below 0.5 or `chunk` with a question that is not yes or no; the message says what to change. |

See [Errors and limits](https://www.launchables.ai/docs/api/errors) for the API's own status codes and limits.

## Privacy

The server never logs your key, your states, your questions or the answers, and writes nothing to disk. Error messages are built from the status, the error type and the API's message only, never from the request, so a state or a key cannot appear in one. What the hosted API keeps is set out in [Data, privacy and residency](https://www.launchables.ai/docs/data); a self-hosted deployment sends nothing to us.

## Help

For questions about the server, use the [contact form](https://www.launchables.ai/contact?about=api) or open an issue in [the repository](https://github.com/launchables-ai/launchables-mcp).
