API keys out of Claude Desktop’s MCP config
Every MCP server you add to Claude Desktop tends to bring a key, written into one JSON file. Here’s how to empty it.
The problem
One JSON file, every key in it
The solution
MoltenRock Connect
Two ways to empty the env block
The short answer
Claude Desktop reads MCP servers from claude_desktop_config.json (on a Mac, in ~/Library/Application Support/Claude/), and each server’s key usually sits in its env block as plain text. To get keys out: for business platforms, add MoltenRock Connect as one MCP server; it holds the keys, calls the platform and gives Claude the answer. For any other server, keep the key in the macOS Keychain and start the server through a small wrapper that reads it at launch.
The problem
Where it goes wrong
- Plain text on diskThe env block of each server holds its key as written. Anything you run as you can read the file.
- One key per serverFive servers, five keys, five places to rotate, and five packages trusted with a secret.
- Easy to leak by accidentConfig files end up in dotfile repos, screenshots and support tickets.
The solution
MoltenRock Connect: Two ways to empty the env block
- Business tools: one Connect entryAdd MoltenRock Connect once and Claude reads 30 platforms through it. No platform key appears in the file.
- Other servers: the KeychainA two-line wrapper reads the key from the macOS Keychain when the server starts.
- Answers, not keysConnect returns data, with customer names and addresses as tokens.
- Changes wait for youOn Stripe, Cloudflare and GitHub, Claude can only propose; you approve with Touch ID.
Side by side
Where a Claude Desktop MCP key can live
| Option | What’s in the config file | Good for |
|---|---|---|
| The key in the env block | The key itself, in plain text | A quick test, then remove it |
| Keychain and a wrapper script | A path to the wrapper; no secret | Any MCP server you trust |
| MoltenRock Connect | One entry, no key at all | Its 30 business platforms |
How it works
Clean up claude_desktop_config.json
- 01Open the fileIn Claude Desktop: Settings → Developer → Edit Config. It lives in ~/Library/Application Support/Claude/.
- 02Move platform keys into ConnectPaste each key once in MoltenRock Connect, then add its entry from Connect → Settings → Agent Setup → Claude Desktop, Cursor.
- 03Keychain for the restStore the key once with security add-generic-password -a "$USER" -s my-mcp-key -w (it asks for the value, so it never lands in your shell history), then point the server’s command at a two-line wrapper script that reads it with security find-generic-password -s my-mcp-key -w, exports it and starts the server. The config then holds a path, not a secret.
- 04Rotate what was in the fileAny key that sat in a config file may have been copied, synced or shared. Make a new one and revoke the old.
Straight answer
What this fixes, and what it doesn’t
Stays on your Mac
- Platform keys, in Connect or MoltenRock’s vault
- Keys for other servers, in the Keychain
- A config file with nothing secret in it
Leaves your Mac
- Connect’s calls from your Mac to each platform
- Tool results, to Claude and its model
- MoltenRock Connect covers its 30 business platforms (Stripe, Shopify, WooCommerce, GitHub, Cloudflare and more). An MCP server for anything else still needs its own key: keep that one in the Keychain.
Questions
What people ask first
Where is claude_desktop_config.json on a Mac?
In ~/Library/Application Support/Claude/. Claude Desktop opens it from Settings → Developer → Edit Config.
Does MoltenRock put keys into my other MCP servers?
No. MoltenRock hands keys to OpenClaw and Hermes, and MoltenRock Connect never hands one out at all. For another MCP server, keep its key in the macOS Keychain and read it at launch.
Is the Keychain wrapper enough?
It keeps the key out of the file and out of your shell history. The running server still holds the key in its environment, as any server that uses a key must; only trust servers you would trust with the key itself.
What does it cost?
Connect is free for two platforms; one $9.99 unlock opens all 30, and MoltenRock Pro includes it.
Nothing secret in claude_desktop_config.json.
MoltenRock Connect is free for Mac.