Skip to main content
Glama

Second Desk Citadel

The combined security suite: check a tool before you install it, audit the site it runs beside, pin the tool so a later change cannot slip past quietly, and recheck on a rhythm so you watch the findings close. One MCP server, eighteen tools, one verdict.

I built two security servers before this one. Trust checks a tool at the door: it verifies sealed capsules, audits MCP config files, and scans downloaded packages before anything runs. Bulwark audits a live site for the weaknesses AI attack agents walk through, and it carries a detection pack and a canary kit. Every operator I talked to needed both halves, plus two things neither server had. A tool that passed on Monday could be a different tool on Friday, and nothing noticed. And a scan is a photograph, where what you want is a watch. Citadel is the fusion: both engines in one server, a pinning layer that turns a checked folder into a watched folder, and a recheck layer that diffs every new assessment against the last one and names what got fixed, what is new, and what is still open.

The numbers up front, all of them from the test record in this repo: eighteen tools in one server. Seventy seven tests across four suites, all passing: the Trust engine suite (16), the Bulwark server suite (38), the canary suite (11), and the Citadel suite for the new layers (12). Against a throwaway fixture site with planted weaknesses and a fixture package with planted problems, one full_assessment call returned eighteen findings across the install gate and the surface layers, and a string search over the whole output confirmed no planted secret value appears anywhere in it.

Tools

The install gate, from Trust:

Tool

What it does

capsule_inspect

Reads a sealed capsule's self description: identity, purpose, capabilities, provenance, proof checks, file inventory. Executes nothing.

capsule_verify

Recomputes a capsule's hashes and manifest digest and, in full mode, re runs its bundled proof checks in separate processes. Verdict: VERIFIED, FAILED, or INVALID.

mcp_config_audit

Audits an MCP client config: commands that do not resolve, missing paths, plain text secrets named by key and never shown, shell entries, whole drive access.

package_audit

Scans a folder before install: executables, install scripts, network code with file and line, secret shaped strings by kind and location.

site_security_check

One light pass over a site you own: security headers, TLS facts, version signals, exposure path status codes.

trust_report

The package audit and the capsule checks for one folder, as a single verdict.

The surface audit, from Bulwark:

Tool

What it does

secret_scan

Finds hardcoded secrets in a site's public code, values always masked.

sourcemap_check

Reports whether source maps are publicly reachable.

api_surface_check

Inventories common API and exposure routes and names the ones answering with no authentication.

header_check

Reports security headers present and missing, plus version disclosure.

token_config_check

Inspects a JWT or an auth configuration for dangerous settings. Inspection only; nothing is verified or sent anywhere.

console_exposure_check

Looks for an exposed agent console on the target address and the common console ports.

defense_report

Every web check in one report, fix list ordered by the weakness list the FBI published in FLASH alert 20261113-001.

Pin and watch, new in Citadel:

Tool

What it does

pin_snapshot

Hashes every file in a folder tree into a manifest you keep. Set the CITADEL_PIN_KEY environment variable and the manifest also carries an HMAC signature over its file table.

pin_verify

Compares the tree against the manifest and names every added, removed, and changed file, after checking the manifest against its own digests.

Canary status and the continuous layers, new in Citadel:

Tool

What it does

canary_status

Reads a Bulwark canary alert log and folds the touches: how many, which decoys, when, from where.

recheck

Runs the combined assessment, saves the report with a timestamp, and diffs against the previous report for the same target: fixed, new, and still open, each one named.

full_assessment

The master tool. Give it a folder, a site, a config, or any combination, plus an optional pin manifest and canary log, and it runs every applicable layer and ends in one combined verdict.

The repo also carries the Bulwark detection pack (six Sigma rules plus the same hunts as Splunk, Elastic, and grep queries, in detection/) and the canary kit (decoy generator, listener and log scanner, and a planting guide, in canary/), plus the Bulwark field guide in GUIDE-BULWARK.md.

Related MCP server: WebSex

Setup

You need Python on the machine. I test on Python 3.12. The server is Python standard library only: there is nothing to install, no account, and no key.

  1. Point your MCP client at the server:

{
  "mcpServers": {
    "citadel": {
      "command": "python3",
      "args": ["/path/to/citadel/mcp_server.py"]
    }
  }
}
  1. Run the install gate on anything new: package_audit on the folder, mcp_config_audit on the config that will run it.

  2. Pin what passed: pin_snapshot on the folder. Keep the manifest somewhere the tool itself cannot rewrite.

  3. Put the target on a recheck rhythm: call recheck with the same folder, site, and reports folder each time, and read the diff.

If you would rather run it in a container, the Dockerfile in this repo builds the same stdio server.

Examples

One full_assessment call against my planted weakness fixtures (a package with a secret shaped string and an install script, and a local site with a fake key in its code, an open route, an exposed source map, and no security headers) returned this verdict:

verdict: Concerns found. Read the findings before you rely on this target.
layers run: install_gate, surface
findings: 18 total, 2 high, 9 medium, 7 low
first surface findings:
  [high, secret_scan] Possible hardcoded secret in the site code
  [high, console_exposure_check] Agent console appears exposed
  [medium, header_check] Content Security Policy header missing

And the recheck diff after I fixed exactly one weakness, the secret shaped strings in the fixture package:

fixed (2):
  [high] Secret shaped string: GitHub token in secret.py line 7
  [high] Secret shaped string: secret assigned in code in secret.py line 8
new (0)
still open (5), including:
  [medium] Install or setup script: setup.py
  [medium] Code opens network connections: net.py line 3 (socket module)

Limits

Know the limits before you rely on it. Every check here is read only, so a clear pass means the checks that ran found nothing; it is not a promise that a target is safe, and no honest tool can make that promise. The package audit matches the patterns it knows. The surface checks use fixed route, port, and marker lists, so a renamed console or an unusual layout can slip past, and the Sigma rules are validated as structure and syntax and have not been run inside a live SIEM. Pinning proves a tree matches the manifest you kept; it cannot help if the manifest itself was replaced by someone who also holds your signing key, which is why the manifest belongs somewhere the pinned tool cannot reach. Full mode capsule verification runs a capsule's own proof checks in separate processes with a scrubbed environment, which is process isolation, not a sandbox; use static mode for a capsule from a source you do not trust yet. The server speaks stdio only. And the whole suite belongs on systems you own or are authorized to test. That is what it is built for, and it is the only way I sell it.

License

MIT. The code is open; what a purchase buys is the finished package, the setup help, and the support.

Available Tools

18 tools
api_surface_checkB

Inventory common API and exposure routes on the target with plain GET requests and report which ones answer with no authentication at all. Exposure file bodies are classified, never returned. Read only, no payloads.

Inputs: target (required).

canary_statusA

Read a Bulwark canary alert log and fold the touches: how many in total, which decoys, when first and last, and from where. A missing log reports log_found false and zero touches, in plain words.

Inputs: log_path (required).

capsule_inspectA

Read a sealed capsule's self description: identity, exact purpose statements, capabilities, interfaces, requirements, provenance, the proof checks it bundles, and its file inventory. Executes nothing and hashes nothing.

Inputs: path (required).

capsule_verifyA

Verify a capsule: validate its manifest structure, recompute its content hashes and manifest digest, and in full mode re run its bundled proof checks in separate processes. Verdict: VERIFIED, FAILED, or INVALID. Use static mode for a capsule from a source you do not trust yet.

Inputs: path (required), mode.

console_exposure_checkA

Inventory check for an agent console exposed on a host you own. Probes the target address, a short list of common console ports, and the paths / and /console, looking for agent console page markers. Read only.

Inputs: target (required).

defense_reportB

Run every Bulwark web check against the target and roll the findings into one report with a fix list ordered by the weakness list the FBI published for ARTEX style attacks. Optionally include one token or auth configuration for inspection in the same report.

Inputs: target (required), token_or_config.

full_assessmentB

The master tool. Give it a folder, a site, a config, or any combination, plus an optional pin manifest and canary log, and it runs every applicable layer and ends in one combined verdict: every finding named, counted by severity, and grouped by the layer that found it.

Inputs: site, config, folder, canary_log, +1 more.

header_checkB

Report which standard security headers the target sends and which are missing, plus software version disclosure in Server style headers. Read only.

Inputs: target (required).

mcp_config_auditA

Audit an MCP client config file: commands that do not resolve, argument paths that do not exist, env values that look like secrets stored as plain text (the key is named, the value is never shown), entries that start through a shell, and arguments that hand a server the whole drive. Nothing named in the config is run.

Inputs: path (required).

package_auditA

Scan a local folder before you install or run what is in it: executable files, install and setup scripts, code that opens network connections with file and line, and secret shaped strings with the kind of secret and where it sits. Secret values are never read out. Nothing in the folder is executed.

Inputs: path (required).

pin_snapshotA

Hash every file in a folder tree into a pin manifest you keep: a file table with a digest over the table, and an HMAC signature over it when CITADEL_PIN_KEY is set in the environment. Returns the manifest; pass manifest_path to also write it to a file, somewhere the pinned tool cannot rewrite.

Inputs: path (required), manifest_path.

pin_verifyA

Compare a folder tree against a pin manifest. First the manifest is checked against its own digests and signature; a manifest that fails is MANIFEST_NOT_TRUSTED and blesses nothing. Then every added, removed, and changed file is named, or the tree reports INTACT.

Inputs: path (required), manifest_path (required).

recheckA

Run the combined assessment on a folder, a site, a config, or any combination, save the report with a timestamp in reports_folder, and diff it against the previous report for the same target: fixed, new, and still open, each one named. Call it with the same target and the same reports folder on a rhythm.

Inputs: reports_folder (required), site, config, folder, +2 more.

secret_scanA

Scan a site you own for hardcoded secrets in its public code: the page, its inline scripts, and its own script files. Reports the file, the pattern type, and a masked value. Full secret values are never returned. Read only.

Inputs: target (required).

site_security_checkA

One light pass over a site you own or are authorized to test: which standard security headers are present and which are missing, TLS certificate facts on https sites, server and generator version signals, and the status codes of a few well known exposure paths. Status codes and header facts only.

Inputs: url (required).

sourcemap_checkB

Check whether source maps for the target scripts are publicly reachable. A reachable source map hands anyone the original source code. Read only.

Inputs: target (required).

token_config_checkA

Inspect one JSON Web Token or one JSON auth configuration you supply and report dangerous settings: alg none accepted, signature checks off, no expiry, very long lifetimes, short signing secrets. Inspection only. Nothing is verified against any service and nothing is sent anywhere.

Inputs: token_or_config (required).

trust_reportB

One verdict on a folder: the package audit, plus the capsule inspection and a static verification when the folder holds a capsule manifest, as a headline, the grouped concerns, and the full findings behind them.

Inputs: path (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 18 tools

    Disambiguation3/5

    Most individual checks map to a distinct artifact (capsule, folder, config, token, header, sourcemap, API routes, console exposure), but site_security_check is described as a light superset of header_check plus api_surface_check plus exposure-path probing, forcing a guess between overlapping web checks. Four aggregation tools (trust_report, defense_report, recheck, full_assessment) also overlap heavily, and only the verbose descriptions keep them separable.

    Naming Consistency4/5

    Nearly all names are snake_case with a subject_modifier plus action shape (package_audit, secret_scan, congruence: header_check, capsule_verify), which reads predictably. Minor deviations: pin_snapshot/pin_verify use a verb-first reading, and recheck is a bare verb while full_assessment is an adjective_noun outlier.

    Tool Count3/5

    At 18 tools the surface is on the heavy side for what is essentially an audit suite, and the weight comes largely from redundant aggregators layered over the same underlying checks. Each individual check earns its place, but trust_report/defense_report/recheck/full_assessment largely recombine the same primitives into four separate entry points.

    Completeness4/5

    Coverage is broad: capsule inspect/verify, folder and config audits, six web checks, token config inspection, pin snapshot/verify, canary status, plus orchestration with timestamped reports and fix/new/still-open diffs. Gaps are modest but real: capsules can be verified but never built, findings cannot be remediated or annotated, and only the combined assessment supports diffing against a prior baseline.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to run deterministic, fully local static security and compliance audits of code, configurations, and dependencies through 32 MCP tools covering 24 vulnerability categories. It also detects the project stack, generates risk reports and checklists, suggests stack-aware remediations, and re-validates fixes to confirm vulnerabilities were eliminated.
      32
      1
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      Provides a container-native offensive security MCP toolkit that runs 179 tools — executable-backed scanners plus deterministic, evidence-first vulnerability probes — against authorized engagement targets. Enables scope-guarded pentesting workflows with persisted JSON evidence artifacts and high-confidence versus review-only findings.
      179
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Exposes read-only AWS security-posture checks as MCP tools, letting Claude Desktop, Claude Code and Cursor run 14 severity-ranked checks across S3, EC2, RDS, IAM and CloudTrail, describe resources, and produce a scored summary with prioritized risks. It ships an offline fixture estate so every tool works without credentials, and switches to a live account via a single environment variable.
      6
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Exposes thirty callable tools that let any MCP client audit server manifests, detect poisoned tool descriptions, config files and long-term memory, catch tool rug-pulls, check known vulnerabilities and package authenticity, and statically screen tool code for SSRF, path traversal and command injection risk. It also simulates whether a proposed agent action should auto-approve or be held for human review.
      MIT