
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
local-secrets-mcp
Advanced tools
A simple MCP (Model Context Protocol) server for managing local secrets with Claude Code.
Store API keys, tokens, and other secrets locally and access them through Claude Code. Organize with categories and notes, import/export .env files, and manage everything via CLI or conversation.
npx local-secrets-mcp init
npx local-secrets-mcp add OPENAI_API_KEY sk-xxx
npx local-secrets-mcp add ANTHROPIC_API_KEY sk-ant-xxx --category ai
npx local-secrets-mcp add STRIPE_SECRET_KEY sk_live_xxx --category payments
Add to your Claude Code MCP config:
For Claude Code CLI (~/.claude.json):
{
"mcpServers": {
"local-secrets": {
"command": "npx",
"args": ["-y", "local-secrets-mcp", "serve"]
}
}
}
For Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"local-secrets": {
"command": "npx",
"args": ["-y", "local-secrets-mcp", "serve"]
}
}
}
Custom database location (use existing secrets folder):
{
"mcpServers": {
"local-secrets": {
"command": "npx",
"args": ["-y", "local-secrets-mcp", "serve"],
"env": {
"SECRETS_PATH": "/path/to/your/.secrets"
}
}
}
}
Once configured, Claude can:
# Initialize database
local-secrets-mcp init
# Add a new secret
local-secrets-mcp add <key> <value>
local-secrets-mcp add GITHUB_TOKEN ghp_xxx --category github
# Add or update a secret
local-secrets-mcp set <key> <value>
# Get a secret value
local-secrets-mcp get <key>
# List all secrets
local-secrets-mcp list
# Delete a secret
local-secrets-mcp delete <key>
# Import from .env file
local-secrets-mcp import .env
# Export all secrets as .env format
local-secrets-mcp export > .env
# Show database path
local-secrets-mcp path
# Start MCP server (used by Claude Code)
local-secrets-mcp serve
--category, -c - Set category when adding/updating secrets--notes, -n - Add notes to a secretWhen connected to Claude Code, these tools are available:
| Tool | Description |
|---|---|
get_secret | Get a specific secret value by key |
list_secrets | List all secret keys (optionally filter by category) |
search_secrets | Search secrets by key name pattern |
get_env_value | Get secret as environment variable format |
add_secret | Add a new secret |
update_secret | Update an existing secret |
delete_secret | Delete a secret |
Default location:
~/.local-secrets/secrets.db~/.local-secrets/access.logCustom location: Set the SECRETS_PATH environment variable to use a different directory:
# CLI
SECRETS_PATH=~/.secrets npx local-secrets-mcp list
# Or export it
export SECRETS_PATH=~/.secrets
npx local-secrets-mcp list
~/.local-secrets/access.logTo keep secrets fully local: Use the CLI directly (npx local-secrets-mcp get MY_KEY) - this prints to your terminal and never touches the network. Only use Claude to retrieve secrets you're comfortable having in the conversation.
MIT
FAQs
MCP server for managing local secrets with Claude Code
We found that local-secrets-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.