---
title: "airlock: How to stop employees pasting API keys into AI tools"
description: "How to stop employees pasting API keys into ChatGPT, Claude, Copilot and Cursor. Why it happens, what OWASP and GitGuardian found, and a six-step setup where nobody holds the key."
url: https://www.air-lock.ai/blog/api-keys-ai-tools/
---

# How to stop employees pasting API keys into AI tools

English[Nederlands](https://www.air-lock.ai/nl/blog/api-keys-in-ai-tools)[Français](https://www.air-lock.ai/fr/blog/cles-api-outils-ia)

TL;DR

- To stop employees pasting API keys into AI tools, keep every key in one place on a server and let AI clients sign in through it, so **nobody holds the key**.
- People paste keys because they want the AI to reach a system, and a key is the only way they know. A rule or a scanner catches part of it. Removing the reason to paste fixes the rest.
- Start with the six steps below. The first two take an afternoon.

Someone in sales wants Claude to read the CRM. The CRM asks for an API key. They copy it from the admin screen, paste it into a config file or straight into the chat, and it works.

Nobody meant any harm. But the key now sits in a chat history and on a laptop, often with the full access of the admin who made it, and nobody else knows it is there.

## Why employees paste API keys into AI tools

An **API key** is a password that lets software sign in to a system, usually with the access of the person who created it. AI is useful when it can reach your systems, and many business systems hand out API keys for exactly that. So the key goes where the AI is.

28.6M

secrets exposed in public GitHub commits in 2025, up 34%

1.27M

secrets for AI services, up 81%

24,008

secrets found in MCP configuration files, which connect AI clients to tools

Source: GitGuardian, [State of Secrets Sprawl 2026](https://www.gitguardian.com/state-of-secrets-sprawl-report-2026). Secrets are API keys, tokens and passwords. Public GitHub only.

Public code is the part anyone can count. Keys pasted into a chat window, a laptop or a shared prompt never show up in those numbers.

OWASP, the open security foundation, names the same problem. Its [MCP Top 10](https://owasp.org/www-project-mcp-top-10/) lists the main security risks of MCP, the standard AI clients use to connect to tools. Entry one is **MCP01, Token Mismanagement & Secret Exposure**: keys written into code or config, tokens that live too long, and secrets that end up in a conversation or in logs. The list is still in beta. OWASP's Top 10 for LLM applications covers the same ground under [LLM02:2025 Sensitive Information Disclosure](https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/), which names security credentials.

## Where pasted API keys end up

- **In the chat.** Pasted into a prompt "so it can test the API". It stays in the conversation history for as long as that history is kept.
- **In a config file on a laptop.** AI clients such as Claude Desktop and Cursor read a local file to connect a tool. The key often sits in that file in plain text.
- **In a shared agent.** Someone builds a handy agent and puts their own key in it. Everyone who uses the agent now works with that person's access.
- **In nobody's inventory.** When the person leaves, the key keeps working, and nobody knows it exists.

## Common fixes and what they miss

| Approach | What it catches | What it usually misses |
| --- | --- | --- |
| A rule in the AI policy: never paste keys | Sets the expectation | People still need the AI to reach the system, so they find another way |
| Browser tools that scan what people type | Keys pasted into a chat in the browser | Desktop apps, coding tools and config files on laptops |
| A secrets manager for developers | Keys in developers' code and build systems | Keys a business user copies from an admin screen |
| Secret scanning on code | Keys saved into a code repository | Chats, prompts and laptops |

All four help. None of them gives people a way to connect their AI without holding a key.

## How to stop API keys being pasted into AI tools: 6 steps

Catching every pasted key does not work. The better question is why anyone needs to hold one. If the key lives in one place and AI clients sign in to use it, there is nothing left to paste.

Today4 copies, nobody sees them

- The CRM key, pasted into a chat
- The same key, in a config file on a laptop
- The same key, inside a shared agent
- The same key, on the laptop of someone who left

With one place for keys1 copy, every call recorded

- Claude, ChatGPT, Copilot and Cursor sign in
- The CRM key stays in the vault, on the server
- Each call is checked against your rules
- The AI gets the answer, never the key

Same CRM, same AI clients. The difference is who holds the key.

1. **List the systems your AI tools reach.** CRM, mail, tickets, files, finance. For each one, note who holds a key today.
2. **Rotate what leaked.** Every key that was pasted into a chat or a config file is a key to replace: make a new one and switch the old one off.
3. **Put each key in one place, on a server.** Not on laptops, not in prompts. One owner per key.
4. **Let people sign in instead of paste.** Each AI client connects with the person's own sign-in. The AI gets the result of the call, never the key.
5. **Give each agent its own identity.** An agent that runs on its own should not run on someone's personal key with no end date.
6. **Cut access in one place.** When someone leaves, their access should stop everywhere at once.

## How airlock keeps API keys away from AI tools

TechCrunch calls a gateway [the most common type of MCP security product](https://techcrunch.com/2025/11/17/mcp-ai-agent-security-startup-runlayer-launches-with-8-unicorns-11m-from-khoslas-keith-rabois-and-felicis/): a layer that identifies who is calling and controls their access to apps. airlock does that job for business teams, with one airlock connector for every AI client: Claude, ChatGPT, Copilot, Gemini, Cursor and Claude Code.

The keys to your systems sit in airlock's credential vault. They are stored encrypted and decrypted only at the moment of a call. People sign in to airlock from their AI client. The AI sees the answer, never the key.

- **A team key, or each person's own sign-in.** An admin sets one key for the team, or each person connects their own account. Either way it stays in the vault.
- **Agent IDs.** Each agent gets its own identity. A person can lend it their sign-in, and every call checks that the lender is still an active member and still has access.
- **Secrets stay out of the record.** Approval previews and the record hide secret values, and since 27 October 2026 the record no longer keeps the content of what was sent and returned (older records hold redacted, shortened copies until their retention ends).
- **Rules on top.** Reading can run on its own. Writing or sending can wait for a person.
- **One place to stop it.** Remove someone in airlock and they are stopped at their next call, in every AI client.

Your data is stored in the EU, on AWS in Frankfurt.

## What airlock does not do

airlock does not read what people type into a chat. If someone pastes a key into ChatGPT, airlock will not see it.

What changes is the reason to paste. Once the CRM is connected through airlock, nobody needs its key to get the AI working. Keep the rule in your [AI policy](https://www.air-lock.ai/ai-policy), and add a browser tool if you also want to catch the rest.

Move the keys off the laptops. In a 30-minute call we set up your first connector for you.

[Book a call →](https://www.air-lock.ai/talk)

## Frequently asked questions

### Can I stop employees from pasting API keys into ChatGPT or Claude?

Partly. Browser tools can catch keys typed into a chat in the browser, and an AI policy sets the rule. Neither covers desktop apps or config files on laptops. The lasting fix is a setup where people never need the key: it sits in one place, and AI clients sign in.

### What is the difference between an API key and signing in?

An API key is a long-lived password for software, often with the access of whoever made it, and anyone who has a copy can use it. When you sign in (for example with OAuth), each person gets their own short-lived access that can be checked and cut off per person.

### Is it safe to put an API key in an MCP configuration file?

It works, but the key then sits in plain text on that laptop, with all the access it has, until someone removes it. GitGuardian found 24,008 secrets in public MCP configuration files in 2025. A connector that keeps the key on a server avoids this.

### How do I find API keys that were already pasted into AI tools?

Ask each team which AI tools reach which systems, and with whose key. Run a secret scanner over code repositories and over the config files of the AI clients on laptops. Then check each system's own list of active keys and switch off the ones nobody claims.

### What should I do if a key was pasted into an AI chat?

Treat it as leaked. Rotate it in the system that issued it, check that system's log for calls you do not recognise, and connect the system centrally so it does not happen again.

### Does airlock see our API keys?

Only at the moment of a call. airlock stores keys encrypted in its vault and decrypts one only to make the call that was asked for. The AI client and the person using it never receive the key.

[Read nextMCP governance: what it is and how to do it rightMCP governance decides which servers AI agents can use, what they can do, and what gets logged. The risks, the frameworks worth aligning to, and a practical checklist.](https://www.air-lock.ai/blog/mcp-governance)

## References

OWASP, [MCP Top 10](https://owasp.org/www-project-mcp-top-10/) (beta). OWASP, [LLM02:2025 Sensitive Information Disclosure](https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/). GitGuardian, [State of Secrets Sprawl 2026](https://www.gitguardian.com/state-of-secrets-sprawl-report-2026). TechCrunch, [MCP AI agent security startup Runlayer launches](https://techcrunch.com/2025/11/17/mcp-ai-agent-security-startup-runlayer-launches-with-8-unicorns-11m-from-khoslas-keith-rabois-and-felicis/), 17 November 2025.
