# Trinity MCP server

- URL: `https://app.usetrinity.ai/api/v1/agent/mcp`
- Transport: Streamable HTTP, stateless. Send `Accept: application/json, text/event-stream`.
- Auth: `Authorization: Bearer <token>`. Get a token in the [quickstart](https://app.usetrinity.ai/docs/).
- Answers: every tool answers one text block holding JSON. `tools/list` gives each tool's full input schema.

The token belongs to one person in one organization. Reads see the projects that person is a member of. Writes are made as that person, and Trinity shows them on the task and keeps its GitHub, Linear and Jira issues in step.

## Naming a task

Every tool that works on one task takes one of:

- `task_code`: a project task code such as `T123`. A bare number is not a code.
- `task_id`: the Trinity task id.
- `github_repository` with `github_number`: a GitHub issue or pull request.
- `tracker_issue`: a Linear or Jira key such as `ENG-142`.
- `url`: a pasted GitHub issue or pull request URL.

Add `repo` (the repository you work in, as `owner/name` or its git remote) or `project` (a slug or id) when the person is in several projects. A reference no task tracks answers `not_tracked` with what to read instead.

## Read tools

| Tool | What it answers | Main arguments |
|---|---|---|
| `get_task_context` | The read to make before working on a task: the task and its trackers, the Slack thread it came from, its pull requests and coding sessions, revisions, open obligations, and related work found by meaning. Each related hit names the tool that reads it whole. | a task, `query`, `hops` (1 to 3), `limit` |
| `get_task` | One task by any reference a person hands you. | a task |
| `find_tasks` | The project's tasks, searched by meaning and words or listed by milestone, status and assignee. | `query`, `milestone`, `status`, `assignee` (`me` or a user id), `limit` |
| `get_milestone` | One milestone and its tasks, fifty to a page. | `code` (M7, m7, 7 or an id), `page` |
| `list_milestones` | The project's milestones with code, name, estimate, target date and status. | `include_archived` |
| `read_source` | One record a `get_task_context` hit points at, whole: a GitHub, Linear or Jira issue, a pull request, a Slack message or thread, a meeting note, a Notion page or a coding session. | `kind`, `key`, `thread_ts` |

## Write tools

| Tool | What it does | Main arguments |
|---|---|---|
| `start_task` | Says you are starting a task. A task still to do moves to in progress. | a task, `branch` |
| `report_progress` | Records one line of what you are doing now on the task. Call it at most every few minutes. | a task, `line` (280 characters) |
| `link_pull_request` | Records a pull request as the work on a task. Call it when you open the pull request. | a task, `repository`, `number` |
| `propose_task` | Creates a task for work you found that no task tracks. Search with `find_tasks` first. | `title`, `description`, `priority` (p0 to p3), `from_task` |
| `ask_blocker` | Asks the person who asked for the task a question you cannot continue without, in the Slack thread the task came from. | a task, `question` (1000 characters) |
| `finish_task` | Says how you stop: `ready_for_review` once your pull request is up, `blocked`, or `done` for work that needs no merge. A task an open pull request implements completes when it merges. | a task, `outcome`, `summary` (1000 characters) |

## The banner

Six tools can answer with `banner`: `get_task_context`, `start_task`, `link_pull_request`, `propose_task`, `ask_blocker` and `finish_task`. It is three lines of a markdown quote for the agent to open its final response with, before any greeting, heading, summary or other prose, so the person sees what Trinity did:

    > **▲ Trinity updated**
    >
    > **T123 Fix the login form** is now in progress, with a live coding session recorded as its work.

A write's banner is finished: copy its three lines exactly, and always show it. A read's third line is an angle-bracketed blank: replace it, brackets included, with one or two sentences on one line, what Trinity surfaced and then what that let you do, saying only what the answer supports. Show the recall banner when you used the read to decide, act on or explain the requested work, including when a write follows.

Collect both kinds of banner from the current turn and place them in call order at the start of the final response, with a blank line between. Complete recall banners before deduplicating identical banners. Later calls, errors and answers without banners do not remove earlier banners. Do not append banners after the answer or replay them from a prior turn. A true no-op carries none; re-linking an existing pull request still carries an update banner when it changes task status or assignee.

Each banner also carries `banner_instructions` in its answer, repeating the rule beside the text even when a client cached an older tool description. A context read followed by task creation shows recalled before updated, never the reverse. Answers without a banner carry no banner instructions.

These are instructions to the agent, not a separate client widget: placement and rendering depend on the client and model. A live coding session is the newest open session the paired device captured in the repository; with concurrent sessions it need not be the conversation making the call.

## Errors

- HTTP `401`: no token, or one Trinity does not know. HTTP `403`: the device was revoked. Pair again for either.
- A tool error is one line saying why, for example `billing locked: free_access_expired` when the organization's free period has ended.
- Each call has 20 seconds.
