# OpsecForge

> OpsecForge is an open-source MCP server for security. Local MCP tools that redact secrets in files, scan commits and verify webhooks for agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://www.opsecforge.com
- **Repository:** https://github.com/cyberdroid2077/opsecforge-tools/tree/HEAD/packages/opsecforge-mcp
- **MCP Registry name:** io.github.cyberdroid2077/opsecforge
- **Categories:** security, developer tools
- **Listing updated:** 2026-11-15

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

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

### Claude Desktop (claude_desktop_config.json)

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

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

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

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

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

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

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

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

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

## Tools

- `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.

## 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

- [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/opsecforge
