# The MCP server, in full

## The address and what it speaks

**https://tidal-ai.space/mcp**, with `POST` only (Streamable HTTP). Every request is one JSON-RPC 2.0 message and is answered with one JSON object. There is no session to open or end and no stream; a batch of messages is refused, one message per request.

It speaks both eras of the protocol on the same address:

- **The stateless form (version 2026-07-28).** Every request carries its version in `params._meta` under `io.modelcontextprotocol/protocolVersion`, and in the headers `MCP-Protocol-Version` and `Mcp-Method` (and, for `tools/call`, `Mcp-Name`). The headers must agree with the body. `server/discover` says what is here.
- **The handshake form (versions 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05).** A client opens with `initialize`, then lists and calls tools.

The server offers tools only: no resources and no prompts.

```bash
curl -s https://tidal-ai.space/mcp \
  -H "Authorization: Bearer $SINBAD_KEY" \
  -H "Content-Type: application/json" \
  -H "MCP-Protocol-Version: 2026-07-28" \
  -H "Mcp-Method: server/discover" \
  -d '{"jsonrpc":"2.0","id":1,"method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}'
```

## Signing in

There are two ways, and the server accepts both on every request.

**A key**, sent as `Authorization: Bearer <key>`. A key is made by a person under Account, then Connect other tools, and looks like `tdl_` followed by 12 letters and digits, an underscore and 40 more. It is shown once. It carries a level and, optionally, one workspace.

**OAuth 2.1**, which most MCP tools do by themselves. A request without a key is answered `401` with a `WWW-Authenticate` header that points to where the tool can find out how to sign the person in:

```bash
curl -s https://tidal-ai.space/.well-known/oauth-protected-resource/mcp
```

```bash
curl -s https://tidal-ai.space/.well-known/oauth-authorization-server
```

A tool introduces itself at `/oauth/register`, or by a client document it hosts at an https address, and sends the person to `/oauth/authorize` in their browser, where Sinbad asks them to say yes and how far the tool may go. Every sign-in uses PKCE (S256); tools are public clients, with no client secret. The tool gets an access token, which works like a key, and a refresh token. An access token runs out after an hour and the tool renews it with its refresh token. The scopes are `tidal:read`, `tidal:write` and `tidal:run`, each including the ones before it.

## Limits

- An account has at most twenty keys made by hand.
- A key may make 240 requests a minute; beyond that the answer is `429` and `Retry-After`.
- `demand` may start 60 runs an hour on one key.
- A request may be 4 MB at most. `read_file` reads files up to 1.5 MB, as text.
- A page in a browser on another website may not call it: such a request is refused with `403`.

## Errors

| Answer | Meaning |
|---|---|
| `401` | No key, or a key that is wrong, taken back or run out. The `WWW-Authenticate` header says where to sign in. |
| `403` | The request came from a web page that is not Sinbad's own. |
| `405` | Not a `POST`. |
| `400` | Not JSON, not a JSON-RPC request, a batch, or headers that disagree with the body. |
| `429` | Too many requests from this key. |
| A result with `isError: true` | The tool ran and could not do what was asked; its text says why in plain words. |

## Tools

Which tools a key sees depends on its level: `read` sees the read tools, `write` also the write tools, and `run` all of them. The list below is made from the server's own tool definitions, so it is what the server offers.

### `workspaces`

List workspaces. Needs a key at level **Look** or above (`read`). It only reads.

The Sinbad workspaces this key may work with: id, name, whether the user owns it, and how many workstreams it holds.

It takes no inputs.

### `workstreams`

List workstreams. Needs a key at level **Look** or above (`read`). It only reads.

The workstreams in a workspace (or in all of them): id, title, kind, whether its agent is working right now, and when it last changed. A workstream is one piece of work: a conversation with a Sinbad agent, project files with versions, and usually a live preview.

| Input | Type | Needed | What it is |
|---|---|---|---|
| `workspace` | string | no | A workspace id or name. Leave out for every workspace this key may see. |

### `workstream`

Open a workstream. Needs a key at level **Look** or above (`read`). It only reads.

One workstream in full: where its agent stands, the last messages of its conversation, its project files, and the address the user opens it at.

| Input | Type | Needed | What it is |
|---|---|---|---|
| `workstream` | string | yes | The workstream id |
| `messages` | integer | no | How many of the latest messages to include (default 6, at most 30) |

### `read_file`

Read a file. Needs a key at level **Look** or above (`read`). It only reads.

The text of one file of a workstream's project.

| Input | Type | Needed | What it is |
|---|---|---|---|
| `workstream` | string | yes | The workstream id |
| `path` | string | yes | Path inside the project, like src/app.js |

### `status`

How a workstream stands. Needs a key at level **Look** or above (`read`). It only reads.

Whether a workstream's agent is working, what it has said so far, or its last answer. With wait_s it waits that long for the work to finish first.

| Input | Type | Needed | What it is |
|---|---|---|---|
| `workstream` | string | yes | The workstream id |
| `wait_s` | integer | no | Wait up to this many seconds for it to finish (at most 45) |

### `write_file`

Write a file. Needs a key at level **Look and edit** or above (`write`).

Create or replace one text file of a workstream's project. It is kept as a version the user can go back from, and reaches the live preview and any folder of theirs the project is connected to. Not possible while the workstream's agent is working.

| Input | Type | Needed | What it is |
|---|---|---|---|
| `workstream` | string | yes | The workstream id |
| `path` | string | yes | Path inside the project, like src/app.js |
| `content` | string | yes | The whole new text of the file |

### `new_workstream`

Start a workstream. Needs a key at level **Look and edit** or above (`write`).

Make a new, empty workstream in a workspace. Follow it with demand to have its agent build something, or write_file to put files in it yourself.

| Input | Type | Needed | What it is |
|---|---|---|---|
| `title` | string | yes | A short name, like "Pricing page" |
| `workspace` | string | no | A workspace id or name. May be left out when the key sees only one. |
| `kind` | `web`, `game`, `mobile`, `code`, `doc`, `data`, `video`, `cad`, `ops`, `research` | no | What sort of work it is. Default: code. |

### `demand`

Give a workstream a demand. Needs a key at level **Edit and run** or above (`run`).

Hand a task to a workstream's own Sinbad agent, as if the user had typed it there. The agent works on Sinbad (it can run commands, build, research, make media, publish) and its work spends the user's credits. If the agent is already working, this is said to it and answered in the same run. Waits for the answer up to wait_s seconds; when the work takes longer it says so, and status (which can wait too) brings the answer later.

| Input | Type | Needed | What it is |
|---|---|---|---|
| `workstream` | string | yes | The workstream id |
| `text` | string | yes | What to do, in full: the agent sees the workstream's conversation and files, but nothing of yours |
| `wait_s` | integer | no | How long to wait for the answer (default 40, at most 45) |

### `stop`

Stop a workstream. Needs a key at level **Edit and run** or above (`run`). It stops work in progress.

Stop the work a workstream's agent is doing right now. What it has done so far is kept.

| Input | Type | Needed | What it is |
|---|---|---|---|
| `workstream` | string | yes | The workstream id |

### `memory_prompt`

Read the workspace summary. Needs a key at level **notes** or above (`notes`). It only reads.

The standing summary of a workspace's memory: what is being made, what has been decided, the constraints and facts. Read it before you work on anything in the workspace.

| Input | Type | Needed | What it is |
|---|---|---|---|
| `workspace` | string | no | A workspace id; not needed for a key made for one workspace |

### `memory_search`

Search the workspace's notes. Needs a key at level **notes** or above (`notes`). It only reads.

Find notes in the workspace's memory by words, optionally of one kind (aim, decision, requirement, constraint, example, asset, fact, question, idea).

| Input | Type | Needed | What it is |
|---|---|---|---|
| `q` | string | no | Words to look for |
| `kind` | `aim`, `decision`, `requirement`, `constraint`, `example`, `asset`, `fact`, `question`, `idea` | no |  |
| `workspace` | string | no |  |

### `memory_list`

List the workspace's notes. Needs a key at level **notes** or above (`notes`). It only reads.

The newest notes of the workspace's memory, optionally of one kind or in one state (current, superseded, dropped, any).

| Input | Type | Needed | What it is |
|---|---|---|---|
| `kind` | `aim`, `decision`, `requirement`, `constraint`, `example`, `asset`, `fact`, `question`, `idea` | no |  |
| `state` | `current`, `superseded`, `dropped`, `any` | no |  |
| `limit` | integer | no |  |
| `workspace` | string | no |  |

### `memory_add`

Leave a note. Needs a key at level **notes** or above (`notes`).

Leave a note in the workspace's memory: a decision you made while working, something you learned, an example, a constraint, an open question. It shows as your tool's note until the person confirms it. Keep it to a sentence or two.

| Input | Type | Needed | What it is |
|---|---|---|---|
| `kind` | `aim`, `decision`, `requirement`, `constraint`, `example`, `asset`, `fact`, `question`, `idea` | yes |  |
| `text` | string | yes |  |
| `url` | string | no | For an example: its web address |
| `tool` | string | no | The name of your tool, like Claude Code |
| `workspace` | string | no |  |

### `memory_update`

Replace a note. Needs a key at level **notes** or above (`notes`).

Say that one of your own earlier notes (or a bot's) is out of date: the old note is kept, marked replaced, and your new words take its place. You cannot replace what the person decided.

| Input | Type | Needed | What it is |
|---|---|---|---|
| `id` | string | yes |  |
| `text` | string | yes |  |
| `tool` | string | no |  |
| `workspace` | string | no |  |