Back to Browse

Nhi As Code MCP Server

Developer ToolsLow Risk9.7MCP RegistryLocal
Free

Server data from the Official MCP Registry

Zero-dep NHI governance: workflow audit, OIDC/App migrations, Ed25519 verify & offboarding.

About

Zero-dep NHI governance: workflow audit, OIDC/App migrations, Ed25519 verify & offboarding.

Security Report

9.7
Low Risk9.7Low Risk

Valid MCP server (0 strong, 2 medium validity signals). No known CVEs in dependencies. ⚠️ Package registry links to a different repository than scanned source. Imported from the Official MCP Registry. 1 finding(s) downgraded by scanner intelligence.

8 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@nhiascode/mcp-server"
      ]
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

NHI-as-Code (nhiascode.dev)

Zero-dependency, zero-secret Non-Human Identity (NHI) governance, GhostAction blast-radius auditing, Agentic CI runtime detonation (claude-code-action, codex-action, run-gemini-cli), zero-wildcard AWS OIDC & GitHub App PR remediation, and Ed25519-signed SOC 2 / ISO 27001 compliance evidence.

Built by The Peripety Company on Node.js 22+ native TypeScript and Cloudflare Workers + D1 + R2 — with dependencies: {} and devDependencies: {} across the entire monorepo.


Why NHI-as-Code? (Beyond Static YAML Linters)

Static linters (zizmor, actionlint, snyk/agent-scan, ecc-agentshield) inspect YAML syntax or prompt strings in isolation. NHI-as-Code solves the full Non-Human Identity & Agentic CI problem without ever asking for your production credentials:

  1. Zero-Secret Architecture (HTTP 422 Firewall): All provider discovery, workflow scanning, and runtime detonation run strictly inside your trust boundary (local CLI or CI runner). Only metadata and salted HMAC-SHA256 fingerprints cross the wire — enforced both client-side and by a mandatory server-side Raw-Secret Rejection Firewall (RAW_SECRET_REJECTED, HTTP 422).
  2. Agentic CI Runtime Detonation (3 Orthogonal Oracles · 10 CVE/Injection Probes): Unlike static prompt scanners, npx @nhiascode/cli detonate . --json runs a Hard-Abort Zero-Secret Preflight Gate (exits 4 if live AWS_*, ANTHROPIC_API_KEY, OPENAI_API_KEY, or PATs are present) and executes 3 independent runtime oracles (canary-leak including Base64/Hex/Markdown-image exfil, taint-on-read, and persistence-write) against claude-code-action, codex-action, run-gemini-cli, CLAUDE.md, AGENTS.md, .claude/settings*.json, .git/config, and .mcp.json — returning 1-turn JSON remediationPatch snippets.
  3. Action-First OIDC & GitHub App Remediation (INV-4, INV-5): Generates strict zero-wildcard AWS OIDC Terraform trust policies (StringEquals on both aud = "sts.amazonaws.com" and exact sub = "repo:<org>/<repo>:ref:refs/heads/<branch>" or environment:<env>), replaces long-lived GH_PAT secrets with actions/create-github-app-token, and pins GitHub Actions to 40-char commit SHAs.
  4. Offline-Verifiable Ed25519 Evidence (INV-3): Produces RFC-8785 canonical JSON, Ed25519-signed SOC 2 Type II (CC6.1–CC6.3), ISO 27001:2022 (A.5.15–A.5.18), and Agentic CI Detonation Attestations for Vanta/Drata custom evidence plus XSS-safe SVG Trust Badges verifiable against /.well-known/nhi-jwks.json.
  5. Zero External Dependencies (INV-1): Zero third-party npm packages, zero post-install scripts, zero transitive supply-chain surface. Every line runs on Node 22+ built-ins and standard WebCrypto.

See docs/THREAT_MODEL.md, docs/SECURITY_ASSURANCE.md, skills/nhi-oidc-remediation/SKILL.md, and https://nhiascode.dev/llms.txt.


Quickstart for Developers & Coding Agents (Zero Auth, Node >= 22)

The CLI honors an agent-native AX Contract: auto-JSON when stdout is non-TTY, explicit --json / --yes / --no-interactive / --dry-run, structured JSON recovery hints on stderr, and semantic exit codes (0 clean, 1 finding/error, 2 usage, 3 not found, 4 auth/preflight secret abort, 5 policy conflict, 10 clean dry-run).

# 1. Zero-credential GhostAction blast-radius score demo
npx @nhiascode/cli demo --json

# 2. Scan local workflows, Terraform, and Dockerfiles (zero network calls)
npx @nhiascode/cli scan . --json

# 3. Run Agentic CI runtime detonation (3 oracles, 10 CVE probes, 1-turn JSON patches)
npx @nhiascode/cli detonate . --json

# 4. Generate zero-wildcard AWS OIDC Terraform + GitHub App token migration preview
npx @nhiascode/cli fix-preview --repo . --org my-org --repo-name my-repo --branch main --aws-account 123456789012 --json

# 5. Boot the real Cloudflare Worker locally (Node 22 + node:sqlite + seeded demo org)
npm run dev
# -> http://127.0.0.1:8788/               (Interactive CI Supply-Chain & OIDC Scanner)
# -> http://127.0.0.1:8788/llms.txt       (Machine-Readable Agent Quickstart)
# -> http://127.0.0.1:8788/trust/acme-saas (Live Browser WebCrypto Ed25519 Verifier)
# -> http://127.0.0.1:8788/.well-known/nhi-jwks.json (Public Ed25519 JWKS)

# 6. Build pure .mjs distributions, run tests & synthetic security canary
npm run build && npm test && npm run canary

Monorepo Package Map

Package / PathNamePurposeExternal Deps
packages/core@nhi-as-code/coreReDoS-proof secret firewall (detectRawSecrets, redactSecrets, assertZeroRawSecrets), Agentic CI detonation engine (3 oracles, 10 CVE probes FP-01..FP-10), RFC-8785 JCS, Ed25519 signing, GhostAction workflow/Terraform/Dockerfile scanner, OIDC/App/offboarding generators, SOC 2 & ISO 27001 evidence + SVG badges0
packages/cli@nhiascode/cli (npx @nhiascode/cli)Zero-auth AX-compliant CLI (demo, scan, detonate/drill with loopback canary proxy, fix-preview, offboard, verify), read-only provider adapters, SARIF/JSON/Markdown output, HTTPS-only metadata digest upload0
packages/workernhi-as-codeCloudflare Worker control plane (D1 + R2 + Cron), 422 raw-secret firewall, streaming body limits (413), SSRF blocklist, multi-tenant API, GitHub App SHA-pinned PRs, Polar billing webhooks (Starter/Team/Growth/Scale), /llms.txt, /trust/:org, /badge/:org.svg, /admin0
packages/mcp@nhiascode/mcp-serverThin stateless stdio JSON-RPC 2.0 MCP server (nhi_scan_workflow, nhi_generate_oidc_migration, nhi_generate_app_token_migration, nhi_verify_evidence, nhi_offboarding_playbook) with zero shell execution and zero filesystem reads0
packages/actiontheperipetycompany/nhi-as-code-actionNative Node 24 GitHub Action (dist/index.mjs) with strict GITHUB_WORKSPACE path/symlink containment, optional detonate: "true" Agentic CI runtime detonation, SARIF 2.1.0 output, and zero-secret digest upload0
skills/nhi-oidc-remediationnhi-oidc-remediationCompact Agent Skill (~30-token trigger, ~800-token remediation playbook) for Claude Code, Cursor, Codex, and Antigravity0
migrationsD1 SQLite SchemaParameterized multi-tenant schema (0001–0003) with salted API key hashes, webhook replay deduplication, and append-only hash-chained audit_log—
scriptsOperationsbuild-dist.mjs, build-worker.mjs, local-server.mjs, canary.mjs, deploy.sh, push-secrets.sh0

GitHub Action Usage

Pin the action to a full 40-character commit SHA in .github/workflows/nhi-audit.yml:

name: NHI-as-Code CI Supply-Chain Audit
on:
  pull_request:
  push:
    branches: ["main"]

permissions:
  contents: read
  security-events: write

jobs:
  nhi-audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4

      - name: Run NHI-as-Code Static Key & Agentic CI Detonation Audit
        uses: theperipetycompany/nhi-as-code-action@<40-char-commit-sha>
        with:
          repo-path: "."
          detonate: "true"
          fail-on: "high"
          sarif-output: "nhi-as-code.sarif.json"
          # Optional: uploads strictly metadata-only digest (ZERO raw secrets ever leave runner)
          # upload-digest-url: "https://nhiascode.dev/api/v1/ingests/digest"
          # org-slug: "${{ github.repository_owner }}"
          # api-key: "${{ secrets.NHI_AS_CODE_API_KEY }}"

      - name: Upload SARIF to GitHub Code Scanning
        if: always()
        uses: github/codeql-action/upload-sarif@<40-char-commit-sha>
        with:
          sarif_file: nhi-as-code.sarif.json

Coding Agents: CLI + SKILL.md + Thin MCP Server

For local repositories, prefer the zero-auth CLI (npx @nhiascode/cli scan . --json and npx @nhiascode/cli detonate . --json) paired with skills/nhi-oidc-remediation/SKILL.md and https://nhiascode.dev/llms.txt. Use the thin stateless MCP server when an agent lacks shell access or needs pure in-memory OIDC/App codegen and Ed25519 verification:

{
  "mcpServers": {
    "nhi-as-code": {
      "command": "npx",
      "args": ["-y", "@nhiascode/mcp-server"]
    }
  }
}

Tools exposed (zero shell execution, zero filesystem access, raw-secret rejection enabled):

  • nhi_scan_workflow
  • nhi_generate_oidc_migration
  • nhi_generate_app_token_migration
  • nhi_verify_evidence
  • nhi_offboarding_playbook

Pricing

TierMonthlyReposMonitored NHIsProvidersKey Capabilities
Free OSS$01252Local CLI (scan + detonate), GitHub Action SARIF, public Trust Badge
Starter$49/mo575410 auto-OIDC/App PRs/mo, Ed25519 SOC 2 & Agentic-CI attestation, 60d retention
Team$249/mo15250625 auto-OIDC/App PRs/mo, Ed25519 SOC 2/ISO evidence, offboarding playbooks, 90d retention
Growth$599/mo751,5008150 PRs/mo, Vanta/Drata custom evidence export, custom policy thresholds, 365d retention
Scale$1,299/moUnlimited10,0008Unlimited PRs, 730d audit retention, dedicated signing key options & priority support

Deployment

See HUMAN_LAUNCH_CHECKLIST.md for the step-by-step production go-live guide and GTM_OPERATIONS.md for automated PLG distribution operations.

# Push Cloudflare Worker secrets safely from .env.local (never echoes values)
./scripts/push-secrets.sh

# Test, validate invariants, run synthetic canary, migrate D1, and deploy
./scripts/deploy.sh

Reviews

No reviews yet

Be the first to review this server!