Sign in

Give Claude Code, Codex and Cursor your API keys without pasting them

AI coding agents need API keys to build and test your projects. A key pasted into a chat stays in the conversation history, and the agent may write it into a file that ends up in git. KeyShifter gives the agent a revocable token instead, and keeps the real key encrypted.

How it works

  1. Add your keys to KeyShifterThey are encrypted in your browser before they are uploaded.
  2. Connect your agent onceOver MCP, with the command for your tool below.
  3. The agent sets up the projectWhen a project needs a key, the agent calls setup_project_env. KeyShifter creates a token for that project and returns .env lines with a proxy URL and the token.
  4. Your code calls the provider through KeyShifterThe real key is added on the way. It never appears in the agent’s context or in your files.
  5. Revoke when you are doneRemove a project’s token on the Connections page. Your provider key and your other projects are unaffected.

Connect Claude Code

Run this once. The Connections page in the dashboard shows the same command with your token filled in.

Terminal
claude mcp add --transport http --scope user keyshifter https://keyshifter.app/mcp \
  --header "Authorization: Bearer <your KeyShifter token>"

Connect Codex

Put the export in your shell profile (for example ~/.zshrc) so Codex can read it.

Terminal
export KEYSHIFTER_TOKEN=<your KeyShifter token>
codex mcp add keyshifter --url https://keyshifter.app/mcp --bearer-token-env-var KEYSHIFTER_TOKEN

Connect Cursor

~/.cursor/mcp.json
{
  "mcpServers": {
    "keyshifter": {
      "url": "https://keyshifter.app/mcp",
      "headers": {
        "Authorization": "Bearer <your KeyShifter token>"
      }
    }
  }
}

What the agent can do

list_key_pools
Lists your pools, their proxy URLs and the health of each key. Returns no secrets.
setup_project_env
Creates a token for one project and returns the .env lines to use it.
get_usage
Shows today’s usage per key and recent shifts between keys.
list_sync_targets, get_sync_status, request_secret_sync
Read Cloudflare Worker sync status and ask for a sync. You approve every push in the dashboard.
reveal_active_key
Off unless you switch it on for a connection. Only for programs that can’t use a proxy.

Optional: run the agent itself on your keys

Claude Code can use an Anthropic pool through ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, and Codex can use an OpenAI pool through a model_providers entry. If a key is rate limited or out of credit, the agent carries on with the next key in the pool.

Questions

Does the agent ever see my API key?

No. It only sees KeyShifter tokens, unless you switch on reveal_active_key for that connection.

What if a token leaks?

Revoke it on the Connections page and it stops working immediately. Your provider key stays valid, and you don’t have to rotate it or touch other projects.

Does it work with other MCP clients?

Any client that can connect to a remote MCP server over HTTP with an Authorization header can use the same URL and token.

How are the keys protected?

See how KeyShifter protects your API keys.