shpbl-counterfactual-exposure-planner
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@shpbl-counterfactual-exposure-planner Compare two futures: patch all criticals or isolate the edge gateway."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Counterfactual Exposure Planner
Compare several remediation futures against a sealed exposure graph before touching production.
A deterministic what-if engine for exposure data: clones a sealed exposure graph, applies bounded interventions, recomputes weighted risk and reachable attack surface, then ranks the resulting futures and marks the Pareto-efficient ones before production changes.
It is an analysis and decision surface, not an actuator: it has no network client, touches no files, spawns no processes, and reads no environment variables.
Why a practitioner would install this
"Patch this or isolate that?" gets a measured answer. Both futures are computed against the same sealed baseline instead of argued.
Your input graph is never mutated. Every scenario runs on a clone, so a planning session cannot corrupt the state of record.
Reachability, not just counts. Scenarios are scored on weighted risk, reachable attack surface and critical reachable findings, plus their own cost.
Inferior options are labelled. Pareto marking stops a scenario that is worse on every axis from being presented as a reasonable choice.
Rankings are reproducible. Deterministic utility with stable tie-breaks means the same data ranks the same way in tomorrow's review.
Related MCP server: CyberSim Pro MCP Server
Behavioural contract
Validate and clone the baseline exposure graph; caller input is never mutated.
Support bounded interventions: patch a finding, isolate an asset, reduce exposure probability, or vary criticality as a stated assumption.
Recompute weighted risk, reachable attack surface, critical reachable findings and intervention cost for every scenario.
Seal both baseline graph and scenario with SHA-256 canonical digests.
Rank scenarios deterministically by utility with stable tie-breaks.
Mark Pareto-efficient scenarios so a dominated scenario is not presented as equally attractive.
Unknown targets and out-of-range values fail closed.
Prerequisites
Node.js 20 or newer (
node --version). Zero runtime dependencies.An MCP client that speaks stdio (Claude Code, Claude Desktop, Cursor), or direct library use from TypeScript.
No API key, account, network access or Tenable product is required.
Install and run
git clone https://github.com/SweetKenneth/shpbl-counterfactual-exposure-planner.git
cd shpbl-counterfactual-exposure-planner
npm install # devDependencies only: typescript
npm run build # compiles to dist/
npm test # 25 behavioural, boundary and fail-closed tests
npm start # starts the MCP server on stdioMCP client configuration:
{
"mcpServers": {
"shpbl-counterfactual-exposure-planner": {
"command": "node",
"args": ["/absolute/path/to/shpbl-counterfactual-exposure-planner/dist/src/mcp-server.js"]
}
}
}Tools exposed
exposure_baseline— Measure a sealed exposure graph without mutating itexposure_simulate— Simulate one intervention scenario against current exposure stateexposure_rank— Rank multiple counterfactual scenarios deterministically and identify Pareto-efficient options
What it outputs
Sealed baseline measurements, per-scenario risk/attack-surface/cost metrics with canonical digests, a deterministic ranking, and Pareto flags.
Verification
Reproduce all of it from a clean clone with npm run check:
Strict TypeScript compile and
--noEmittypecheck: PASSBehavioural tests: 25/25 PASS
Randomised invariant hammer: 30,000 cases / 120,000 invariant checks PASS
Static scan for network, filesystem, process and dynamic-eval surfaces in
src/: PASS (0 findings)Worked example runs end to end: PASS
Runtime dependencies: 0
Known limitations
Results describe the graph you supply; missing assets, edges or findings produce a confident answer about an incomplete world.
No scanner or vendor API client is embedded and nothing is changed in production.
Criticality variation is an explicit assumption, not a measurement.
Cost is the caller's declared intervention cost, not an economic model.
Provenance and lineage
This product exists because two things were put together, and both are credited.
Upstream capability inspiration — packetchaos/navi, by Casey Reid (packetchaos), MIT licensed. Its observed behaviour was studied as a capability surface: what a practitioner in that domain actually needs to do. The exact paths and lines that were read are recorded in PROVENANCE.json. No line of upstream implementation code is used in this package. The upstream licence text is preserved under THIRD_PARTY_NOTICES/ as provenance; it does not license this implementation.
SHPBL capability library — shpbl.com. SHPBL (shpbl.com) is a governed library of reusable software capabilities and a method for composing them: it reads a target repository, identifies what capability it demonstrates, matches that against owned capability records, and writes new software where neither side had it before. The capability parents used here are listed by identifier in PROVENANCE.json. No harvested capability body is embedded in this package.
The implementation in this repository was written fresh from the approved capability contract for this run. The literal composition is 0% upstream code, 0% copied SHPBL capability bodies, 100% new implementation. That is an exact-line and byte-level statement about this source tree, not a legal opinion.
Author and copyright: Kenneth E. Sweet Jr., MIT licensed.
Attribution does not imply endorsement by Casey Reid (packetchaos), Tenable, or any other party.
Tenable status
Submitted to the Tenable CyberAgents Exchange for review on September 14, 2026 — pull request #175. Submission does not imply review, approval, certification, validation, endorsement or acceptance by Tenable.
Files
src/— implementation and the stdio MCP server.tests/— behavioural, fail-closed and MCP integration tests.scripts/— randomised invariant hammer and the static security scan.examples/worked-example.ts— an end-to-end run you can execute.SECURITY.md— threat boundary and forbidden behaviour.PROVENANCE.json— upstream and SHPBL capability lineage.MANIFEST.json/CHECKSUMS.sha256— released file inventory and hashes.LICENSE— MIT.
License
MIT © 2026 Kenneth E. Sweet Jr.. See LICENSE.
Available Tools
3 toolsexposure_baselineB
Measure a sealed exposure graph without mutating it
Inputs: graph (required).
exposure_rankB
Rank multiple counterfactual scenarios deterministically and identify Pareto-efficient options
Inputs: graph (required), scenarios (required).
exposure_simulateC
Simulate one intervention scenario against current exposure state
Inputs: graph (required), scenario (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct role: baseline measurement, single-scenario simulation, and multi-scenario ranking. There is no real overlap or ambiguity between these three operations.
All tools share the exposure_ prefix and snake_case, which makes them predictable. The minor deviation is that exposure_baseline uses a noun while exposure_simulate and exposure_rank use verbs, slightly breaking a pure verb_noun pattern.
Three tools is on the lower end but appropriate for a tightly scoped counterfactual exposure planner. Each tool covers a distinct stage in the workflow and none feels redundant.
The core planning workflow of baseline, simulate, and rank is well covered. The main gap is the lack of tools for defining/persisting scenarios or applying a chosen intervention, but this is not a fatal omission for a planner.
Related MCP Connectors
Deterministic what-if & scenario simulation for AI agents: projections, sensitivity & break-even.
Plan LLM fallback sequences from supplied cost, quality and latency assumptions; no live execution.
Attack paths, scan findings and shadow AI for AI-native apps and their clouds; vet MCP servers.
Portfolio scenarios with instrument checks, Monte Carlo analysis and interactive reports.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables automated penetration testing workflow planning using Beam Search and Monte Carlo Tree Search algorithms to generate step-by-step attack paths, score vulnerabilities, and recommend tools for reconnaissance, exploitation, and privilege escalation tasks.38MIT
- AlicenseBqualityDmaintenanceEnables cybersecurity training, purple-team collaboration, and executive readiness through tools for scenario generation, attack simulation, telemetry analysis, incident investigation, forensics, and reporting with an immutable audit trail.12MIT
- AlicenseAqualityBmaintenanceEnables agents and security automation to adjudicate proposed defense mutations against a sealed, canonicalized attack scenario, enforcing reproduction, impact-screening, regression, and proven-improvement gates before promoting at most one candidate. Every verdict, rejected candidate, and rejection reason is sealed into a recomputable SHA-256 Merkle evidence root and hash-linked lineage that can be independently verified without trusting the server.6MIT
- AlicenseBqualityCmaintenanceEnables generating capacity-safe, risk-weighted scan schedules, identifying coverage blind spots, and comparing sealed scan plans.3MIT