Back to guides
Troubleshooting·November 14, 2026·6 min read

“claude.ai connectors are disabled because ANTHROPIC_API_KEY or another auth source is set” in Claude Code — what it means and what to do

Claude Code prints this line at startup when a credential that ranks above your claude.ai login is in use, such as ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY or an apiKeyHelper script. The session runs on that credential and model requests work as usual. What it does not load are the connectors you added at claude.ai, and Remote Control and /schedule are off too. If you did not mean to use a key, find where it is set: often that is the env block of ~/.claude/settings.json, which unset in your shell cannot clear. If you did, nothing is broken.

Last reviewed on .

Claude Code prints this line at startup when a credential that ranks above your claude.ai login is in use, such as ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY or an apiKeyHelper script. The session runs on that credential and model requests work as usual. What it does not load are the connectors you added at claude.ai, and Remote Control and /schedule are off too. If you did not mean to use a key, find where it is set: often that is the env block of ~/.claude/settings.json, which unset in your shell cannot clear. If you did, nothing is broken.

The error

Claude Code
claude.ai connectors are disabled because ANTHROPIC_API_KEY or another auth source is set and
takes precedence over your claude.ai login. Unset it to load your organization's connectors.

# Printed at startup. ANTHROPIC_API_KEY is only the line's example: the credential
# in use can be ANTHROPIC_AUTH_TOKEN, an apiKeyHelper script or another source.
# /status names it.

Causes and fixes at a glance

CauseFix
ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY in the env block of ~/.claude/settings.jsonDelete it from the file, and ANTHROPIC_BASE_URL with it if that points at a gateway; unset in your shell cannot clear them.
An export in your shell profile, such as ~/.zshrc or ~/.bashrcDelete the export, open a new terminal and run /status.
An apiKeyHelper setting, or a provider-switching tool that wrote the variablesRemove apiKeyHelper, or switch the tool back to your claude.ai account.
You meant to run Claude Code on a gateway or with an API keyNothing to fix. Start a session without the key and the gateway's ANTHROPIC_BASE_URL when you need connectors.

Read the line: the key is in use, the connectors are not

When several credentials are present, Claude Code uses one, in this order: cloud provider credentials when CLAUDE_CODE_USE_BEDROCK, CLAUDE_CODE_USE_VERTEX or CLAUDE_CODE_USE_FOUNDRY is set, then ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY, an apiKeyHelper script, CLAUDE_CODE_OAUTH_TOKEN, Anthropic profile and federation credentials, and last the subscription login from /login (https://code.claude.com/docs/en/authentication#authentication-precedence, checked on November 14, 2026). Connectors added at claude.ai are fetched only when that subscription login is the method in use, so Claude Code does not load them while a credential above it is set, even if you ran /login before (https://code.claude.com/docs/en/mcp#use-mcp-servers-from-claude-ai). The ANTHROPIC_API_KEY in the line is only an example. Claude Code's changelog for version 2.1.139, released on May 11, 2026, lists four features that are off while ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN or apiKeyHelper is set, even when a claude.ai login exists: claude.ai connectors, Remote Control, /schedule and notification preferences. Model requests go out on the credential in use and are not affected.

Find where the credential is set

Run /status inside Claude Code: it names the authentication method in use. Then check the places a credential can come from. A variable exported in your shell profile reaches every terminal. A variable in the env block of a settings file is applied by Claude Code itself at every launch, so running unset in your shell changes nothing. That is the case reported in anthropics/claude-code#108528 on November 9, 2026: the line kept naming ANTHROPIC_API_KEY after it was unset, and the credential in use was ANTHROPIC_AUTH_TOKEN in the env block of ~/.claude/settings.json. Tools that switch Claude Code between providers write ANTHROPIC_BASE_URL and a token into that same block, and apiKeyHelper is a settings key of its own.

find_the_credential.sh
# In Claude Code, run /status first: it names the method in use.

# Exported in this shell? (prints the names, not the values)
env | grep -oE '^ANTHROPIC_(API_KEY|AUTH_TOKEN|BASE_URL)='

# Set by a settings file (user, project, local)?
grep -noE 'ANTHROPIC_(API_KEY|AUTH_TOKEN|BASE_URL)|apiKeyHelper' \
  ~/.claude/settings.json .claude/settings.json .claude/settings.local.json 2>/dev/null

# Exported by a shell startup file?
grep -noE 'ANTHROPIC_(API_KEY|AUTH_TOKEN|BASE_URL)' \
  ~/.zshenv ~/.zprofile ~/.zshrc ~/.bash_profile ~/.bashrc ~/.profile 2>/dev/null

Choose: your claude.ai login with connectors, or the key

To get your connectors back, remove the credential where you found it: the line in the env block, the export in your profile, or the apiKeyHelper key. If ANTHROPIC_BASE_URL is set next to it and points at a gateway, remove that too: with only the base URL left, Claude Code uses your claude.ai login but still sends its requests, with that login's token, to the gateway, and Remote Control stays off (https://code.claude.com/docs/en/llm-gateway#subscriptions-and-gateways). Open a new terminal, start Claude Code, run /login and select your claude.ai account; /mcp then lists the claude.ai connectors. To keep using the key, for a gateway, a team key or pay-per-token billing, leave it: the line is information, not an error. To have both, keep the key and ANTHROPIC_BASE_URL out of settings.json and set them only for the sessions that need them, as below, so that a plain claude starts on your subscription, sends its requests to Anthropic and loads its connectors. MCP servers you add to Claude Code yourself, with claude mcp add or a project's .mcp.json, are not claude.ai connectors, and this rule does not cover them. If you never use connectors, set disableClaudeAiConnectors to true in your settings, or start Claude Code with ENABLE_CLAUDEAI_MCP_SERVERS=false for one shell, and Claude Code stops fetching them (https://code.claude.com/docs/en/mcp#disable-claude-ai-connectors).

~/.zshrc
# A second command for gateway sessions. Plain `claude` keeps your
# claude.ai login, talks to Anthropic and loads its connectors;
# `kclaude` runs on the Kunavo key. Neither variable is in settings.json.
export KUNAVO_API_KEY="sk-kn-..."   # your key; Claude Code never reads this name
kclaude() {
  ANTHROPIC_BASE_URL=https://api.kunavo.com \
  ANTHROPIC_AUTH_TOKEN="$KUNAVO_API_KEY" \
  claude "$@"
}
# Add the model variables from the Claude Code integration guide the same way.

If you’re calling through Kunavo

Claude Code through Kunavo sets exactly this kind of credential: Kunavo's Claude Code setup uses ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, exported for a session or kept in the env block of ~/.claude/settings.json. If you are also signed in with a claude.ai account, Claude Code prints this line at startup. That is expected: the session runs on your Kunavo key, and model requests are billed per token to your Kunavo balance. In those sessions you do not have claude.ai connectors, Remote Control or /schedule. If you use both, set the Kunavo variables per launch as in the last step instead of in settings.json, and start a plain claude for subscription sessions. How Claude Code connects to Kunavo is in the Claude Code integration guide.

Frequently asked questions

What does “claude.ai connectors are disabled because ANTHROPIC_API_KEY or another auth source is set” mean?

Claude Code found a credential that ranks above your claude.ai login, such as ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY or an apiKeyHelper script, and uses that credential for the session. Connectors you added at claude.ai load only when the claude.ai login is the method in use, so Claude Code skips them. The session itself works normally.

I unset ANTHROPIC_API_KEY and the message is still there. Why?

Another source still sets a credential. The usual one is the env block of ~/.claude/settings.json, which Claude Code applies at every launch, so unset in your shell does not reach it. The line also names ANTHROPIC_API_KEY when the credential in use is ANTHROPIC_AUTH_TOKEN or apiKeyHelper. Run /status to see the method in use, then check settings.json, your shell profile and apiKeyHelper.

Does the message mean my API key or gateway is broken?

No, it means the key is in use. Model requests go to the endpoint and the account behind that credential and are billed there. What is off in that session are the features that need a claude.ai login: claude.ai connectors, Remote Control, /schedule, notification preferences and voice dictation.

Can I use claude.ai connectors and an API key in the same session?

No. Claude Code fetches connectors only when the claude.ai subscription login is the authentication method in use. Keep two setups instead: set the key and ANTHROPIC_BASE_URL only for the sessions that need them, and start Claude Code without either when you want your connectors. MCP servers you add to Claude Code itself are not covered by this rule, but some Anthropic-hosted connectors, such as Gmail, Google Calendar and Microsoft 365, can be connected only through claude.ai.

How do I stop Claude Code from fetching claude.ai connectors at all?

Set disableClaudeAiConnectors to true in any settings file, or start Claude Code with ENABLE_CLAUDEAI_MCP_SERVERS=false for the current shell. Both stop Claude Code from fetching the connectors it would otherwise load from claude.ai.

Related guides

More error semantics live in the error reference; getting a key takes a minute via signing up and the authentication guide.