A security vulnerability has been identified in the `claude mcp add` command, where API keys are exposed in plain text in two locations: shell history and the `~/.claude.json` configuration file. While a recent update to `claude mcp add-json` addresses the shell history issue by allowing configuration via stdin, the API key still persists in the configuration file. The recommended solution is to register a reference to an environment variable (e.g., `'NOTION_TOKEN=${NOTION_TOKEN}'`) instead of the actual API key, ensuring the key is not stored in plain text in either location. AI
IMPACT Exposes a security flaw in a specific AI tool, prompting users to secure their API keys.
RANK_REASON The item describes a security vulnerability in a specific command-line tool and provides a fix.
- API key
- Claude Code
- claude mcp add
- claude mcp add-json
- GitHub
- Gumroad
- MCP
- Notion
- NOTION_TOKEN
- shell history
- Z shell
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →