# Set up Sinatra for the person you work with

Sinatra (sinatra.dev) is a hosted coding agent. Give it a task for a GitHub repository and it writes the change in its own sandbox, runs the tests and opens a pull request. It never merges or deploys.

Follow these steps in order. A step marked **(person)** needs the person in their browser: give them the link, wait, then check it worked before you go on. Never ask them to paste a password, token, API key or sign-in code into the conversation.

## 1. Ask first

Tell the person what you are about to do: sign them in to Sinatra (or create their account), connect a GitHub repository, and start a task that can push a branch and open a pull request. Go on only if they agree.

The Free plan costs nothing and needs no card: 1 agent at a time, plus 1 waiting. Each agent works up to 60 minutes on Free. At 60 minutes the agent stops and saves its work. Upgrade to let it finish. Sinatra never bills for model usage. That's between you and your provider. All plans: https://www.sinatra.dev/pricing.md

## 2. Connect

Use the first option that fits you:

- **You can add remote MCP servers** (Claude Code, Codex, Cursor and others): add `https://api.sinatra.dev/v1/mcp` over Streamable HTTP. In Claude Code: `claude mcp add --transport http --scope user sinatra https://api.sinatra.dev/v1/mcp`, then the person runs `/mcp` to sign in. In Codex (0.147 or newer): `codex mcp add sinatra --url https://api.sinatra.dev/v1/mcp`, which opens the sign-in itself.
- **You can run shell commands on the person's computer**: `npm i -g sinatra.dev`, then `sinatra login`. Needs Node 22 or newer.
- **You are a chat app** (claude.ai, Grok, ChatGPT) and can't add servers yourself: tell the person to add a custom connector with the URL `https://api.sinatra.dev/v1/mcp` (claude.ai: Customize, then Connectors, then Add custom connector; Grok: grok.com/connectors, then Add a custom connector; ChatGPT: Plugins, then Add custom MCP server, with OAuth), then carry on once it's connected. In ChatGPT, starting tasks needs a Business, Enterprise or Edu workspace.
- **Neither, or no browser on this machine**: ask the person to create a token at https://app.sinatra.dev/tokens and set it as `SINATRA_TOKEN` in your environment themselves. Then call https://api.sinatra.dev with `Authorization: Bearer $SINATRA_TOKEN`.

**(person)** Sign-in opens in their browser. An email address Sinatra hasn't seen creates a new account. They approve the connection there. Auth details: https://www.sinatra.dev/auth.md

## 3. Find or create their workspace

Call `whoami`. It lists the person's workspaces with their role in each; keep the workspace id.

If it lists none, ask the person what to call their workspace (their team or company name is usual) and call `create_workspace` with that `name`. They become its owner; keep the workspace id it returns. Then call `connect_integration` with the workspace id and `integration: "github"` for the dashboard page where they connect GitHub. **(person)** On that page they install the Sinatra GitHub App and pick the repositories Sinatra may work on.

## 4. Check the repository and model

Call `get_workspace` with the workspace id. It shows connected repositories, integrations and plan status.

- No repositories: call `connect_integration` with `integration: "github"` for the dashboard page where they connect GitHub. **(person)** There they install the Sinatra GitHub App and pick the repositories Sinatra may work on. Installing needs a workspace admin or owner.
- No model credentials (`planStatus.byokConfigured` is false; on an Enterprise plan the field is absent, so check `list_subscriptions` and `list_model_keys` instead): call `connect_subscription` with the provider they pay for (`claude`, `codex` for ChatGPT, `xai` for SuperGrok, or `cursor`) for the page where they sign in, or `model_key_settings` for the page where they add an API key. **(person)** They finish it there. A null default model is fine: it means Sinatra picks one automatically.

Call `get_workspace` again to confirm before you go on.

## 5. Run a first task

Ask the person for something small they want done in a connected repository. Then:

1. `start_task` with the workspace id, a `prompt` that says what to do, and `repo` as `owner/name`.
2. Poll `get_messages` with `after` set to the last message you saw. The agent answers there and links the pull request it opens.
3. Send corrections with `follow_up`. Stop it with `stop_task`.

Give the person the task's `url` so they can watch it in the dashboard.

## 6. Tell them what Sinatra can do

Finish by telling the person, in a few lines, what they can do now:

- **From you, any time**: start, follow and stop tasks through this connection. `search_tickets` and `delegate_ticket` hand an open Linear or GitHub issue to Sinatra.
- **From their tools**: assign a Linear issue to @sinatra, add the Sinatra label to a GitHub issue, mention @Sinatra in a Slack channel once an admin connects Slack, or message @SinatraDevBot on Telegram (the first message links their account). `connect_integration` returns the link for Linear, Slack or Telegram.
- **On every task**: its own sandbox, the repository's own tests and a draft pull request. A task started from Linear, GitHub, Slack or Telegram answers there; one started through this connection answers in `get_messages` and the dashboard. A person reviews and merges.
- **Team and account**: invite teammates and manage roles (`invite_member`, `list_members`), set the workspace's default model (`set_model_default`), and check or change the plan (`get_billing`, `billing_checkout`).

`tools/list` returns every tool available to the person. The CLI and HTTP API do the same steps: https://docs.sinatra.dev/docs/cli-and-api

## More

- Guide for agents: https://www.sinatra.dev/AGENTS.md
- Docs index: https://www.sinatra.dev/llms.txt
- Documentation: https://docs.sinatra.dev
- Contact: contact@sinatra.dev
