# API keys out of Claude Desktop’s MCP config

> 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.

Every MCP server you add to Claude Desktop tends to bring a key, written into one JSON file. Here’s how to empty it.

Source: https://moltenrock.com/mcp-api-keys-claude-desktop · 2026-10-17

## One JSON file, every key in it

- **Plain text on disk**: The env block of each server holds its key as written. Anything you run as you can read the file.
- **One key per server**: Five servers, five keys, five places to rotate, and five packages trusted with a secret.
- **Easy to leak by accident**: Config files end up in dotfile repos, screenshots and support tickets.

## Two ways to empty the env block

- **Business tools: one Connect entry**: Add MoltenRock Connect once and Claude reads 30 platforms through it. No platform key appears in the file.
- **Other servers: the Keychain**: A two-line wrapper reads the key from the macOS Keychain when the server starts.
- **Answers, not keys**: Connect returns data, with customer names and addresses as tokens.
- **Changes wait for you**: On Stripe, Cloudflare and GitHub, Claude can only propose; you approve with Touch ID.

## Clean up claude_desktop_config.json

1. **Open the file**: In Claude Desktop: Settings → Developer → Edit Config. It lives in ~/Library/Application Support/Claude/.
2. **Move platform keys into Connect**: Paste each key once in MoltenRock Connect, then add its entry from Connect → Settings → Agent Setup → Claude Desktop, Cursor.
3. **Keychain for the rest**: Store 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.
4. **Rotate what was in the file**: Any key that sat in a config file may have been copied, synced or shared. Make a new one and revoke the old.

## 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 |

## 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.

## 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.
