Software engineer and founder with a background in finance and tech. Currently building aVenture.vc, a platform for researching private companies. Based in San Francisco.
If you're using AI coding tools like Claude Desktop, Cursor, or Continue, you've probably configured MCP servers or API keys somewhere. And if you're like most developers, those secrets are sitting in plain text in JSON config files.
That's a security nightmare waiting to happen—especially with the rise of prompt injection attacks and untrusted MCP servers potentially accessing your environment.
The Security Problem
AI tools need API keys:
MCP Servers: Supabase, GitHub, Linear, etc. all need authentication tokens
LLM Providers: OpenAI, Anthropic, Google AI keys for model access
Storing these in plain text config files means they're exposed to any process that can read your filesystem—including potentially malicious MCP servers or compromised dependencies.
Two solutions work well: 1Password CLI for those already in the 1Password ecosystem, and Doppler for teams needing centralized secret management.
Part 1: Understanding the MCP Security Model
When an AI assistant uses an MCP tool, your secrets are injected by the host app as process environment variables only when the MCP server starts. The LLM never sees the values; the MCP server process does. This just-in-time injection is the core security boundary we'll use.
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Claude/ │ JSON │ MCP Host │ ENV │ MCP Server │
│ LLM │ RPC │ (Claude │ VARS │ Process │
│ │ ──────> │ App) │ ──────> │ │
│ NEVER sees │ │ Injects │ │ SEES the │
│ secrets │ │ secrets │ │ secrets │
└─────────────┘ └──────────────┘ └─────────────┘
Part 2: The 1Password CLI Approach (Personal Use)
If you're already using 1Password, their CLI provides excellent integration for personal secret management.
1Password access prompt when authorizing secure actions (e.g., CLI/SSH).
Part 3: The Doppler Approach (Team-Friendly)
Doppler is purpose-built for developers environment variables across teams and environments. It's my top recommendation if you need centralized control and audit logging, and works well for CI/CD and general development environment-focused secrets/automatic injection. They have a lot of deployment options, including normal shell and API access and a CLI tool like 1Password's, but also custom packages for many different languages/frameworks.
# Login to Doppler
doppler login
# Create a project for your AI tools
doppler projects create ai-tools
# Set up a config for local development
doppler setup --project ai-tools --config dev
# Add your secrets
doppler secrets set ANTHROPIC_API_KEY "sk-ant-..."
doppler secrets set OPENAI_API_KEY "sk-..."
doppler secrets set SUPABASE_ACCESS_TOKEN "sbp_..."
doppler secrets set GITHUB_TOKEN "ghp-..."
Generate and store a Service Token for non-interactive use
# Create a service token for your local machine# (copy the token printed, it starts with dp.st.)
doppler configs tokens create --project ai-tools --config dev --name "desktop-mcp"# Store the token in Doppler CLI config (no env var export)
doppler configure set token dp.st.dev.xxxxx
Doppler MCP configuration
Configure MCP servers to use Doppler for secret injection:
Interactive personal site with beautiful terminal/code components & other dynamic content
Related Books
React in Depth
Morten Barklund
React in Depthteaches the React libraries, tools and techniques that are vital to build amazing apps. You'll put each skill you learn into practice wi...
AI Agents in Action
Micheal Lanham
AI Agents in Action covers the development of production-ready assistants, multi-agent systems, and behavioral agents. The text details the core compo...
Spring AI in Action
Craig Walls
Use Spring AI to add generative AI features like virtual assistants, text summaries, and suggestions to your Java applications. No matter what kind of...
Related Investments
WeLoveNoCode
Platform connecting businesses with no-code developers and tools.
Safe
Browser and email tech for secure verification of senders.
SailPlan
Maritime navigation and vessel optimization platform using AI for route planning.