Skip to content
MCP server

offprompt

Collect API keys in a browser page and write them to .env without the model seeing them

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted, macOS
Runs
Locally
Version
0.3.1
Listing updated
3 days ago

About offprompt

offprompt is an open-source MCP server for security. It runs locally on your machine and is started by your AI client.

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.

Install

Run in a terminal

claude mcp add offprompt -- npx -y offprompt

Add to claude_desktop_config.json

{
  "mcpServers": {
    "offprompt": {
      "command": "npx",
      "args": [
        "-y",
        "offprompt"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "offprompt": {
      "command": "npx",
      "args": [
        "-y",
        "offprompt"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

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

Add to ~/.codeium/windsurf/mcp_config.json

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

Add to your client's MCP settings (most use this shape)

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

Tools this server provides (1)

Taken from the project documentation; the running server may differ.

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

What it does

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

Pricing

Open source

MIT licensed

Prices change. Check offprompt.dev before you buy.

offprompt 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 to offprompt

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools