Skip to content

Documentation

Everything you need to secure your AI-built projects

Claude Code MCP

Developer security

Put BoringSec inside Claude Code, Codex, and Cursor

Review the code you are changing, scan the app you deploy, and turn verified findings into safe next steps without leaving your editor. Setup uses device authorization, so normal installation never asks you to paste an API key into a config file.

Ready in one editor session

Authenticate once, connect your editor, then run a real review

Node.js 18 or newer and a BoringSec Pro, Business, or Enterprise workspace are required. macOS Keychain, Linux Secret Service, and Windows protected storage are used automatically when available.

Device login

No API key pasted into editor config

Workspace boundary

Local tools stay inside the startup repository

One result model

Editor, API, and dashboard use the same scan state

Install and prove it works

1

Authenticate this machine

terminal
npx -y @boringsec/claude-code login

The command opens /auth/device, shows a short code, and waits for your approval. Keep that code private. A dedicated machine credential is stored after approval.

2

Connect the editor you actually use

Claude Code

Automatic config

Writes the project MCP config, ignore rules, policy bundle, AGENTS.md, and starter rules.

terminal
npx -y @boringsec/claude-code init --editor claude --scope project --write-rules

Cursor

Automatic config

Writes the Cursor project config and the same repository security baseline.

terminal
npx -y @boringsec/claude-code init --editor cursor --scope project --write-rules

Claude Code and Cursor

One command

Use this when the repository is opened by both clients. Existing unrelated config is preserved.

terminal
npx -y @boringsec/claude-code init --editor both --scope project --write-rules
Inspect the generated stdio server configShow JSON
.mcp.json
{
  "mcpServers": {
    "boringsec": {
      "command": "npx",
      "args": ["-y", "@boringsec/claude-code"]
    }
  }
}
3

Verify before asking the agent to scan

terminal
npx -y @boringsec/claude-code doctor

Doctor checks authentication, protected credential storage, editor config, workspace rules, API reachability, plan access, and device posture. Resolve every FAIL before using hosted tools. A warning explains the exact follow-up command.

What success looks like
Authentication and the selected editor config show PASS. Restart the editor after setup, then its MCP tool list includes boringsec_workspace_review.

Codex setup that works with the published package

The currently published 0.4.5 package runs correctly as a Codex MCP server, but its initializer does not write .codex/config.toml. Add the block below to the project config and keep every unrelated setting already in that file.

.codex/config.toml
[mcp_servers.boringsec]
command = "npx"
args = ["-y", "@boringsec/claude-code"]
startup_timeout_sec = 60
tool_timeout_sec = 660

1. Trust the project root

Open the repository in Codex and approve the workspace trust prompt. Codex ignores project MCP config until that canonical root is trusted.

2. Verify effective config

Run both checks from the configured repository. They verify the file and the server Codex can actually see.

terminal
npx -y @boringsec/claude-code doctor --editor codex --scope project
codex mcp get boringsec
Codex setup is manual in the published package
Check your resolved package with npx -y @boringsec/claude-code version. For the current published 0.4.5 client, the TOML path above is the supported setup. This guide will only advertise automatic Codex initialization after a compatible initializer is publicly released.

Run the first useful review

Start with the compact workspace tool. It prefers staged files, then changed files, and only falls back to the full repository when there is no active diff.

prompt for your coding agent
Review this repository with boringsec_workspace_review in auto mode.
Show evidence-backed security findings first.
For every finding, include the affected file, why it matters, and the safest next fix.
Do not change files until I approve the plan.
1

Review

The MCP reads eligible files inside the trusted workspace boundary.

2

Decide

You receive evidence, confidence, affected files, and a merge recommendation.

3

Fix and recheck

Approve a patch, then run review_diff before commit or release.

Tools you should start with

boringsec_workspace_review

Review the current workspace and return compact, evidence-linked findings

boringsec_review_diff

Review staged or changed code and produce a merge decision

boringsec_scan

Scan a deployed HTTPS application

boringsec_scan_async

Start an asynchronous URL scan without blocking the editor

boringsec_scan_status

Follow base and independent deep-scanner progress

boringsec_suggest

Choose the most useful next security action

View the complete MCP tool catalog15 more tools
boringsec_scan_repo

Scan a public GitHub repository

boringsec_check

Load a completed scan by ID

boringsec_ai_analysis

Generate risk context, attack scenarios, and prioritized fixes

boringsec_compliance

Map evidence to PCI DSS, GDPR, SOC 2, HIPAA, or ISO 27001

boringsec_fix

Load built-in and community remediation prompts

boringsec_autofix

Generate a safe patch blueprint for supported low-risk findings

boringsec_generate_rules

Generate .cursorrules and AGENTS.md from scan evidence

boringsec_policy_packs

List policy packs and recommended bundles for the detected stack

boringsec_workspace_rules

Generate workspace rules from .boringsec/policy-bundle.json

boringsec_sync_waivers

Submit local waivers to the managed approval queue

boringsec_finding_feedback

Send false-positive, accepted-risk, or resolved feedback

boringsec_usage

Show plan capabilities, quota, and current usage pricing

boringsec_privacy_report

Explain the data boundary for each MCP tool

boringsec_stats

Show local project history and privacy-safe account statistics

boringsec_cicd_setup

Create a GitHub Actions or GitLab CI starter without overwriting files

Low-level scanners stay hidden by default
boringsec_scan_workspace, boringsec_scan_project, and boringsec_scan_code can create large raw previews. Enable them only for CI or precise debugging with BORINGSEC_EXPOSE_ADVANCED_TOOLS=1.

Production workflows

Review the repository before a release

Use boringsec_workspace_review while coding, then run the diff gate against the branch you plan to merge.

Compact findings, evidence, and merge guidance in the editor

Start a deployed-app scan from the editor

In the current published client, boringsec_scan_async is an asynchronous convenience. Keep the returned scan ID and poll with boringsec_scan_status. A failed request before an ID is returned must be retried and is not presented as a durable queued scan.

Keep the returned scan ID and inspect each scanner state separately

Keep agent rules aligned

Generate AGENTS.md, .cursorrules, and a versioned policy bundle for the stack. Managed teams can inherit central governance.

The repository carries its own review policy

Govern waivers and false positives

Keep local waivers reviewable, sync managed waivers to the organization queue, and send resolution feedback back to BoringSec.

Every suppression has an owner, reason, approval, and optional expiry

Add a repeatable pull-request gate

terminal
npx -y @boringsec/claude-code review-diff   --mode diff   --diff-base-ref origin/main   --markdown-output boringsec-review.md   --sarif-output boringsec-review.sarif   --github-annotations-output boringsec-review.annotations.json

Markdown

Readable PR summary for reviewers

SARIF

Uploadable findings for code scanning

Annotations

File and line feedback in CI logs

Know what leaves the machine

local_only

Repository discovery, ignore rules, local history, and supported static checks stay on the machine.

hosted_sanitized

Hosted review receives only the sanitized code or config required by the tool you invoke.

metadata_only

Telemetry contains privacy-safe counts and a hashed workspace identity, not raw code or prompts.

Run boringsec_privacy_report before a tool when you need the exact boundary. boringsec_stats shows the resulting provenance mix.

Keep the integration healthy

terminal
npx -y @boringsec/claude-code doctor --fix
npx -y @boringsec/claude-code rotate
npx -y @boringsec/claude-code status
npx -y @boringsec/claude-code support-bundle --project-root . --output boringsec-support.json
npx -y @boringsec/claude-code logout --revoke

Credential lifecycle

rotate renews the device credential. logout --revoke removes it locally and revokes the server key.

Safe support bundle

The support bundle excludes raw code, prompts, and secrets. Review the JSON before sharing it with support.

Troubleshoot by symptom

The editor shows no BoringSec tools
Restart the editor after config changes. Run npx -y @boringsec/claude-code doctor. For Codex, trust the repository and confirm codex mcp get boringsec from the same project root.
Login succeeds but hosted tools return 401
Run npx -y @boringsec/claude-code status. If the device key is expiring, run rotate. If it was revoked, run login again.
A tool returns a permission or plan error
The machine credential can only receive scopes available to the current workspace plan. Check boringsec_usage for the required capability and remaining quota.
A long URL scan appears to stop
If boringsec_scan_async returned a scan ID, poll that ID with boringsec_scan_status. The status response shows whether the base scan or any of Injection, XSS, Ports, Nuclei, ZAP, or Medusa is still running. If no scan ID was returned, retry the request once instead of assuming it was queued.

Make security part of the next coding session

Create a workspace, complete device login, and run the first evidence-backed review before your next merge.