Docs

A Curtex workspace keeps a knowledge base - its brain - of markdown documents, standing instructions and skills. Two doors serve that brain to things outside Curtex. Both are read-only, and both read exactly what the person behind the credential can read: no door has a permission model of its own.

Pointing an agent here

/skill.md is a public Anthropic-format skill that teaches any agent how to connect and read a brain. Give it the URL and nothing else:

curl https://curtxt.com/skill.md

Which door

MCP server

For AI clients - Claude, Cursor, Codex and the rest. Sign in with OAuth, or paste a key. Scoped to one person.

REST API

For your own code - batch jobs, scripts, systems that speak no MCP. One key per account, plain JSON over HTTPS.

MCP server

Endpoint
https://curtxt.com/mcp
Transport
Streamable HTTP, JSON-RPC 2.0, POST only. Stateless - no session id.
Auth
Authorization: Bearer - either an OAuth 2.1 access token (cta_, the endpoint's 401 points the way; PKCE and dynamic registration supported) or a personal API key (ctk_, minted in User settings → Connections, scoped to one workspace).

Tools

  • list_brains Which brains this connection can read, and which is the default.
  • list_documents One brain’s documents as path, title and summary.
  • read_document The full markdown of one document.

Documents are also served as MCP resources, and a brain's skills as prompts. Full detail in /skill.md.

Add it to Claude Code

claude mcp add --transport http curtex https://curtxt.com/mcp \
  --header "Authorization: Bearer <key>"

REST API

Base URL
https://curtxt.com/v1
Auth
Authorization: Bearer ctx_… - one key per account, created by an owner or admin in Account settings → Integrations. Shown once. The key reads as whoever minted it, and stops working if they leave the account.
Switches
The account must allow incoming connections and API connections; any workspace can still keep its own brain out. Closed doors answer 403, not silence.
Workspaces
Stateless: pass workspace per call. There is nothing to switch and no session to hold it.

Endpoints

  • GET /v1 = MCP initialize

    This list, as JSON.

    Discovery. Costs nothing and needs only a valid key.

  • GET /v1/workspaces = MCP list_brains

    Every workspace this key can read, with a document count each.

    Start here. A workspace missing from this list is either not billed by your account, not visible to the person who minted the key, or has switched off outside access in its own settings.

  • GET /v1/documents = MCP list_documents

    One workspace’s brain: path, title and one-line summary per document.

    Bodies are not included. Read the few documents that bear on the task.

    workspace (when the key reaches more than one) - A name from /v1/workspaces. Omit it only when there is exactly one - with several you get a 400 naming them, because silently picking one is how a job reads the wrong team’s brain.

  • GET /v1/documents/{path} = MCP read_document

    One document’s full markdown.

    Returns raw text/markdown, not JSON - the body IS the payload. Readable is the key’s whole reach, not just the workspace you last listed, so a path from any listing opens. Anything outside that reach is a 404: this door does not confirm what it is not serving.

    path (yes) - A path from the listing, e.g. acme/brain/pricing.md.

Example

export CURTEX_KEY=ctx_…

# what can this key see?
curl -H "Authorization: Bearer $CURTEX_KEY" https://curtxt.com/v1/workspaces

# the acme brain's manifest
curl -H "Authorization: Bearer $CURTEX_KEY" \
  "https://curtxt.com/v1/documents?workspace=acme"

# one document, as markdown
curl -H "Authorization: Bearer $CURTEX_KEY" \
  https://curtxt.com/v1/documents/acme/brain/pricing.md

Errors

  • 401 - no key, or a dead one.
  • 403 - the account has API connections switched off.
  • 404 - no such workspace or document, or it is outside this key's reach. The two are not distinguished on purpose.
  • 400 - a listing needs workspace and did not get one.