Skip to content
MCP server

OpsecForge

Local MCP tools that redact secrets in files, scan commits and verify webhooks for agents

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

About OpsecForge

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

The core idea is that the agent hands over a file path or an environment variable name, the work happens on your machine, and only redacted or derived results come back. Nothing leaves your computer: the server makes no network requests and needs no account, API key or telemetry. It is MIT licensed and shares code with the browser tools at opsecforge.com.

redact_file reads a text file up to 1 MiB and returns it with secrets replaced by [REDACTED], plus a summary of finding types, counts and original line numbers. It recognises private key blocks, sensitive named fields, auth headers, URL credentials and key formats for AWS, Stripe, GitHub, GitLab, Slack, Google, OpenAI, Anthropic and SendGrid, among others. scan_secrets is a pre-commit check, and verify_webhook and inspect_jwt read secrets from named environment variables.

For Claude Code there is a plugin that adds a PreToolUse hook blocking direct reads of .env, key and credential files. The README warns that redaction is heuristic, the hook is a best-effort guard rather than a sandbox, and Codex and Cursor have no hook.

Install

Run in a terminal

claude mcp add opsecforge -- npx -y opsecforge-mcp

Add to claude_desktop_config.json

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

Add to ~/.cursor/mcp.json

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

Add to .vscode/mcp.json

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

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

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

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

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

Tools this server provides (4)

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

redact_file
Return a local text file with secrets replaced by [REDACTED] and a findings summary.
scan_secrets
Pre-commit check that scans files, directories or staged lines for secrets.
verify_webhook
Verify a webhook signature using a secret from an environment variable.
inspect_jwt
Inspect a JWT using a secret read from an environment variable.

What it does

File redaction
Returns a file with secrets masked and line-numbered findings.
Pre-commit scanning
Scans files, directories or staged changes for secrets.
Webhook verification
Checks a webhook signature using a secret read from an environment variable.
JWT inspection
Inspects tokens with the secret taken by variable name.
Claude Code guard hook
Blocks direct reads of .env and key files and points the model to redact_file.
Path restriction
OPSECFORGE_MCP_ROOTS limits which directories the file tools may read.

Good for

  • Letting an agent read a .env file without exposing values
  • Checking staged changes for leaked keys before a commit
  • Testing a webhook signature without pasting the secret into chat
  • Keeping credentials out of model context in Claude Code, Codex or Cursor

Pricing

Open source

MIT licence; no account or API key

Prices change. Check opsecforge.com before you buy.

OpsecForge FAQ

Does it send my files anywhere?

No. The README says it makes no network requests and has no telemetry.

How reliable is the redaction?

The README calls it heuristic and advises reading the limitations before relying on it.

What does it need?

Node.js 20 or newer; run it with npx -y opsecforge-mcp.

Does it work outside Claude Code?

Yes, with Codex and Cursor, though they have no hook to block direct file reads.

Is OpsecForge free?

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

How do I add OpsecForge to Claude Code?

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

What are the best alternatives to OpsecForge?

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

Alternatives to OpsecForge

  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