# Secrets and API keys in Continue: keep credentials out of the agent's reach

Source: https://botpassword.com/agents/continue
Last checked: 2026-10-25

Continue is an open-source coding assistant for VS Code and JetBrains. Its MCP support works only in agent mode and accepts stdio, SSE and streamable HTTP servers, defined as YAML files in `.continue/mcpServers/` or in the config file. Secrets are referenced with `${{ secrets.NAME }}`, and project rules live in `.continue/rules`.

## MCP support

Yes. Transports: stdio, sse, http.

- workspace: `.continue/mcpServers/*.yaml (also JSON files copied from Claude Desktop, Cursor or Cline)`

## Environment variables and .env files

Reference secrets with `${{ secrets.NAME }}` in a server's `args` or `env`. The documentation says you can use locally stored environment secrets but does not describe where they are stored, and the pages reviewed do not mention `.env` loading.

## File access

The pages reviewed do not describe default file access or a way to deny reads. Rules are loaded from `.continue/rules` in lexicographical order. MCP tools can only be used in agent mode.

## Credential risks

- **Secret values inside server definitions.** A standalone MCP YAML file in `.continue/mcpServers/` is project content; unless you use the documented `${{ secrets.NAME }}` form, a key written into `env` or `args` sits in a file that may be committed.
- **Local servers run with your user permissions.** The Model Context Protocol guide states a local server "runs with your user account permissions" and can do anything you can do, so a stdio server defined in a shared `.continue/mcpServers/` file is code execution.

## FAQ

### Where do I configure MCP servers in Continue?

Create a YAML file such as `playwright-mcp.yaml` in `.continue/mcpServers/` at the workspace root, with `name`, `version`, `schema: v1` and an `mcpServers` list. You can also copy a JSON MCP file there.

### How do I pass an API key to a Continue MCP server?

Use `${{ secrets.NAME }}` in the server's `env` or `args` instead of the literal value.

### Does Continue support MCP outside agent mode?

No. The documentation states MCP can only be used in agent mode.

### How do I give Continue an API key without it seeing the key?

Don't put the key in the prompt, in a file Continue can read, or in an environment variable it can print. Give it a tool that performs the authenticated step instead: a credential broker exposed over MCP or a CLI that injects the key into the command or HTTP request and returns only the result. BotPassword is that broker, through `bpw mcp` and the `bpw` CLI.

## Sources

- https://docs.continue.dev/customize/deep-dives/mcp
- https://docs.continue.dev/customize/deep-dives/rules
- https://modelcontextprotocol.io/docs/develop/connect-local-servers
