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

# Prompts and replies

Send Minded a prompt, then read its reply as it streams.

Send Minded a prompt with `send_prompt`. Read the reply with `read_chat`. Both are tools on Minded's MCP server, `https://mcp.minded.com`.

## The chat in Minded [#the-chat-in-minded]

A prompt sent with a key becomes a normal Minded chat.

- It shows in your Recents with the mark of the tool that sent it (Claude, ChatGPT, Codex, GitHub Copilot or Gemini), read from the call: an MCP client's name, or the HTTP user agent. Any other tool shows the API mark.
- Its first message is yours, with the key's name as its source (for example `Claude Code`).
- Roles, approvals and usage apply as in any chat. Minded works as you, with your role.
- The key's **Recent usage** on **Settings › Integrations › API keys** lists each call it made, with the chat it reached.
- The Usage page counts the chat under Chats, like any chat.

You can carry on in either place. A follow-up typed in Minded and another prompt sent to the same chat from Claude land in the order sent, and each is answered.

## send_prompt [#send_prompt]

Starts a chat, or adds a prompt to a chat you already have. Needs **Chats: Read and write**. It is marked as a write, so Claude and ChatGPT may ask you before calling it.

| Input | | |
| --- | --- | --- |
| `text` | text, required | What you want Minded to do, up to 100,000 characters |
| `chatId` | text, optional | A chat to add the prompt to. Leave it out to start a new chat |
| `clientId` | text, required | Your own id for this prompt, new for each prompt. Sent again after a lost reply, the same prompt lands once |

| Returns | |
| --- | --- |
| `chatId` | The chat the prompt went to. Pass it to `read_chat`, `answer_question` and `read_usage` |
| `seq` | Where your prompt sits in the chat |
| `open` | A link that opens the chat in Minded |

When no usage is left, the prompt is refused with a link to Billing and no chat is made ([Errors](/docs/developers/errors)).

## read_chat [#read_chat]

Reads the chat from where you last stopped: Minded's reply, any question it asks, and whether it is still working. Needs **Chats: Read only**.

| Input | | |
| --- | --- | --- |
| `chatId` | text, required | The chat to read |
| `afterSeq` | number, optional | The `nextAfterSeq` from your last read. Leave it out (or pass 0) to read the whole chat |
| `waitSeconds` | number, optional | The longest to wait for Minded to finish before returning, 0 to 50. Leave it out to wait 50 seconds |

| Returns | |
| --- | --- |
| `status` | Where the chat stands (below) |
| `nextAfterSeq` | Where this read stopped. Pass it as `afterSeq` next time |
| `messages` | What came after `afterSeq`, in order (below) |
| `open` | A link that opens the chat in Minded |

Each message has a `seq` and one of three shapes:

- A message: `from` (`you` or `minded`) and `text`.
- A question or an approval Minded asks: `from: "minded"`, its `waitId`, `question`, `choices` and `questions` ([Questions and approvals](/docs/developers/questions-and-approvals)).
- A turn that stopped before it was done: `stopped`, with why (below).

| `status` | Means |
| --- | --- |
| `working` | Minded is still writing, or there is more to read. Read again |
| `waiting_for_answer` | Minded asked a question or needs an approval |
| `idle` | Nothing more to do: the reply is complete, or the turn stopped |

| `stopped` | Means |
| --- | --- |
| `stopped_out_of_usage` | No usage was left |
| `stopped_conversation_limit` | The chat reached its conversation limit |
| `error` | Minded could not run |
| `interrupted` | Someone pressed Stop in the Minded chat |
| `prompt_declined` | Minded declined the prompt before it ran |
| `stopped_suspicious` | Minded stopped the turn at a step that could send data out |

### Stop waiting, read the rest later [#stop-waiting-read-the-rest-later]

How long to wait is your call. Stop waiting whenever you like. Minded keeps working in the Minded chat.

Read again with the `nextAfterSeq` you last got as `afterSeq`. You get the rest of the chat, from where you stopped, with no part twice. A long piece of work (building an agent can take minutes) is safe to check on later.

Stopping in Claude or ChatGPT only stops waiting. To stop Minded's work, press Stop in the Minded chat.

```js
// Check back on a chat started earlier, and print only what is new.
const result = await minded.callTool({
  name: 'read_chat',
  arguments: { chatId: savedChatId, afterSeq: savedAfterSeq, waitSeconds: 30 },
});
const read = JSON.parse(result.content[0].text);
for (const message of read.messages) if (message.from === 'minded' && message.text) console.log(message.text);
saveAfterSeq(read.nextAfterSeq);
if (read.status === 'waiting_for_answer') askTheMember(read.messages.find((message) => message.waitId));
```

`minded` here is the MCP client from the [Quickstart](/docs/developers/quickstart#from-your-own-code).

## Over HTTP [#over-http]

The same actions are HTTP routes at `https://app.minded.com/v1`, JSON in and out, with the key as `Authorization: Bearer`. They take the same inputs and need the same access as the tools.

| Route | What it does |
| --- | --- |
| `POST /chats` | Starts a chat: `text` and `clientId`. Returns `chatId` and `seq` |
| `POST /chats/{chatId}/messages` | Sends a prompt in a chat: `text` and `clientId` |
| `GET /chats/{chatId}/frames` | Reads the chat after `afterSeq`, waiting up to `waitSeconds`. Returns `frames`, `lastSeq` and `status` |
| `GET /chats/{chatId}/stream` | Every frame after `afterSeq`, then each new one as it lands, as server-sent events |
| `POST /chats/{chatId}/answers` | Answers a question: `waitId`, `answer` or `answers`, and `clientId` |
| `GET /chats/{chatId}/wake-ups` | The chat's wake-ups still waiting, soonest first |
| `DELETE /chats/{chatId}/wake-ups/{wakeUpId}` | Cancels a waiting wake-up, as Cancel on it in the chat does |
| `GET /usage` | Your usage, and a chat's spend with `chatId` |

```bash
# A new clientId for each prompt; send the same one again only to retry after a lost reply.
CLIENT_ID=$(uuidgen)
curl https://app.minded.com/v1/chats \
  -H "Authorization: Bearer $MINDED_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{ \"text\": \"Write the weekly support summary.\", \"clientId\": \"$CLIENT_ID\" }"
```
