[BUG] [Privacy Concern] Claude can train on API Secrets if part of MCP configuration

Resolved 💬 3 comments Opened Feb 7, 2026 by gm2211 Closed Mar 21, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Situation

I asked Claude to help me setup an MCP for render.com.

Behavior

  1. Claude told me to give it my token and it would run `claude mcp add --transport http render https://mcp.render.com/mcp --header "Authorization:

Bearer YOUR_KEY_HERE"`.

  1. I did NOT do that because I don't want my token in the conversation history.
  2. I ran that command in my terminal.
  3. I told Claude I ran the command myself
  4. Claude decided to check my work and used the read tool to read the contents of my claude settings, including the token!

Impact

As per Anthropic's policy It does not include raw content ... and local MCP servers, **_though data may be included if it’s directly copied into your conversation with Claude._** my token is now part of the training set because I had forgotten to turn off Help Improve Claude.

I had to find all and any keys I might have in all and any files on my laptop, just in case Claude has ever read them, and rotate them all.

What Should Happen?

Claude should be aware that reading the settings file can result in leaking tokens if you have Help Improve Claude turned on.

Acceptable behaviors:

  1. Claude code has a local model trained to recognize tokens and sensitive info, input from user and output from tools is run through the local model to identify and strip out such info (default behavior, configurable).
  2. Claude refuses to read your MCP settings if you have Help Improve Claude
  3. Claude lets the user know in red color and huge font that this is extremely dangerous and user should make 1000% sure there are no tokens in the MCP settings
  4. Commands suggested by Claude to setup MCP should make sure you're leaning on Keychain on MacOs (or equivalent secure enclaves), or at least env vars, so that there's no tokens in Claude's config

Error Messages/Logs

Steps to Reproduce

Ask Claude to help you setup an MCP that requires a token

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.34 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗