How to connect a coding assistant to Tarkle with an API key

Create an API key in Settings, then add it to Claude Code, Codex, Cursor, VS Code or Windsurf.

Updated Nov 4, 20264 min read

Claude Code, Codex, Cursor, VS Code and Windsurf connect to Tarkle through the MCP server. Each of them sends an API key from your organization with every request, so the first step is to create that key. This article shows how to create the key, add it to your assistant, and test the connection.

Create an API key

Only the owner and admins of your organization can see the API page, create keys, copy them or delete them. If you are a member, ask an owner or admin to create the key for you.

  1. Open Settings, then API at API. This page belongs to your organization, so you do not pick a workspace first.

  2. Click Create.

  3. Under Name, type a name you will recognise, such as "Cursor on my laptop". A name can be up to 80 characters.

  4. Under Access, choose All workspaces, or choose Only selected workspaces and pick the workspaces the key may reach.

  5. Click Create in the dialog.

  6. Click the key in the API key created dialog to copy it, then click Done.

Tarkle shows the full key in the API key created dialog. Paste it somewhere safe before you click Done. You can copy it again later from the menu at the end of the key's row. The key acts as the person who made it, and it can read and change everything in Tarkle in the workspaces it may reach. It cannot make purchases. With Only selected workspaces, the assistant sees only those workspaces.

Keys made before full access was added can show a Legacy badge. Those keys keep their older, limited permissions, and an assistant cannot connect with them. Create a new key for full access, then use it in the setup below.

Connect your assistant

Every setup below uses the server address https://mcp.tarkle.com/mcp and sends your key in an Authorization header. Replace <your-tarkle-key> with the key you copied, in each command or file. Developers can read the full setup in the MCP server developer documentation.

Claude Code

Run this command in a terminal:

``bash claude mcp add --transport http tarkle https://mcp.tarkle.com/mcp --header "Authorization: Bearer <your-tarkle-key>" ``

Codex

Store the key in an environment variable named TARKLE_MCP_TOKEN, then add the server. Codex reads the key from that variable.

``bash export TARKLE_MCP_TOKEN=<your-tarkle-key> codex mcp add tarkle --url https://mcp.tarkle.com/mcp --bearer-token-env-var TARKLE_MCP_TOKEN ``

Cursor

Open Cursor Settings, go to Tools & MCP, click New MCP Server, and use this configuration:

``json { "mcpServers": { "tarkle": { "url": "https://mcp.tarkle.com/mcp", "headers": { "Authorization": "Bearer <your-tarkle-key>" } } } } ``

VS Code (GitHub Copilot)

In your project, open the MCP file for VS Code, named mcp.json, and add this. VS Code uses a top-level servers key and needs "type": "http".

``json { "servers": { "tarkle": { "type": "http", "url": "https://mcp.tarkle.com/mcp", "headers": { "Authorization": "Bearer <your-tarkle-key>" } } } } ``

Windsurf

Open Windsurf's MCP configuration file, mcp_config.json, add the configuration below, save the file and restart Windsurf. Windsurf reads the server address from serverUrl.

``json { "mcpServers": { "tarkle": { "serverUrl": "https://mcp.tarkle.com/mcp", "headers": { "Authorization": "Bearer <your-tarkle-key>" } } } } ``

Other MCP clients

Any client that supports remote (streamable HTTP) MCP servers with custom headers can connect the same way, with the server address and the Authorization header shown above. Cursor and other MCP clients covers connecting more of them.

ChatGPT, Claude and Grok do not use a key. Add Tarkle as a custom connector with the server address, then sign in to Tarkle in the browser and approve access.

Test the connection

Ask your assistant: "List my Tarkle workspaces." A list of your workspaces means the connection works. If the assistant cannot connect, check that the key in the setup is the one you copied, and that it is not a Legacy key or a deleted one. For other messages, see Fix problems connecting an AI assistant to Tarkle.

Copy, rename or delete a key

Open the menu at the end of the key's row on the API page. Copy token copies the key again. It is available for keys made after copying was added. Rename changes the name, and Delete removes the key. A deleted key stops working right away, everywhere it is used, so any assistant that uses it can no longer connect. Create a new key and update the setup to replace it.

What happens next

Once the test passes, ask your assistant for the task you need, such as listing the files in a workspace. What an AI assistant can do in Tarkle lists what the assistant can see and do, and which actions wait for your OK.

Related articles

More in AI and automation