# API keys out of VS Code’s mcp.json

> VS Code reads MCP servers from .vscode/mcp.json in a workspace or from your user profile. Its inputs array lets a server definition use ${input:id}: with type promptString and password: true, VS Code asks for the key the first time the server starts, hides what you type and stores it securely, so the file never holds it. envFile can also load variables from a file. For business platforms, an agent that can run commands on your Mac can use MoltenRock Connect, which holds the keys itself.

VS Code has the best built-in answer of the lot: it asks for the key and stores it securely. Here’s how to use it, and when you need no key at all.

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

## Workspace config is shared config

- **.vscode/mcp.json travels**: A key written into a workspace config goes wherever the repository goes.
- **envFile is still a file**: A .env file keeps the key out of mcp.json, not off the disk.
- **One key per server**: Every server is another secret to rotate and another package to trust.

## Prompted keys, or no key at all

- **Inputs with password: true**: VS Code asks once, hides the value and stores it securely; mcp.json only names the input.
- **Business tools through Connect**: An agent that can run commands on your Mac talks to MoltenRock Connect’s local socket: 30 platforms, no key.
- **Answers, not keys**: Connect returns data, with customer names and addresses as tokens.
- **Changes wait for you**: On Stripe, Cloudflare and GitHub, the agent can only propose; you approve with Touch ID.

## Clean up VS Code’s mcp.json

1. **Find the keys**: Check .vscode/mcp.json in each workspace and the mcp.json in your user profile for env values and headers.
2. **Turn keys into inputs**: Add an inputs entry with "type": "promptString" and "password": true, and use "${input:your-id}" where the key was.
3. **Point the agent at Connect**: In MoltenRock Connect → Settings → Agent Setup → Other agents, copy the note for your agent.
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 VS Code MCP key can live

| Option | What’s in mcp.json | Good for |
| --- | --- | --- |
| The key in env or headers | The key itself, in plain text | A quick test, then remove it |
| An input with password: true | An input id; VS Code stores the value securely | Any MCP server in VS Code |
| envFile | A path to a .env file holding the key | Keys you already keep in .env |
| MoltenRock Connect | Nothing: the agent uses Connect’s local socket | Its 30 business platforms |

## What this fixes, and what it doesn’t

**Stays on your Mac**

- Platform keys, in Connect or MoltenRock’s vault
- Other servers’ keys, in VS Code’s secure input storage
- An mcp.json with nothing secret in it

**Leaves your Mac**

- Connect’s calls from your Mac to each platform
- Answers, to your agent 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

### How do I keep an API key out of VS Code’s mcp.json?

Define an input with type promptString and password: true, and reference it as ${input:id}. VS Code asks the first time the server starts and stores the value securely.

### Where is mcp.json in VS Code?

.vscode/mcp.json in a workspace, or in your user profile.

### Can VS Code’s agent use MoltenRock Connect?

Connect’s documented routes are MCP for Claude Code, Claude Desktop and Cursor, and its local socket for any agent that can run commands on your Mac. Use the socket note from Agent Setup → Other agents.

### What does it cost?

Connect is free for two platforms; one $9.99 unlock opens all 30, and MoltenRock Pro includes it.

## Prompted keys, or none at all.

MoltenRock Connect is free for Mac.
