# cyberdroid2077/opsecforge-tools [Health: Active]

**Category:** 🔒 Security  
**Repository:** https://github.com/cyberdroid2077/opsecforge-tools/tree/main/packages/opsecforge-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 267  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/cyberdroid2077-opsecforge-tools

## Description
Local stdio server that keeps secrets out of coding-agent context: redactfile takes a path and returns only redacted content, scansecrets checks staged changes before commit, plus offline webhook signature verification and JWT inspection. No network calls; optional Claude Code hook blocks direct .env/private-key reads. Redaction is heuristic.

## Tools
Capabilities this server exposes over MCP:

- **secret_env**
- **secret**
- **body_path**

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

## Documentation

## What cyberdroid2077/opsecforge-tools does

cyberdroid2077/opsecforge-tools provides local security-oriented MCP tools for coding agents. The server reads files, request bodies, or environment variables on the machine running the MCP process and returns redacted content, scan findings, verification diagnostics, decoded claims, or checksums. It makes no network requests and requires neither an account nor an API key.

Its main privacy boundary is the use of paths and environment-variable names instead of passing raw secrets as tool arguments. `redact_file` returns a masked version of a local text file and a summary of findings. `scan_secrets` checks selected files, directories, or staged Git additions. `redact_text` handles text already present in the model context, producing a safer copy for external sharing but not removing the original from context.

## How it works

The server communicates over stdio. Every tool runs locally and returns readable errors instead of terminating the server. File operations accept regular files subject to size and binary-file checks. An optional `OPSECFORGE_MCP_ROOTS` variable restricts file access to a path-delimited set of directories.

Webhook verification reads raw request bytes from a path and obtains the signing secret only from the environment variable named in `secret_env`. It supports GitHub, Stripe, and generic HMAC signatures. JWT inspection can read a token from an environment variable or accept a token argument; the latter is already exposed to the model. File checksums support SHA-256 and SHA-512.

For Claude Code, the plugin can add the MCP server, a skill, and a `PreToolUse` hook. The hook blocks several direct reads of common secret-file patterns and points the agent toward redaction. The standalone MCP configuration can also be used without the hook.

## Setup and configuration

Node.js 20 or newer is required. Claude Code can install the plugin with its marketplace and plugin commands, or add the server directly with `claude mcp add`. Codex uses an `mcp_servers.opsecforge` entry in `~/.codex/config.toml`, while Cursor uses an `opsecforge` stdio entry in project or global `.cursor/mcp.json`.

Export environment variables in the shell that starts the agent, or configure them in the MCP server's client entry. Variables referenced by `verify_webhook` and `inspect_jwt` must exist in the MCP process environment. Do not paste those secret values into chat or commit them. Set `OPSECFORGE_MCP_ROOTS` for optional file-path restrictions.

## Tools and capabilities

- `redact_file({ path })` masks detected secrets in text files up to 1 MiB and reports types, counts, and original line numbers.
- `scan_secrets({ paths?, staged? })` scans files, directories, or added lines from `git diff --cached`; directory scans skip common generated and dependency paths, symlinks, binaries, and files beyond the stated limits.
- `redact_text({ text })` creates a masked copy of text already held by the agent.
- `verify_webhook({ provider, body_path, secret_env, signature, algorithm?, tolerance_seconds? })` checks GitHub, Stripe, or generic HMAC signatures and reports formatting, timestamp, and body-reformatting diagnostics.
- `inspect_jwt({ token_env?, token? })` decodes headers and claims, reports time-claim status and risk indicators, but does not verify signatures.
- `file_checksum({ path, algorithm, expected? })` hashes local files up to 32 MiB and can compare the result with common expected-value formats.

## Limitations and notes

Secret detection uses heuristics. It covers common key formats, headers, fields, and JWT-shaped strings, but can miss custom formats, secrets in prose, base64-wrapped values, or unusual multiline values. It may also flag harmless values. Redacted output still includes unmatched content such as internal URLs or personal data.

The Claude Code hook is not a sandbox and cannot reliably stop indirect reads performed by scripts, build tools, shell expansion, or programs. Codex and Cursor do not provide an equivalent hook, so their protection depends on the agent choosing these tools and on the client's own permissions or sandbox. A clean scan means only that no configured detector matched. Secrets that have already reached a model context, log, or commit should be rotated. `scan_secrets` is not a replacement for a maintained dedicated scanner in CI.

_Full upstream README: https://allmcps.com/mcp/cyberdroid2077-opsecforge-tools/readme_

