> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useterse.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP

> Connect Claude Code, Codex, or Cursor to your deployed actors.

Connect a coding agent to Terse to inspect and call the deployed durable actors in your organization. It reads saved state, traces requests, reads logs, checks health, and calls methods.

```text theme={null}
https://api.useterse.ai/mcp
```

The agent discovers your projects through `list_projects`.

## Sign in

Pick one:

* **Your Terse account.** The agent opens your browser to sign in the first time. Use this on your own machine.
* **A personal API token.** Create one on the [API tokens](https://app.useterse.ai/api-tokens) page. Use this in CI and other headless runs. Project API keys don't work here.

Your sign-in or personal API token determines the organization.

## Connect your agent

> [tab] Claude Code
>
> Sign in with your account:
>
> ```sh theme={null}
> claude mcp add --transport http terse https://api.useterse.ai/mcp
> ```
>
> Then run `/mcp`, pick `terse`, and choose **Authenticate**.
>
> Or use an API token:
>
> ```sh theme={null}
> claude mcp add --transport http terse https://api.useterse.ai/mcp \
>   --header "Authorization: Bearer $TERSE_API_TOKEN"
> ```

> [tab] Codex
>
> Sign in with your account:
>
> ```sh theme={null}
> codex mcp add terse --url https://api.useterse.ai/mcp
> codex mcp login terse
> ```
>
> Or use an API token. Codex reads it from the environment when it starts:
>
> ```sh theme={null}
> export TERSE_API_TOKEN=terse_...
> codex mcp add terse --url https://api.useterse.ai/mcp \
>   --bearer-token-env-var TERSE_API_TOKEN
> ```

> [tab] Cursor
>
> Add the server to `~/.cursor/mcp.json`, or to `.cursor/mcp.json` in one repository:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "terse": { "url": "https://api.useterse.ai/mcp" }
>   }
> }
> ```
>
> Then open Cursor's MCP settings and connect `terse` to sign in.
>
> Or use an API token. Cursor reads it from the environment it starts in:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "terse": {
>       "url": "https://api.useterse.ai/mcp",
>       "headers": { "Authorization": "Bearer ${env:TERSE_API_TOKEN}" }
>     }
>   }
> }
> ```

Other agents work the same way. Give them the endpoint URL. Let them sign in, or send the API token as a bearer token.

## Tools

| Tool | What it does |
| - | - |
| `list_projects` | Lists deployed projects in your organization |
| `describe_deployment` | Lists actor classes and methods, with TypeScript declarations for every type |
| `list_actors` | Lists instances and their open connections, live first |
| `get_actor_state` | Reads an instance's saved state without waking it |
| `list_state_history` | Lists an instance's saved versions |
| `list_requests` | Lists requests with outcome, duration, queue wait, and cold starts |
| `list_logs` | Reads console output, filtered by actor, request, level, or text |
| `get_health` | Summarizes request counts, success rate, p95 latency, and queue waits |
| `list_websocket_sessions` | Lists WebSocket sessions as open, closed, or lost |
| `invoke_actor` | Calls a method on an instance |

Pass a `projectId` from `list_projects` to the other tools. Lists return pages. The agent passes the cursor back for the next page.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.