> Minded’s MCP server is https://mcp.minded.com: connect an agent to it with a Minded API key to hand work to Minded.

# Errors

When Minded refuses a call, the tool returns an error that says what refused it and, where it helps, a link to fix it in Minded.

A refused `send_prompt` makes no chat.

- **Over MCP**, a refused tool call is a tool error (`isError: true`) whose text is the message, ready to show the member. A key that is missing or no longer works refuses the whole request with HTTP `401`.
- **Over HTTP** at `https://app.minded.com/v1`, a refusal answers with an HTTP status and a JSON body:

| Field | |
| --- | --- |
| `code` | A stable name for the refusal (below) |
| `status` | The HTTP status |
| `message` | What happened, in plain words, ready to show the member |
| `data` | When there is one: the page in Minded that fixes it (`billingUrl`, `usageLimitsUrl`), or how many seconds to wait (`retryAfter`) |

## With an API key [#with-an-api-key]

| What happened | Status | `code` | What to do |
| --- | --- | --- | --- |
| The key was revoked | `401` | `UNAUTHORIZED` | Make a new key on Settings › Integrations › API keys and swap it in where you hold the old one |
| The key's maker left the organization | `401` | `UNAUTHORIZED` | Same: a member of the organization makes a new key |
| The call is outside the key's access | `403` | `FORBIDDEN` | The message names the area and level the call needs, for example "This key can’t send prompts: it needs Chats: Read and write." Open the key on Settings › Integrations › API keys and change its access |
| The key started an agent run | `403` | `FORBIDDEN` | Starting agent runs with a key comes later. Start the run from the agent's code ([Agent code](/docs/developers/agent-code)) |
| The chat is not open to the key's maker | `403` | `FORBIDDEN` | The key reaches only the chats its maker may open in Minded |
| No usage left | `402` | `OUT_OF_USAGE` | `data.billingUrl` opens Billing. Add usage (or ask an Admin to), then send the prompt again. No chat was made |
| The monthly usage limit was reached | `402` | `OUT_OF_USAGE` | `data.usageLimitsUrl` opens Usage limits, where an Admin raises the limit |
| Too many calls | `429` | `TOO_MANY_REQUESTS` | A key makes at most 60 calls a minute ([API keys](/docs/developers/api-keys#limits)). Wait, then call again |
| The question was already answered in Minded | `409` | `CONFLICT` | Nothing to fix. Minded uses the first answer. Keep reading with `read_chat` |
| The answer needs Minded itself (an app to connect, the browser to take control of) | `403` or `412` | `FORBIDDEN` or `PRECONDITION_FAILED` | Give the member the chat's link ([Questions and approvals](/docs/developers/questions-and-approvals#done-in-minded)) |
| The input is not valid, for example an empty `text` | `400` | `BAD_REQUEST` | Fix the input. Over MCP, the message names the field |

A key's access never lifts its maker's role. When your role cannot do something, changing the key's access does not help.

### Minded could not be reached [#minded-could-not-be-reached]

The call did not reach Minded, so nothing changed and nothing was lost there. Try again with the same `clientId`: a prompt or an answer sent again lands once. If you were reading a reply, read again with your last `nextAfterSeq` and you lose nothing.

## From agent code [#from-agent-code]

A refused call from agent code answers the same way, with the same `code` and `message`. The run carries on, and Minded decides what to do next ([Agent code](/docs/developers/agent-code)).

| What happened | Status | `code` | What to do |
| --- | --- | --- | --- |
| The code reached a chat other than its run's own and the chats it started | `403` | `FORBIDDEN` | Start a chat from the code, and send to that one |
| The code answered a question | `403` | `FORBIDDEN` | Questions are the member's to answer |
| The code listed or cancelled wake-ups | `403` | `FORBIDDEN` | A member's API key lists and cancels them |
| The run's turn is over, or its token expired | `401` | `UNAUTHORIZED` | Nothing to fix: the code acts only while its turn runs |
| The runs of one member sent more than 60 prompts in an hour | `429` | `TOO_MANY_REQUESTS` | Wait, then send again |
