“claude.ai connectors are disabled because ANTHROPIC_API_KEY or another auth source is set and takes precedence” is a warning from Claude Code telling you that it did not load the connectors you added in claude.ai for this session. The cause is that a credential such as the ANTHROPIC_API_KEY environment variable takes precedence over your saved claude.ai login. Claude Code itself keeps running, but if an API key is in use, your usage is billed pay-as-you-go to that key’s organization rather than counted against your subscription.

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

The trailing “· Unset it to load your organization's connectors” is part of the same warning. What you should do depends on whether you want to use connectors.

First decide which credential you want Claude Code to run on

The path splits on whether you remove the key or keep it

You don’t remember setting an API key
An old key may be left in your shell config or a .env file
→ Find where it comes from
Check with /status and your environment variables
You want connectors (you want to run on your subscription)
Make your claude.ai login the active credential again
→ Remove the key and restart
Your login is still saved, not deleted
You use the key knowing it is billed through the API
Nothing is broken. Connectors are unavailable
→ What you lose and the alternatives
Local MCP servers still work
A diagram for choosing where to look based on your situation, drawn from the official authentication and MCP documentation.

1. What this warning is saying

Broken into parts, the warning reads like this.

Your login is not gone. It just isn’t being used

claude.ai connectors are disabled
The connectors you added in claude.ai have not been loaded in this session
because ANTHROPIC_API_KEY or another auth source is set
An API key, or some other credential, is configured
and takes precedence over your claude.ai login
That credential ranks above your claude.ai login in the precedence order
Unset it to load your organization's connectors
Remove it, and your organization’s connectors (the ones added in claude.ai) will load
The warning was verified against the string contained in the Claude Code v2.1.275 binary, and on September 26, 2026 we confirmed the wording is the same in v2.1.281.

What claude.ai connectors are

According to Claude Code’s official MCP documentation, MCP servers (connectors) you add on claude.ai’s connector settings page become available in Claude Code automatically, as long as you are logged in to Claude Code with your claude.ai account. When you open /mcp, they appear in the list with a marker showing they came from claude.ai. On Team and Enterprise plans, only admins can add connectors in claude.ai. In the official CHANGELOG, this feature is listed under v2.1.46 as making claude.ai MCP connectors available in Claude Code (npm has no release record under that number; the versions before and after it were published on February 17 and 18, 2026).

What arrives this way are the connectors Claude Code itself fetches from claude.ai in terminal, VS Code, JetBrains, and Agent SDK sessions. In cloud sessions the host supplies the connectors, and in local and SSH sessions of the Claude desktop app the app supplies them, so the path is different. According to the official authentication documentation, desktop app and cloud sessions do not use ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, or apiKeyHelper, except for desktop sessions that use a third-party inference configuration. You can assume you’ll run into this warning when you launch claude in a terminal or an IDE.

A warning, not an error

Claude Code does not stop when this appears. Requests to the model continue on the credential that took precedence, and the MCP servers you configured locally (those added with .mcp.json or claude mcp add) keep working. Only the claude.ai connectors are missing: no claude.ai entries appear in the /mcp list.

Since when it works this way

The CHANGELOG entry for v2.1.139 (published on npm on May 11, 2026, UTC) says that when ANTHROPIC_API_KEY, apiKeyHelper, or ANTHROPIC_AUTH_TOKEN is set, Remote Control, /schedule, claude.ai MCP connectors, and notification settings are disabled even if you have a claude.ai login, and that you need to unset the API key to use them. The CHANGELOG does not, however, say which version added this warning text. As of September 26, 2026, the official error reference has no entry for this wording either.

2. Why an API key turns off connectors: authentication precedence

When multiple credentials are present, Claude Code picks exactly one, in the order given in the official authentication documentation. The subscription login you saved with /login is seventh, in other words last. If any of the six above it is active, your login stays saved but goes unused.

Only the lowest-ranked one can fetch connectors

1
Cloud provider
When CLAUDE_CODE_USE_BEDROCK or similar is set
Connectors ×
2
ANTHROPIC_AUTH_TOKEN
A Bearer token for LLM gateways and proxies
Connectors ×
3
ANTHROPIC_API_KEY
A Claude Console API key. In interactive mode, only if you approved it
Connectors ×
4
apiKeyHelper
A script, set in a settings file, that returns a key
Connectors ×
5
CLAUDE_CODE_OAUTH_TOKEN
A long-lived token created with claude setup-token. For model requests only
Connectors ×
6
Anthropic profiles and federation
ANTHROPIC_PROFILE, federation variables, and the like
Connectors ×
7
Subscription login saved with /login
The default authentication for Pro, Max, Team, and Enterprise
Connectors ○
Source: “Authentication precedence” in Claude Code’s official authentication documentation, and the MCP documentation. Within item 6, an active profile not named by ANTHROPIC_PROFILE can rank below the login, depending on the authentication method.

The official MCP documentation likewise says claude.ai connectors are fetched “only when the active authentication method is a claude.ai subscription login,” and lists the credentials corresponding to items 1–6 in the diagram above as conditions under which connectors are not loaded even if you ran /login before. How to remove each one is covered in Section 4.

The key point is that your login has not been deleted. The credential is still saved and simply isn’t used because of precedence, so once you remove the higher-ranked credential, your saved login is used again. Why connectors are turned off even when a login exists is not explained officially.

In interactive mode, only a key you approved takes precedence

In interactive mode, the first time ANTHROPIC_API_KEY is detected you are asked once whether to use it, and your answer is remembered. A key you declined is not used. So if this warning appears in interactive mode, either you approved the key at some point, or another higher-ranked credential (such as ANTHROPIC_AUTH_TOKEN or apiKeyHelper) is set. In non-interactive mode (-p), ANTHROPIC_API_KEY is always used if it is set. Other errors caused by an API key overriding your subscription (This organization has been disabled, Invalid API key, and so on) are collected in our article on Claude Code authentication and login errors (Not logged in / Invalid API key).

3. Check which credential is in use

The first place to look is /status. According to the official authentication documentation, when both a login and an API key are present, the one not in use is marked. Per the CHANGELOG, this display was fixed in v2.1.260 (published on npm on September 3, 2026, UTC); before that, both were listed as if both were active.

Auth token: claude.ai · not in use
API key: ANTHROPIC_API_KEY

If it looks like the above, the API key is being used and your claude.ai login is not. Conversely, if the API key line has · not in use, your login is being used. This example was assembled from the field names contained in the v2.1.275 binary; in practice you will also see lines such as Login method, Organization, and Email. The official docs say that when a profile is in use, a Profile line appears instead of Login method.

Look for environment variables

If an API key line is shown and you don’t recognize the key, check your environment variables in the same shell where you launched claude. These are the commands the official error reference recommends.

# macOS, Linux
env | grep ANTHROPIC

# Windows (PowerShell)
Get-ChildItem Env:ANTHROPIC*

Some variables won’t show up with these commands: CLAUDE_CODE_OAUTH_TOKEN, and cloud provider variables beginning with CLAUDE_CODE_USE_, such as CLAUDE_CODE_USE_BEDROCK. Check the same way for any variable that matches items 1–6 in the Section 2 diagram.

Where the key comes from

If you unset it in your shell and it reappears in the next shell you open, something is loading it every time. The official documentation mentions these five sources.

Shell config files

An export ANTHROPIC_API_KEY=... line in ~/.zshrc, ~/.bashrc, or ~/.profile. A key from a previous job or another project may be left behind

Windows settings

Your PowerShell profile ($PROFILE) and user environment variables

A project’s .env

direnv, dotenv shell plugins, and IDE terminals can load an old key from a project’s .env. It can get in even if you don’t remember setting it

env in a settings file

The env in Claude Code’s settings files passes environment variables to every session. Even if it isn’t in your shell, it takes effect if it’s here

apiKeyHelper in a settings file

A setting for a command that returns a key. It can be written in any settings file. As long as it remains, it takes precedence over your saved login even after you /login

Claude Code’s settings files live in four places: ~/.claude/settings.json (all your projects), .claude/settings.json (shared with the project), .claude/settings.local.json (just you, just this project), and managed settings distributed by your organization. The Setting sources line on the Status tab of /status tells you which settings files this session loaded. It doesn’t show which key came from which file, though, so open the likely files and look for env and apiKeyHelper.

4. How to get your connectors working

These steps get Claude Code running on your subscription login and loading your claude.ai connectors. Other tools or your own scripts may use the same ANTHROPIC_API_KEY, so check what it’s used for before deleting it.

01

Remove the key at its source

Delete the relevant line from the place you found in Section 3: the export line in a shell config file, the key line in a .env, or the variable inside env or the apiKeyHelper in a Claude Code settings file. If you skip this, the key will be loaded again in the next shell you open.

02

Remove it from your current shell too

Fixing the file doesn’t clear the variable from shells that are already open. On macOS and Linux, run unset ANTHROPIC_API_KEY; in PowerShell, Remove-Item Env:ANTHROPIC_API_KEY. Opening a new shell has the same effect.

03

Restart Claude Code

A running session keeps the credential it started with. The official troubleshooting steps also have you relaunch claude after removing the key. The list of connectors is also fetched when a session starts, so restart before moving on to the next step.

04

Check /status, and /login if needed

See whether the API key line is gone or now shows · not in use. If your saved login has expired, the Login line shows Expired — log in again. In that case, or if you’re on a different account from the one where you registered your connectors, choose your claude.ai account again with /login.

05

Check your connectors in /mcp

Open /mcp. If your connectors are listed under the claude.ai heading, you’re done. Section 5 covers how to check in more detail.

# Remove it from the current shell (macOS, Linux)
unset ANTHROPIC_API_KEY

# Remove it from the current shell (Windows PowerShell)
Remove-Item Env:ANTHROPIC_API_KEY

# Restart, then check in Claude Code's input box
claude
/status
/mcp

Keep the key but switch interactive mode back to your login

If you have reasons not to delete the environment variable, you can switch to not using the key in interactive mode only. According to the official authentication documentation, your approval of the key in interactive mode can be changed later with the “Use custom API key” toggle in /config. This toggle appears only while ANTHROPIC_API_KEY is in the environment. After turning it off, restart Claude Code and then check /mcp. This won’t work in non-interactive mode with -p, though, because the key is always used whenever it is set.

When something other than an API key ranks higher

  • ANTHROPIC_AUTH_TOKEN: a token for routing through an LLM gateway or proxy. If you keep using it through the gateway, assume connectors are unavailable. If you don’t need it, unset the variable
  • apiKeyHelper: the official error reference says /login won’t fix things while this setting remains. Remove it from your settings file, then /login
  • CLAUDE_CODE_OAUTH_TOKEN: if you /login with it still set, that session switches to the new login. But until you remove the variable from your shell config or the env of a settings file, it gets loaded again in every new session
  • Profiles and federation: remove either ANTHROPIC_PROFILE or the federation variables. An active profile can be removed with /logout if it was written by signing in to the Console without creating a key, or with ant auth logout if it was written by ant auth login. In both cases you can also delete the profile file
  • Cloud providers: unset CLAUDE_CODE_USE_BEDROCK, CLAUDE_CODE_USE_VERTEX, or CLAUDE_CODE_USE_FOUNDRY. If you use a cloud provider because of company policy, check with your admin before removing it

5. Confirm that it’s fixed

Don’t call it done just because the warning didn’t appear once. Confirm with these three checks.

What /status shows

There is no API key line, or it has · not in use. Login method shows the plan of the claude.ai account where you registered your connectors

The /mcp list

Your connectors are listed under the claude.ai heading. Connectors you have never signed in to are collapsed into the Show unused connectors row at the end

The startup warning

The warning doesn’t appear even after restarting. 🟡 It disappears quickly, so look right after startup

The official MCP documentation says connectors you haven’t connected yet in claude.ai can only be connected from claude.ai’s settings page. If a connector you connected before has its sign-in expire, you can select that server in /mcp and sign in again (official error reference). If a temporary network problem right after startup prevented the connector list from being fetched, Claude Code retries in the background up to three times, and the connectors appear once it succeeds. If they still don’t appear, restart to fetch again.

6. If you decide to keep using the API key

Using an API key is an officially supported way to run Claude Code, for example when a team consolidates its usage under Claude Console API billing. In that case, this warning is just a notice that connectors are unavailable, and leaving it alone doesn’t affect how things run. What you can use and how you are billed differ from a subscription login, however.

Itemclaude.ai login (Pro, Max, Team, Enterprise)API key (ANTHROPIC_API_KEY)
BillingIncluded in your plan’s usage allowance. Usage credits if you go beyond itBilled per token to the Console organization the key belongs to
Guard against overuseYour plan’s usage limits (5-hour and weekly allowances, etc.)Spend limits on your Console workspace
claude.ai connectorsAvailableNot loaded
Local MCP servers (.mcp.json, claude mcp add)AvailableAvailable
Remote Control, /schedule, notification settingsAvailableDisabled (v2.1.139 and later)
Managing usage credits (/usage-credits)AvailableNot available
Non-interactive mode (-p)Runs on your login if no key is setIf a key is set, it is always used regardless of approval

Sources: Claude Code’s official cost management documentation (billing, limits, usage credits), the authentication documentation (non-interactive mode), the MCP documentation (connectors), and CHANGELOG v2.1.139 (Remote Control, etc.). Team and Enterprise usage allowances are set per member seat and are shared with chat on claude.ai.

Add an MCP server locally instead of the connector

If the same service publishes a remote MCP server, you can add it directly with claude mcp add and use it even while on the API key. Check each service’s instructions for the URL to connect to.

# Format: claude mcp add --transport http <name> <URL>
claude mcp add --transport http notion https://mcp.notion.com/mcp

However, according to the official MCP documentation, some Anthropic-hosted connectors, such as Microsoft 365, Gmail, and Google Calendar, don’t support signing in (OAuth) locally from Claude Code. That’s because the upstream authentication service only accepts the redirect destinations claude.ai has registered. If you add one of these services locally and try to sign in, you’ll see is Anthropic-hosted and doesn't support local OAuth and be told to connect it in claude.ai. In other words, for these there is no alternative while you stay on the API key. For troubleshooting MCP servers that won’t connect, see our article on MCP servers not connecting in Claude Code.

Stop the warning from appearing

If you’ve decided not to use connectors, setting disableClaudeAiConnectors to true makes Claude Code neither fetch nor connect to claude.ai connectors. For a single launch, the environment variable ENABLE_CLAUDEAI_MCP_SERVERS=false does the same.

To turn them off across all your projects, write the following in ~/.claude/settings.json.

{
  "disableClaudeAiConnectors": true
}
# Turn them off for a single launch only (macOS, Linux)
ENABLE_CLAUDEAI_MCP_SERVERS=false claude

🟡 The official documentation doesn’t mention how this setting relates to the warning. In the v2.1.275 binary, this setting is checked before the API key, and when it applies the fetch stops there, so the warning no longer appears either. This setting also works with a subscription login, so there’s no need to set an API key just to turn connectors off.

Using it in CI or scripts (-p)

In non-interactive mode, ANTHROPIC_API_KEY is always used if it is set, and the long-lived token from claude setup-token can’t fetch connectors either. Avoid designs that rely on claude.ai connectors inside automation, and pass the MCP servers you need with .mcp.json or --mcp-config. The official authentication documentation also says that locally configured MCP servers work even with a long-lived token.

7. When connectors still don’t appear after removing the key

If /status shows your login is in use but there are no connectors in /mcp, precedence isn’t the cause. Check the following points from the official documentation.

Connectors are turned off somewhere

disableClaudeAiConnectors takes effect if it is true in any one settings file. Setting it to false in the project can’t override a true in your own settings or in managed settings

Turned off individually

Listed by name or URL in deniedMcpServers. A connector you turned off for a project in /mcp also won’t connect in that project

You added a server with the same URL locally

The locally added server takes priority, and the connector is listed as hidden. To use the connector, remove the local duplicate

session token rejected

If a connector shows connected · session token rejected, claude.ai is rejecting Claude Code’s login. Usually the login has expired and couldn’t be refreshed. Run /login, then reconnect in /mcp

Organization controls

On Team and Enterprise, only admins can add connectors. If the organization sets a tool to blocked, that tool is removed from the list

WSL in the desktop app

The official docs say connectors are not yet available in the desktop app’s WSL sessions

The expired login behind session token rejected is covered in detail in our article on “Login expired · Please run /login”. According to the official error reference, redoing a connector’s authentication won’t clear this state, because what was rejected is not the connector’s authentication but Claude Code’s login.

8. Related reports on GitHub

We opened and read two related issues in the Claude Code GitHub repository on September 22, 2026. Neither contains this article’s warning text itself. In what we read, neither includes an explanation of a bug from Anthropic.

  • #58453 (opened May 12, 2026; feature request): a request for a Claude Code setting to turn off connectors linked in claude.ai (Canva, Gmail, Google Drive, Google Calendar), because they load into every Claude Code session and their tool definitions are added to the input on every turn. A May 14 comment points out that since v2.1.139, setting ANTHROPIC_API_KEY stops the connectors, but it also stops /schedule and Remote Control and moves billing to the API. On May 23, an account with Collaborator permissions on the repository closed it, consolidating it into #29368, which asks for the same thing. The current official documentation includes disableClaudeAiConnectors, but we couldn’t find in the CHANGELOG which version added it
  • #50537 (opened April 18, 2026; Windows; v2.1.113): a report of a different warning, Auth conflict: Both a token (claude.ai) and an API key (ANTHROPIC_API_KEY) are set., together with the error Auth error: No API key available. It has only user comments and was closed automatically on May 26 for inactivity. In the v2.1.275 binary the author checked, we found no string matching this warning

What the two have in common is that both an API key and a claude.ai login exist in the same environment. If you decide up front which one you intend to use, the fix is the same in either situation: remove the one you don’t use, or confirm in /status that the intended one is selected.

9. Summary

“claude.ai connectors are disabled because ANTHROPIC_API_KEY or another auth source is set and takes precedence” is a warning telling you that a credential such as an API key took precedence over your saved claude.ai login, so claude.ai connectors were not loaded. Your login is not gone; it just isn’t used because of precedence. Check which credential is in use on the API key line of /status. If you want connectors, remove the key at its source, restart, and confirm in /mcp, and you’re done.

If you’re using the API key on purpose, you can ignore the warning. But billing becomes per-token charges to the Console organization, and Remote Control and /schedule are unavailable. If all you want is to turn off connectors, use disableClaudeAiConnectors rather than an API key. Other errors are collected in our roundup of common Claude Code errors and fixes.

FAQ

Q. What does “claude.ai connectors are disabled” mean?
A. It’s a warning that Claude Code did not load the connectors you added in claude.ai for this session. The cause is that a credential such as ANTHROPIC_API_KEY takes precedence over your saved claude.ai login. Claude Code itself keeps running on that credential.

Q. Is it OK to ignore the warning and keep using Claude Code?
A. It keeps working. But if an API key is in use, usage is billed to the Console organization the key belongs to rather than counted against your subscription. If it’s a key you don’t remember setting, check with /status and remove it.

Q. Will running /login again fix it?
A. Not while a higher-ranked credential remains. The official documentation also explains that an approved ANTHROPIC_API_KEY or an apiKeyHelper takes precedence over a login, so /login won’t replace them. Remove the key or setting first, then /login if needed.

Q. Is there a way to use only the connectors without deleting the API key?
A. In interactive mode only: turn off “Use custom API key” in /config, and the key stays in the environment but is no longer used. In non-interactive mode with -p, the key is always used whenever it is set, so this doesn’t work.

Primary sources