# io.github.heuristicolab/ctxfw (pypi · ctxfw)

Zero-egress AI Agent Firewall: SARA prompt injection defense, AST context pruning & MCP governance.

- Trust score: 70/100 (medium)
- Change this week: +3
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-11-05

## Components

- pypi · `ctxfw`: 70/100 (this document), [markdown](https://verifymcp.io/servers/heuristicolab-ctxfw/ctxfw.md), [page](https://verifymcp.io/servers/heuristicolab-ctxfw/ctxfw)

## Channel facts

- Registry: `pypi`
- Package: `ctxfw`
- Version: `4.1.1`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-11-05.

- **Supply Chain Security**: 100/100
  - No malware found by supply-chain analysis.
  - No known CVEs affecting this package version or its production dependencies.
  - Runs hatchling.build at install time, a recognised build step with no custom scripting around it.
  - 1 of 11 dependencies flagged as unhealthy.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (Apache-2.0).
  - Actively maintained (last published 10 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 63/100
  - AI-judged instruction clarity (excellent).
  - Context-footprint check failed: tool/resource definitions use about 1186 tokens (~237/item across 5 items; 5 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 37/100
  - Stability observed for 11 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
  - Structured output schemas are declared (100% of tools); any adoption earns full credit.
- **Tool Safety**: 100/100
  - No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.
  - We read all 5 captured tool definition(s), and no name or description among them implies an irreversible operation.
  - An AI judge read all 6 captured unit(s) of tool text and found none that tries to manipulate the model reading it.
- **Capabilities**: 20/100
  - Spec-recency check failed: implements MCP spec 2024-11-05; the latest is 2026-07-28.

## Install

### How do I install the io.github.heuristicolab/ctxfw MCP server?

io.github.heuristicolab/ctxfw runs locally as a PyPI package, launched with uvx ctxfw mcp. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

### Claude

```bash
claude mcp add heuristicolab-ctxfw -- uvx ctxfw mcp
```

### Cursor

```json
{
  "mcpServers": {
    "heuristicolab-ctxfw": {
      "command": "uvx",
      "args": [
        "ctxfw",
        "mcp"
      ]
    }
  }
}
```

### VS Code

```json
{
  "servers": {
    "heuristicolab-ctxfw": {
      "command": "uvx",
      "args": [
        "ctxfw",
        "mcp"
      ]
    }
  }
}
```

### Codex

```bash
codex mcp add heuristicolab-ctxfw -- uvx ctxfw mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "heuristicolab-ctxfw": {
      "type": "local",
      "command": [
        "uvx",
        "ctxfw",
        "mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add heuristicolab-ctxfw --command uvx --arg ctxfw --arg mcp
```

### Hermes

```yaml
mcp_servers:
  heuristicolab-ctxfw:
    command: "uvx"
    args: ["ctxfw", "mcp"]
```

### Netclaw

```json
{
  "McpServers": {
    "heuristicolab-ctxfw": {
      "Transport": "stdio",
      "Command": "uvx",
      "Arguments": [
        "ctxfw",
        "mcp"
      ]
    }
  }
}
```

### Vellum

```bash
assistant mcp add heuristicolab-ctxfw -t stdio -c uvx -a ctxfw mcp
```

### Other

```json
{
  "mcpServers": {
    "heuristicolab-ctxfw": {
      "command": "uvx",
      "args": [
        "ctxfw",
        "mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-11-04 (score 70, +16)

- [security improvement] Malware scan: unverified → pass

### 2026-11-03 (score 54, −15)

- [security regression] Malware scan: pass → unverified

### 2026-11-02 (score 69, +1)

No change was recorded against any check on this day. Stability & Change Management went from 23 to 27. That category is still filling its 30-day observation window: 7 days of observed history at the previous scan, 8 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-11-01 (score 68, +15)

- [security improvement] Malware scan: unverified → pass

### 2026-10-30 (score 53, −14)

- [security regression] Malware scan: pass → unverified

### 2026-10-28 (score 67, +1)

No change was recorded against any check on this day. Stability & Change Management went from 7 to 10. That category is still filling its 30-day observation window: 2 days of observed history at the previous scan, 3 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-10-26 (score 66, +1)

No change was recorded against any check on this day. Stability & Change Management went from 0 to 3. That category is still filling its 30-day observation window: 0 days of observed history at the previous scan, 1 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-10-25 (score 65)

First indexed and scored.

## MCP tools (5)

### `prune_file` (~190 tokens)

Extract semantic interfaces, types, pydantic models, sanitized raises, and signatures from a source file (`path`) at a given pruning `depth` ('full', 'interface', or 'nominal') and `language`, optionally stripping docstrings (`strip_docs`), while replacing procedural bodies with AST stubs. Use this when you only need to inspect contracts or APIs of an individual dependency without ingesting raw implementation code. For multi-module dependency graphs, use `resolve_context_bundle` instead. Does not modify files on disk (pure in-memory AST operation).

Input parameters:

- `depth` (string): Pruning depth: 'full', 'interface', or 'nominal'
- `language` (string): Programming language (python, typescript, javascript, go, java)
- `path` (string, required): Absolute or relative path to the source file
- `strip_docs` (boolean): Whether to strip docstrings entirely

Output parameters:

- `content` (array): Semantic interface stubs extracted via in-memory Tree-Sitter AST
- `isError` (boolean): True if pruning encountered a fatal parsing or file resolution failure

### `resolve_context_bundle` (~183 tokens)

Calculate topological dependency graph distances (D0 full `target_file`, D1 interface stubs, D2 nominal symbols) within `project_root` and compile a token-pruned Markdown context bundle, with optional reactive degradation via `breaker_state` and `session_id`. Use this as your primary context builder before editing a file in a multi-module project. For inspecting isolated files, use `prune_file` instead. Read-only operation.

Input parameters:

- `breaker_state` (string): Optional circuit breaker state (CLOSED, TRIPPED, HALTED) or decision kind
- `project_root` (string): Root directory of the project. Defaults to target file's directory.
- `session_id` (string): Session identifier (SES-...) to connect with TokenCast budget tracking
- `target_file` (string, required): Path to the active target file in editing (D0)

Output parameters:

- `content` (array): Compiled topological Markdown prompt context bundle
- `isError` (boolean): True if dependency resolution or file traversal failed

### `evaluate_spec_axioms` (~102 tokens)

Evaluate an architectural specification brief (`brief_text`) against formal determinism rules, negative invariant floors ('never'/'shall never'), and the Axiom Completeness Index (ACI 1.0000). Use this during intake or planning phases before writing code. For verifying unified git diff patches, use `evaluate_patch` instead. Pure read-only analytical evaluation with no side effects.

Input parameters:

- `brief_text` (string, required): Markdown content of the architectural intake brief to evaluate

Output parameters:

- `content` (array): JSON-serialized architectural determinism verification report
- `isError` (boolean): True if brief specification evaluation encountered an unhandled error

### `evaluate_patch` (~332 tokens)

Verify a unified git diff patch (`diff_text`) against SWE-Gate architectural constraints (`max_cyclomatic_delta`, `forbid_type_ignores`, `disallowed_import_modules`) and functional test results (`tests_passed`, `tests_failed`, `functional_verdict`) before allowing merge. Appends immutable audit records (`EVL-...`) in SweGateStore and seals cryptographic blocks in TraceKitStore; use `query_audit_ledger` to retrieve or verify persisted records.

Input parameters:

- `author_kind` (string): Patch author kind: 'AGENT' or 'HUMAN'
- `commit_sha` (string): 40-character lowercase hex commit SHA
- `diff_size_bytes` (integer): Exact UTF-8 byte length of diff_text
- `diff_text` (string, required): Unified diff text of the candidate patch
- `disallowed_import_modules` (array): List of banned module names that the patch must not import
- `forbid_type_ignores` (boolean): Whether introducing '# type: ignore' is forbidden
- `functional_verdict` (string): Functional test suite verdict: 'PASSED' or 'FAILED'
- `max_cyclomatic_delta` (integer): Maximum allowed cyclomatic complexity delta
- `pr_id` (integer): Pull request identifier (>= 1)
- `repo_id` (string): Optional repository identifier (REPO-...)
- `repo_name` (string): Repository name (e.g. 'heuristico/ctxfw')
- `tests_failed` (integer): Count of failing functional tests
- `tests_passed` (integer): Count of passing functional tests

Output parameters:

- `content` (array): JSON-serialized SWE-Gate verification report or rejection message
- `isError` (boolean): True if the patch was rejected by SWE-Gate or failed validation

### `query_audit_ledger` (~208 tokens)

Retrieve persisted SWE-Gate patch evaluation records and violation findings by `evaluation_id` (`EVL-...`), or verify and inspect cryptographic SHA-256 hash-chained audit sessions in TraceKitStore by `session_id` (`SES-...`) with optional block listing (`include_blocks`, `max_blocks`). Use this for forensic inspection and compliance verification after running `evaluate_patch` or context tools. Pure read-only query with zero ledger mutations.

Input parameters:

- `evaluation_id` (string): SWE-Gate evaluation identifier (`EVL-<16 lowercase hex chars>`) returned by `evaluate_patch`
- `include_blocks` (boolean): Whether to include individual hash-chained audit block records when querying `session_id`
- `max_blocks` (integer): Maximum number of audit blocks to return when `include_blocks` is true (1 to 256)
- `session_id` (string): TraceKit session identifier (`SES-...`) to verify SHA-256 hash chain integrity and inspect blocks

Output parameters:

- `content` (array): JSON-serialized audit ledger query and cryptographic chain verification report
- `isError` (boolean): True if neither identifier was provided, parameters failed validation, or no matching audit record was found

## Diagnostics

Captured diagnostic sections: Provenance, Install scripts, Dependencies. The full working is on the page: https://verifymcp.io/servers/heuristicolab-ctxfw/ctxfw#diagnostics

## Score history

- 2026-11-05: 70
- 2026-11-04: 70
- 2026-11-03: 54
- 2026-11-02: 69
- 2026-11-01: 68
- 2026-10-31: 53
- 2026-10-30: 53
- 2026-10-29: 67
- 2026-10-28: 67
- 2026-10-27: 66
- 2026-10-26: 66
- 2026-10-25: 65

## Common questions

### What is the io.github.heuristicolab/ctxfw MCP server?

io.github.heuristicolab/ctxfw is an MCP server listed in the public MCP registry as io.github.heuristicolab/ctxfw. Zero-egress AI Agent Firewall: SARA prompt injection defense, AST context pruning & MCP governance. This page covers its PyPI package (ctxfw).

### Is the io.github.heuristicolab/ctxfw MCP server safe to use?

io.github.heuristicolab/ctxfw scores 70 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 5 November 2026. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

### What tools does the io.github.heuristicolab/ctxfw MCP server expose?

io.github.heuristicolab/ctxfw exposes 5 tools: prune_file, resolve_context_bundle, evaluate_spec_axioms, evaluate_patch, query_audit_ledger. Their descriptions and schemas cost roughly 1,015 tokens of context every time the server is loaded.

### Is the io.github.heuristicolab/ctxfw MCP server still maintained?

io.github.heuristicolab/ctxfw is still listed as active in the MCP registry. We last reached this channel on 5 November 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

### What licence is the io.github.heuristicolab/ctxfw MCP server under?

io.github.heuristicolab/ctxfw declares the Apache-2.0 licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.

### What did VerifyMCP test on the io.github.heuristicolab/ctxfw MCP server?

VerifyMCP ran 16 checks on io.github.heuristicolab/ctxfw, covering Malware scan, Known CVEs, Install scripts, Dependency health and 12 more. Endpoint Security and Transport & Reachability do not apply to a PyPI package, so they were not tested. The score does not measure everything, and the scoring documentation lists what it leaves out.

## Links

- PyPI project: https://pypi.org/project/ctxfw/
- Socket report: https://socket.dev/pypi/package/ctxfw
- Repository: https://github.com/heuristicolab/ctxfw
- Changelog RSS feed: https://verifymcp.io/servers/heuristicolab-ctxfw/ctxfw.xml
- Changelog JSON feed: https://verifymcp.io/servers/heuristicolab-ctxfw/ctxfw/changelog.json
- Trust report (JSON): https://verifymcp.io/servers/heuristicolab-ctxfw/ctxfw.json
- HTML version of this page: https://verifymcp.io/servers/heuristicolab-ctxfw/ctxfw
