# MCP server

ThinkBench self-hosts an MCP server at:

```text
https://app.thinkbench.com/api/v1/mcp
```

Its tools are the [API operations](/api) — the same contract that defines
REST, the SDK, and the CLI registers each operation as a tool, so an agent
connected over MCP can do exactly what the API can do, with the same
authorization.

## Connect

With an API key, from Claude Code:

```bash
claude mcp add --transport http thinkbench https://app.thinkbench.com/api/v1/mcp \
  --header "x-api-key: $THINKBENCH_API_KEY"
```

Or in a JSON MCP configuration:

```json
{
  "mcpServers": {
    "thinkbench": {
      "type": "http",
      "url": "https://app.thinkbench.com/api/v1/mcp",
      "headers": { "x-api-key": "<your API key>" }
    }
  }
}
```

## OAuth for remote clients

Clients that can't hold an API key can connect with no configuration at all:
the server speaks OAuth 2.1. An unauthenticated request is challenged, the
client registers itself, and you approve it once in the browser. Edits made
through such a client are attributed to its registered name — see
[Authentication](/authentication).

## Tools

Tools marked read-only carry the MCP `readOnlyHint` annotation, so cautious
clients can call them without confirmation prompts.

| Tool | Read-only | Summary |
| --- | --- | --- |
| [`documents_read`](/api/documents/read) | yes | Read a ThinkBench document and return its current content as Markdown. |
| [`drive_items_shared_with_me`](/api/drive-items/shared-with-me) | yes | List items shared directly with the user via share grants. |
| [`drive_items_get`](/api/drive-items/get) | yes | Read a drive item with its drive, children, visible ancestors, and shares. |
| [`drive_items_rename`](/api/drive-items/rename) | no | Rename a drive item. |
| [`drive_items_move`](/api/drive-items/move) | no | Move an item to another folder or drive. |
| [`drive_items_create_child`](/api/drive-items/create-child) | no | Create a folder or document inside a folder. |
| [`drive_items_share_suggestions`](/api/drive-items/share-suggestions) | yes | Organization members who could be given access to this item. |
| [`drive_items_share`](/api/drive-items/share) | no | Grant a person access to an item by email. |
| [`drive_items_update_share`](/api/drive-items/update-share) | no | Change an existing share grant's permission. |
| [`drive_items_remove_share`](/api/drive-items/remove-share) | no | Revoke a share grant. |
| [`drive_items_set_publication`](/api/drive-items/set-publication) | no | Publish or unpublish a document to the web. |
| [`drives_list`](/api/drives/list) | yes | List every drive the user can access, each with its items and members. |
| [`drives_create`](/api/drives/create) | no | Create a shared drive in the active organization. |
| [`drives_rename`](/api/drives/rename) | no | Rename a drive. |
| [`drives_create_item`](/api/drives/create-item) | no | Create a folder or document at the drive's root. |
| [`drives_upsert_member`](/api/drives/upsert-member) | no | Add an organization member to a shared drive or change their role. |
| [`drives_remove_member`](/api/drives/remove-member) | no | Remove a member from a shared drive. |
