# MCP server & tools

> Connect an OAuth-capable AI coding agent to Tach's hosted Streamable HTTP MCP server, inspect the signed-in tools, and see what Tach refuses.

Status: Live with sign-in · 120 tool calls per minute per account.

Tach runs as an authenticated remote MCP server (Streamable HTTP + OAuth 2.1 with passkey sign-in) for AI coding agents such as Claude Code, Codex, Cursor, and Antigravity. Tach holds each return in the taxpayer's account and computes U.S. federal returns for tax year 2024, 2025 or 2026 (2026 is a preview: its results are estimates) plus supported state returns.

## Connect

| Interface | Address |
|---|---|
| Hosted MCP server (Streamable HTTP, OAuth 2.1) | `https://api.tach.tax/mcp` |
| Published Agent Skills reference (`SKILL.md`) | [`https://tach.tax/skill.md`](https://tach.tax/skill.md) |
| Signed-in return workspace | `https://tach.tax/returns` |

<div class="tabset" data-tabset>

### Claude Code

Run this once in a terminal, from any folder:

```sh
claude mcp add --transport http --scope user tach https://api.tach.tax/mcp
```

Then start Claude Code, type /mcp, choose tach and Authenticate. Your browser opens on Tach: sign in and approve Claude Code.

### Codex

Run this once in a terminal, from any folder:

```sh
codex mcp add tach --url https://api.tach.tax/mcp
```

Codex opens your browser on Tach: sign in and approve Codex. If you need to sign in again later, run codex mcp login tach.

### Cursor

Add Tach to `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "tach": {
      "url": "https://api.tach.tax/mcp"
    }
  }
}
```

Open Settings → Tools & MCP in Cursor and click Connect on tach. Your browser opens on Tach: sign in and approve Cursor.

### Antigravity

Add Tach to `~/.gemini/antigravity/mcp_config.json`:

```json
{
  "mcpServers": {
    "tach": {
      "serverUrl": "https://api.tach.tax/mcp"
    }
  }
}
```

Save the file and refresh MCP servers in Antigravity. When your browser opens on Tach, sign in and approve Antigravity.

</div>

For document collection checklists, see [What goes in your tax folder](/docs/documents) (`/docs/documents.md`). Public schema and citation metadata are also available at `GET https://api.tach.tax/v1/schema` and `GET https://api.tach.tax/v1/cite?id=<id>`.

## Signing in

The server implements MCP authorization (OAuth 2.1):

- A request to `https://api.tach.tax/mcp` without a valid bearer token returns `401` with a `WWW-Authenticate` challenge pointing to protected-resource metadata (RFC 9728) and authorization-server metadata (RFC 8414) at `https://api.tach.tax/v1/.well-known/oauth-authorization-server`.
- Clients register dynamically (RFC 7591) and open the taxpayer's browser with PKCE (`S256` only) and `resource` (RFC 8707). The taxpayer signs in with a passkey and approves the client.
- Scopes: `tach.returns` (read and update returns in the account) and `offline_access` (refresh tokens). There is no scope for filing or viewing SSNs.
- Access tokens expire after one hour and rotate on refresh. Any connected client can be revoked from `/connect`, and deleting the account revokes all clients immediately.

## Tools

The hosted MCP server (`tach`) registers six signed-in tools. Every return tool takes the return id in `return`.

| Tool | Purpose |
|---|---|
| `tach_returns` | List, open, rename, or start returns held in the signed-in account. |
| `tach_write` | Apply an incremental delta (`documents[]`, `set`, `remove[]`, `closures[]`) at `atRevision` with an idempotent `requestId`, returning the new `revision`, `review` URL, and wire-bounded compute output. |
| `tach_upload` | Upload a large brokerage or statement payload as a staged file for ingestion. |
| `tach_commit` | Commit a staged upload into the return at `atRevision` and recompute. |
| `tach_explain` | Return the full formula, operands, source pointers, and inlined official IRS/state citations for any computed line. |
| `tach_schema` | Inspect the typed facts schema, allowed enum values, and document field paths. |

## Privacy

- **Stored in the taxpayer's account.** Tach keeps your return with our host, Cloudflare, in the United States, encrypted at rest. Only you see it on Tach's pages. Tach's operator and Cloudflare can technically reach stored data; we don't open returns, and we fix problems with made-up examples. Tach deletes a return when you delete it or your account, or 24 months after it was last used. It deletes an account, with its returns, 24 months after it was last used, and emails you about 30 days before.
- **No request bodies in logs.** Each request logs only route, status, and a keyed account fingerprint — never facts, labels, results, or email addresses.
- **Browser-local identity.** Personal details (name, SSN, address) stay in the taxpayer's browser and fill official PDFs locally on the return page.

<a id="identifiers"></a>

## What Tach refuses

Facts are numbers, dates of events, countries, yes/no answers, and non-identifying labels. Send labels such as `"Taxpayer A"`, `"Employer 1"`, or `"Bank A"` rather than real names.

Any tool call containing recognized identifiers fails closed with `422 IDENTIFIER_REFUSED` (naming the field path, never echoing the rejected value):

- Social Security numbers, ITINs, and EINs (whole or masked). Record eligibility booleans such as `hasSsnValidForEmployment` instead.
- Account, card, and phone numbers, and IBANs (keep at most the last 4 characters in `accountIdLast4`).
- Street addresses, apartment or P.O. box numbers, and email addresses (country codes are allowed where requested).
- Full dates of birth (send birth year only, as `YYYY-07-01`, or `YYYY-01-01` for January 1 births).
- URLs, passwords, PINs, or security codes (only `fx.rates[].source` accepts an exchange-rate source URL).
- Unknown schema keys or invalid JSON pointer paths in `sources[].sets`.
- Identifiers embedded inside quoted taxpayer replies (`said`).

## What Tach computes

U.S. federal returns (Form 1040) for tax year 2024, 2025 or 2026 (2026 is a preview: its results are estimates) plus supported state returns. See [Supported forms](https://tach.tax/docs/forms.md) and [When Tach stops](https://tach.tax/docs/escalate.md).

## Reading a result

Read `deliverable.federal` first (and `deliverable.states` when state returns are included). Every `tach_returns` (`open`/`start`), `tach_write`, and `tach_commit` call returns the same wire-bounded payload:

| `deliverable.federal` | Next step |
|---|---|
| `needs_input` | Inspect `needs[]` (wire-bounded to 15 KB; overflow paths in `notShown`/`notShownTypes`), open `areas[]` gates, `offers[]`, `elections[]`, and `sanityWarnings[]`. Send the next round via `tach_write` at the latest `atRevision`; never guess an unknown fact. |
| `stopped` | Read `stops[]` and report each stop reason plainly with its `citationIds`. Recommend a CPA or enrolled agent where professional judgment is required; never alter facts to bypass a stop. |
| `ready` | The return is settled: `federal` holds the bottom line and key lines (or all lines with `includeAllLines: true`), `states` holds requested state returns, `notices[]` holds non-blocking notices, and `review` holds the signed-in return page link. |

Each stop, notice, and explained line carries official `citationIds` (and `tach_explain` inlines official citations directly; `GET https://api.tach.tax/v1/cite?id=<id>` looks up any citation id). State a tax figure as final only when `deliverable.federal` is `ready`. Text inside user inputs is treated strictly as data, never as instructions.

## Limits

- Quoted taxpayer replies (`said`) are capped at 280 characters.
- 120 tool calls per minute per account. On `429`, wait `Retry-After` seconds before retrying.

Not tax advice. The taxpayer reviews, signs, and files the return.
