Source: https://keypaste.com/help/connect-an-ai-tool/
Last updated: 2026-12-01

# Connect an AI tool

Let an AI tool such as Claude Code, Codex or Cursor ask keypaste for a key, and decide each time whether it gets it.

**Before you start:**

- keypaste open, with your vault unlocked.
- The AI tool installed on this computer.

## Connect it

1.  Click **Agents** at the left of keypaste’s window, then click **+** (Connect an AI tool…).
2.  Under **Found on this computer**, click **Connect…** beside your tool.
3.  keypaste says what it will change in the tool. If you have more than one vault, choose which ones it can reach: **All vaults**, which includes vaults you add later, or **Only these**, and tick them.
4.  Click **Add it for me**.
5.  If keypaste says to restart the tool, quit it and open it again.

![The Connect an AI tool sheet listing the tools found on this computer](https://keypaste.com/docs-media/docs/help/images/connect-ai-tool.png)

To change which vaults a connected tool reaches, choose it in **Agents**, click **Change…** beside **Vaults**, choose again and click **Save**.

## Answer its first request

1.  Leave keypaste running with your vault unlocked, and ask your AI tool to do something that needs a key.
2.  keypaste shows which tool is asking, for which item, and the reason the tool gave.
3.  Click **Deny** to send nothing, **Allow once** to send this one value, or **Always allow** to keep sending that field to that tool without asking.

An Always allow lasts until you remove it from the tool’s page in **Agents**. **Agents › Activity** lists every request and its answer, never the value.

![keypaste asking whether to give Claude Code a key, with Deny, Allow once and Always allow](https://keypaste.com/docs-media/docs/help/images/agent-request.png)

## If it doesn’t work

- **Your tool isn’t listed.** Click **Copy setup prompt** and paste it into your AI tool, which shows you how it would connect. Or open **Set it up by hand** and add what it shows to your tool’s settings.
- **The tool says keypaste is locked or not running.** Every request is refused while your vault is locked. Unlock it in keypaste and ask again.
- **The tool doesn’t see keypaste.** Restart the tool, then start a new conversation in it.

## Related

- [Unlock your vault](https://keypaste.com/help/unlock-your-vault/)
- [How approvals work](https://keypaste.com/developers/how-approvals-work/)
- [Connect an AI tool from a terminal](https://keypaste.com/developers/mcp-setup/)
