# offprompt

> offprompt is an open-source MCP server for security. Collect API keys in a browser page and write them to .env without the model seeing them. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, macOS, Linux, Windows
- **Website:** https://offprompt.dev
- **Repository:** https://github.com/offprompt/offprompt/tree/HEAD/packages/offprompt
- **MCP Registry name:** io.github.offprompt/offprompt
- **Categories:** security, developer tools
- **Listing updated:** 2026-11-14

## About

Pasting a key into a chat leaves it in the model's context, the transcript on disk and the provider's logs. offprompt gives the agent a different route: a collect_secret call that names the keys it needs, why, and which file they go in, then waits. A page opens on 127.0.0.1 showing which agent is asking and where it will write, and the values go straight into the file. The agent only gets back the key names, the file and a four-emoji fingerprint that matches the one shown on the page.

The page validates values as you type for more than 60 known providers, from Stripe, OpenAI and Anthropic to Cloudflare, Supabase and Vercel, and links to where each key is created. A key already in the file is highlighted before it is replaced, and random values such as JWT_SECRET can be generated on the page. Nothing is kept once the tab closes.

In a cloud sandbox the page is reached through a Cloudflare tunnel, and the browser encrypts the values first to a key only the sandbox holds. Setup is npx offprompt init, which declares the server for Claude Code, Codex, Cursor and Pi; any MCP client, Cline included, can start it from npm. It needs Node 22 or later and is MIT licensed.

## Features

- **Secrets stay off the transcript:** The model sees only key names, never the values.
- **Browser entry page:** A local page shows who is asking, why and which file will be written.
- **Per-provider checks:** Known key formats are checked as you type, with a link to create each key.
- **Overwrite warning:** A key already in the file is flagged before it is replaced.
- **Generated secrets:** Random values like JWT_SECRET are created on the page.
- **Cloud sandbox support:** Values are encrypted in your browser before crossing a Cloudflare tunnel.

## Good for

- Let a coding agent set up Stripe or OpenAI keys without pasting them
- Fill a project's .env during onboarding
- Generate a JWT secret for a new service
- Configure keys in a cloud sandbox agent safely
- Warn before overwriting an existing key

## Install

### Claude Code (Terminal)

```sh
claude mcp add offprompt -- npx -y offprompt
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "offprompt": {
      "command": "npx",
      "args": [
        "-y",
        "offprompt"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "offprompt": {
      "command": "npx",
      "args": [
        "-y",
        "offprompt"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "offprompt": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "offprompt"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "offprompt": {
      "command": "npx",
      "args": [
        "-y",
        "offprompt"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "offprompt": {
      "command": "npx",
      "args": [
        "-y",
        "offprompt"
      ]
    }
  }
}
```

## Tools

- `collect_secret`: Opens a browser page to collect named secrets and writes them to a file, returning only key names and a fingerprint.

## FAQ

### Does the model ever see the key values?

No. The transcript only sees key names, the file and a four-emoji fingerprint.

### How do I install it?

Run npx offprompt init in a project, or npx offprompt init -g for every project.

### Which agents does it work with?

Claude Code, Codex, Cursor and Pi are set up by init; any MCP client, such as Cline, can start it from npm.

### What does it need?

Node 22 or later.

### What is the licence?

MIT.

### Is offprompt free?

Yes. offprompt is open source, so you can use and self-host it for free.

### How do I add offprompt to Claude Code?

Run this command in your terminal: claude mcp add offprompt -- npx -y offprompt

### What are the best alternatives to offprompt?

The closest alternatives to offprompt are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/offprompt
