---
title: "Connect Claude and MCP clients | Tarka Docs"
description: "Connect Claude, Claude Code, or another MCP client to Tarka with OAuth, and see what read and write access allow, which tools exist, and how to end a connection."
url: "https://tarkahq.com/docs/control-api/mcp/"
---

Available Control API · MCP

# Connect Claude and other MCP clients

Tarka's MCP server gives an AI assistant the Control API as tools. You sign in with your Tarka account and approve the connection, with no key or token to paste.

On this page

[Server](https://tarkahq.com/docs/control-api/mcp/#server) [Claude](https://tarkahq.com/docs/control-api/mcp/#claude) [Claude Code](https://tarkahq.com/docs/control-api/mcp/#claude-code) [Other clients](https://tarkahq.com/docs/control-api/mcp/#other-clients) [Access](https://tarkahq.com/docs/control-api/mcp/#access) [Tools](https://tarkahq.com/docs/control-api/mcp/#tools) [Connections](https://tarkahq.com/docs/control-api/mcp/#connections) [Security](https://tarkahq.com/docs/control-api/mcp/#security)

Server

## One URL, signed in through your browser

Add the server to your client by its URL. The client registers itself and opens Tarka in your browser, where you sign in with your console account and approve the connection.

**Server URL** `https://tarka.rest/mcp`

A remote Streamable HTTP server. There is nothing to install.

**Sign-in** `OAuth`

Your Tarka console account. A new account can connect once Tarka has approved it.

**Access** `provisioning:read`

You choose read only, or read and write, when you approve the connection. Your roles, product approvals, and quotas still apply.

Claude

## Add Tarka as a custom connector

Custom connectors work on every Claude plan; the Free plan allows one.

1. 01

   **Add the connector**

   In Claude, open **Customize › Connectors** and select **Add custom connector**. Enter `https://tarka.rest/mcp` and select **Add**. Leave the OAuth client ID and secret empty. If Claude asks how to sign in, choose **Sign in now**, and for the OAuth client choose **Register automatically**.
2. 02

   **Sign in to Tarka**

   Select **Connect** if Claude hasn't started the sign-in. Tarka opens in your browser: sign in with your console account, check the client and its callback address, choose **Read only** or **Read and write**, and allow the connection. Choose read and write if you want Claude to create and manage resources.
3. 03

   **Use it in a chat**

   In a chat, open **+ › Connectors** and turn on Tarka. Then ask, for example: “Which Tarka workspaces am I in, and which products are approved?”

**On a Claude Team or Enterprise plan**

An Owner adds the connector for the organization under **Organization settings › Connectors**: select **Add**, then **Custom**. Each member then finds it under **Customize › Connectors** and selects **Connect** to sign in with their own Tarka account.

Claude Code

## Add the server from your terminal

Run this in your terminal, not inside a Claude Code session. `--scope user` makes Tarka available in all your projects.

Add the server `claude mcp add`

```
claude mcp add --transport http --scope user tarka https://tarka.rest/mcp
```

Then start `claude`, run `/mcp`, select `tarka`, and choose **Authenticate**. Your browser opens the same Tarka consent screen. A connector you added in Claude also loads in Claude Code when you sign in with the same Claude account.

Other clients

## Any client with OAuth and dynamic registration

A client needs remote Streamable HTTP and OAuth with dynamic client registration. It needs no client secret.

| Requirement | Tarka's server |
| --- | --- |
| Discovery | `https://tarka.rest/.well-known/oauth-protected-resource/mcp` |
| Registration | Dynamic, with no client secret |
| Proof key | PKCE with `S256`, required |
| Resource | `resource=https://tarka.rest/mcp` when authorizing and when exchanging the code |
| Callback | HTTPS, or HTTP on a loopback address for local clients. It must match the registered address exactly and have no fragment. |
| Where requests come from | Desktop, command-line, and server-side clients. Requests from web pages on other sites are refused. |

Access

## Read access, or read and write

A connection reaches every workspace you can reach, with your current roles, product approvals, and quotas.

| Access | Scope | What the client can do |
| --- | --- | --- |
| **Read** | `provisioning:read` | Call every tool whose name starts with `tarka_get_`, `tarka_list_`, or `tarka_read_`: your account, workspaces, models, resources, usage, and the configuration and credentials you can view. |
| **Read and write** | `provisioning:read provisioning:write` | Also create, update, and delete resources, run code in sandboxes, create and revoke keys and credentials, and change organizations and quota policy. Changes can incur charges. |

**You choose the access when you connect.**

The consent screen starts with the access your client asks for, and you can change it to read only, or to read and write. If your client asks only to read, choose **Read and write** when you connect it to let it create and manage resources. A read-only connection that tries a change gets HTTP `403` with `insufficient_scope`; to change a connection's access, disconnect it on the MCP connections page and connect again.

Tools

## Control API tools

ProvisioningService and SandboxService methods are exposed as tools named `tarka_` plus the method name in snake case: `ListModels` becomes `tarka_list_models`. Tools run the same handlers and checks as REST and gRPC. `UpdateSpendLimits` and `UploadAgentHostSecrets` are excluded: change spending limits and upload secret values yourself in the console or through the direct Control API.

For host secrets, the assistant prepares a handoff with `tarka_prepare_agent_host_secrets`. Open its authenticated console link and upload your file there. The assistant checks metadata with `tarka_get_agent_host_secrets`, then passes `secrets_bundle_id` when creating the host. It receives key names and status, never the uploaded values. Do not put plaintext secrets or registry PATs into MCP arguments.

**Start here** `tarka_get_current_user`

Returns your organization IDs and product approvals. Most other tools take an `org_id`.

**Arguments** `protobuf JSON`

Snake-case fields, and unknown fields are rejected. Money (`cost_microcents`, $0.00000001 each) and other 64-bit integers are decimal strings.

**Errors** `isError`

A failed call returns `isError` with the gRPC status code. Check it before reading `structuredContent`.

First call `tools/call`

```
{
  "name": "tarka_get_current_user",
  "arguments": {}
}
```

| Ask your assistant | Tool it uses |
| --- | --- |
| Which workspaces am I in, and which products are approved? | `tarka_get_current_user` |
| Which models can I call, and at what price? | `tarka_list_models` |
| How much have we used this month? | `tarka_get_usage_summary` |
| What is running in my workspace, and is it ready? | `tarka_list_provisioned_resources` |
| Which API keys are active? | `tarka_list_api_keys` |

With write access, `tarka_bootstrap_current_user` creates a first workspace for an account that has none. Tools that take an idempotency key behave as they do in the API: reuse a key only to retry the same request.

Connections

## See and end your connections

[MCP connections](https://tarkahq.com/oauth/mcp), also in the console menu, lists each connected client with its access (Read only, or Read and write) and the date it expires. **Disconnect** ends a connection at once: its access and refresh tokens stop working.

| Limit | Value |
| --- | --- |
| Consent screen | 10 minutes to approve the request |
| Authorization code | 60 seconds, and it works once |
| Access token | 15 minutes; your client refreshes it |
| Connection | 30 days, then connect again |
| Client registration | 90 days, then your client registers again |
| Active connections | 32 per account |

Security

## What a connection can reach

**MCP only**

MCP tokens work only at `https://tarka.rest/mcp`. They cannot call the REST or gRPC Control API or the Inference API, and your console session never reaches the client.

**Checked on every call**

Each call checks again that your account is approved and in good standing, along with your organization roles and product approvals.

**Replay ends it**

Reusing an old authorization code or refresh token revokes the whole connection.

**Approve only clients you trust.**

The client's developer supplies the name on the consent screen, so check its callback address. Some reads return sensitive values, such as an Agent Host's gateway pairing details. With write access, an assistant can do what you can: start billable resources, create keys, and change quota policy.
