---
name: curtex-brain
description: Use when you need knowledge held in a Curtex brain at https://backup.curtex.ai (team reference documents, standing instructions and skills); when the person asks for a round table - several AI models discussing a question together - or for an answer to be checked; to ask one of the team's AI personas; to create, update, move, rename or delete documents, lists, spreadsheets or presentations in Curtex; or to send an email from Curtex. Over MCP, with a read-only REST API for callers that speak no MCP.
---

# Working with Curtex

Curtex (https://backup.curtex.ai) hosts workspaces whose knowledge bases ("brains") are
served over the Model Context Protocol, and over a read-only REST API for
callers that speak no MCP. Over MCP you can also convene a round table of AI
models, have an answer independently checked, ask the account's personas,
create and edit documents, and send email from Curtex's own address.

## Connecting

- Endpoint: `https://backup.curtex.ai/mcp` (MCP Streamable HTTP, JSON-RPC 2.0, POST only)
- Auth: `Authorization: Bearer <token>` on every request. Two kinds of
  token work, and both act as exactly the PERSON behind them - they read what
  that person can read, and anything they file lands in that person's own
  workspace.

### Sign in as yourself (OAuth 2.1)

If your client speaks OAuth, use it - it needs no shared secret, and the
person authorizes their own access:

- Discovery: `https://backup.curtex.ai/.well-known/oauth-protected-resource` and
  `https://backup.curtex.ai/.well-known/oauth-authorization-server`. The endpoint's own
  401 names the first of those in `WWW-Authenticate`.
- Register yourself at `https://backup.curtex.ai/oauth/register` (RFC 7591) if you have
  no client id, then run the authorization code flow. PKCE with S256 is
  required; `resource=https://backup.curtex.ai/mcp` should be sent on both requests.
- One consent gets you every brain that person can read, and it follows
  their access from then on. Access tokens start `cta_` and last a
  week; refresh to renew.
- A workspace can keep its own brain out of outside connections, and an
  account can close the door for all of its workspaces. A brain you
  expected and cannot see is a setting, not a bug: ask the team, do not
  retry.

### Or a key someone gives you

A key is issued by Curtex on request (ask the team that runs your
Curtex account); unlike a token it is scoped to ONE workspace's brain, and
like a token it reads exactly what its issuer can read. Keys start
`ctk_` and do not expire until revoked. They exist for callers with no
browser to sign in with - prefer OAuth if you have one.

Example, Claude Code:

```
claude mcp add --transport http curtex https://backup.curtex.ai/mcp --header "Authorization: Bearer <key>"
```

## Reading a brain

- Tool `list_documents` - every brain document as path, title and
  one-line summary. Call this first. It answers from ONE brain - the
  default the person chose - because two teams' standing instructions in
  one context contradict each other.
- Tool `list_brains` - every brain you can read, and which is the
  default. Call it when the task might be served by another one, then
  pass that name as `brain` to `list_documents`. Work in one brain
  at a time.
- Tool `read_document {path}` - the full markdown of one document. Read
  a document when it bears on your task rather than guessing at
  something it would settle.
- Tool `document_stats` - which documents are actually being read, and
  which are not: counts and dates, never who read them.
- Tool `set_default_brain {brain}` - changes which brain the person's
  connections use by default. Only when they ask.
- `resources/list` + `resources/read` - the same documents for
  resource-aware clients (`curtex:///<path>` URIs). The list is the
  default brain; a URI from any brain you can read will open.
- `prompts/list` + `prompts/get` - the default brain's skills: how
  this team wants particular tasks done. Each prompt's description says when
  it applies; when one matches your task, fetch it and follow it.

## Round tables

A round table is several independent AI models, from different providers,
discussing one question in the person's own Curtex workspace. Each answers
on its own first, without seeing the others, then they argue it out: they
can challenge each other, and any of them may pass. The chair, Curtex's
built-in assistant, keeps a ledger of what is settled, what is contested and what is
only assumed, and writes the verdict at the end.

- Convene one ONLY when the person asks for it - "round table this", "get
  a panel on this", "have some models debate it". It costs several models'
  time, for several minutes: it is never the answer to an ordinary question,
  and never the way to check an answer (that is `red_team`, below).
- Tool `round_table {question, context?, models?, goal?, documents?, thread?}`. Pass the
  question exactly as the person put it - a sharpened-up version is a
  different question - and any earlier turns it depends on in `context`,
  verbatim. If they named the models they want at the table ("Claude Opus",
  "Grok"), pass those in `models` as they said them; otherwise the chair
  seats a table for the task.
- It returns at once, with a link to the discussion and a "text me when
  it's ready" link. Show the person the whole block, links included: they
  have no other way to find their table. It runs on the server and takes
  5-10 minutes; this conversation does not need to stay open, but it is
  the best place for the person to hear the result.

### Waiting for the table

No host lets one tool call run for minutes, so the wait is a run of short
calls rather than one long one:

- Tool `table_status {thread}` - call it straight after `round_table`.
  While the table is talking, each call waits up to about 40 seconds for it
  and then reports progress (turns so far, who is speaking). Call it again
  at once, as many times as it takes - that run of calls IS the wait. Give
  the person a short progress line now and then, not a commentary.
- It answers with one of: still going (call again); the verdict, to show as
  written; a question for the person (below); where the table stands, from
  the chair's ledger, if it carried on in Curtex; or that it was stopped.
- If you have to stop waiting before it finishes, say it is still running
  and give the link. When the person later asks how it is going, call
  `table_status` again and carry on waiting from there.

### When the table asks a question

Some things a table cannot settle by arguing: a matter of taste ("simpler
or more technical?"), a priority, a constraint or fact only the person
knows. Rather than fake a compromise, one of the seats stops the table and
asks the person - usually a short form of one to three questions, often
with options to pick from. Nothing more happens until it is answered.

- `table_status` returns the question, options included. Put it to the
  person as written and end your turn so they can reply.
- When they reply, call `answer_table {thread, answer}` with their reply
  in their own words. The table carries on on the server; call
  `table_status` again to wait for the verdict. A table may ask more than
  once.
- Never answer the question yourself, never pick an option for them and
  never fill in a default: the table stopped because it is their call. If
  they do not want to answer, say the table will wait.
- They can also answer at the link (the reading view shows the question as
  a form), and if they asked to be texted, the question is texted to them
  too. Whichever answer lands first is the one the table takes; the other
  is refused as already answered.

### Follow-ups

- Pass the `thread` token back on later calls in the same conversation:
  a follow-up question goes to the same table, with the same seats.
- A table needs somewhere to happen: a workspace the person can write to.
  If there is none, they sign in to Curtex once, which creates one.

## Checking an answer

- Tool `red_team {question, answer, prior?, focus?, documents?, thread?, brain?}` - an
  independent reviewer checks an answer against the organisation's own
  documents as well as on the facts, and replies in the same call. Use it
  when the person asks you to check, verify or double-check something, or
  whether you are sure. Pass the question and the answer exactly as
  written - a tidied-up paraphrase drops the details the review exists to
  catch - and show the result as written, link included.

## Documents from this conversation

`round_table`, `red_team` and `ask_persona` cannot see files the person attached to THIS chat. If the question
or answer is about one (a business case, a contract), hand it over:

- `documents: [{name, content}]` on `round_table`, `red_team` or `ask_persona` - each
  document's full text, copied exactly. Never a summary: without the text the
  table can only judge what you said about it.
  This is the normal road, PDFs and Word files included.
- Tool `attach_document {name, content?, data?, mimeType?, thread?}` - the
  fallback. Without `content` it returns an upload link for the ORIGINAL file:
  only when the person asks to send the original, or you cannot read the document
  well enough to pass its text. Show it in one plain sentence ("open this link and
  drop the file in"); do not try to upload to it yourself. Then pass the returned
  `thread` to `round_table`, `red_team` or `ask_persona`.

## Creating and editing documents

- Tool `create_document {title, type, markdown?, folder?}` - makes a new
  document of any type: `doc` (plain markdown), `list` (a board of
  grouped items with typed columns), `spread` (a spreadsheet workbook) or
  `presentation` (a slide deck). Without `markdown` you get a starter.
- Tool `document_format {type}` - the format guide for a list, spread or
  presentation. Read it before writing the markdown.
- Tool `edit_document {path, markdown}` - REPLACES a list, spread or
  presentation with new markdown. Read it with `read_document` first and
  send back the complete document: anything left out is removed. Every
  previous version is kept. Plain documents are not edited this way.
- `create_list` and `edit_list` still work and are the list-only forms.

## Moving, renaming and deleting

- Tool `move_document {path, folder?, name?}` - moves a document or folder
  into another folder, renames it, or both. A move stays inside its
  workspace, nothing is overwritten, links to it are updated and the old
  address still finds it. A missing destination folder is created.
- Tool `delete_document {path}` - deletes a document, or an empty folder.
  Files filed under the document go with it. The document can be recovered
  from its folder's history in Curtex for 30 days, then it is erased. Delete
  only when the person asks.
- Both need the person to be able to edit what they touch (and, for a move,
  the destination). Chats, workspaces and a workspace's brain folder are not
  moved or deleted this way.

## Personas

- Tool `list_personas` - the account's personas: named AI colleagues, each
  with a role and knowledge of its own.
- Tool `ask_persona {persona?, question?, documents?, thread?}` - ask one by
  name, or leave `persona` out for the account's default. Pass `thread`
  back on follow-ups. If the reply is still being written, call again with the
  same `thread` and no `question`.

## Email

- Tool `send_email {to, subject, body}` - sends at once from Curtex's own
  address (support@curtex.ai), to a teammate by handle or to any email
  address. The email says the person asked for it, and replies go to them; it
  never comes from their own mailbox. Send only when the person asks, with a
  recipient, subject and wording they have seen. A handle works only when the
  person's default brain belongs to that teammate's account; otherwise use an
  address. It needs a connection signed in as a person - a workspace key
  cannot send. One recipient per call, and daily limits apply.

## If you cannot speak MCP

The same brain is served over plain HTTP at `https://backup.curtex.ai/v1` - for batch
jobs, scripts and systems with no MCP client. Prefer MCP if you have it:
this door has to be switched on by an account, and a 403 means it is not.
It reads brains only - round tables, checks and lists are MCP tools.

- Auth: `Authorization: Bearer <key>` with an ACCOUNT key - it starts
  `ctx_` and is minted by an owner or admin under **Account settings ->
  Integrations**. Like every credential here it reads exactly what the
  person who minted it can read.
- `GET /v1/workspaces` - which brains this key serves, with a document
  count each. Start here; it is `list_brains`.
- `GET /v1/documents?workspace=NAME` - that brain's manifest, as JSON.
  It is `list_documents`, and `workspace` may only be left off when
  the key serves exactly one.
- `GET /v1/documents/<path>` - one document as raw markdown, not JSON.
  It is `read_document`. Any path from any listing this key can reach
  will open; anything else is a 404.
- `GET /v1` lists the endpoints back to you. Human docs, with worked
  examples: `https://backup.curtex.ai/docs`.

## Rules

- The REST door is read-only. Over MCP, these tools write, and their
  annotations say so: `round_table`, `answer_table`, `red_team` and
  `ask_persona` file their work as a chat in the person's own workspace;
  `attach_document` holds a file for the next question; `create_document`
  and `edit_document` (with the older `create_list` and `edit_list`)
  write documents, brain folders included; `set_default_brain` changes one of
  the person's settings; `move_document` and `delete_document` reorganise
  documents (a delete is recoverable for 30 days); and `send_email` sends an
  email at once. No tool edits the text of a plain markdown document.
- Both doors are stateless: no MCP session id is issued or required, and the
  REST door takes its workspace per request - there is nothing to switch.
  What carries a piece of work across calls is the `thread` token you pass
  back.
- Rate-limit yourself to what a person would need: list once, read the few
  documents that matter. Waiting on a round table is the exception - keep
  calling `table_status` while it reports the table still going; each
  call waits on the server, so a run of them costs nothing extra.
