Context Fabric — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Context Fabric (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<p align="center"> <img src="assets/fabric_tan_mark.svg" alt="Context-Fabric" width="120"> </p>
<h1 align="center">Context-Fabric</h1>
<p align="center"> <strong>Production-ready corpus analysis for the age of AI</strong> </p>
<p align="center"> <a href="https://pypi.org/project/context-fabric/"><img src="https://img.shields.io/pypi/v/context-fabric?color=blue" alt="PyPI"></a> <a href="https://pypi.org/project/context-fabric/"><img src="https://img.shields.io/pypi/pyversions/context-fabric" alt="Python"></a> <a href="https://github.com/Context-Fabric/context-fabric/actions"><img src="https://img.shields.io/github/actions/workflow/status/Context-Fabric/context-fabric/ci.yml?branch=master" alt="CI"></a> <a href="https://github.com/Context-Fabric/context-fabric/blob/master/LICENSE"><img src="https://img.shields.io/github/license/Context-Fabric/context-fabric" alt="License"></a> </p>
<p align="center"> <img src="assets/demo-terminal.gif" alt="Context-Fabric MCP Server Demo" width="700"> </p>
<p align="center"> <em>AI agents running advanced grammatical queries via the Model Context Protocol</em> </p>
Context-Fabric brings corpus analysis into the AI era. Built on the proven Text-Fabric data model, it introduces a memory-mapped architecture enabling parallel processing for production deployments—REST APIs, multi-worker services, and AI agent tools via MCP.
Context-Fabric includes cfabric-mcp, a Model Context Protocol server that exposes corpus operations to AI agents:
# Start the MCP server
cfabric-mcp --corpus /path/to/bhsa
# Or with SSE transport for remote clients
cfabric-mcp --corpus /path/to/bhsa --sse 8000The server provides 10 tools for discovery, search, and data access—designed for iterative, token-efficient agent workflows.
Text-Fabric loads entire corpora into memory—effective for single-user research, but each parallel worker duplicates that memory footprint. Context-Fabric's memory-mapped arrays change the equation:
| Scenario | Memory Reduction |
|---|---|
| Single process | 65% less |
| 4 workers (spawn) | 62% less |
| 4 workers (fork) | 62% less |
Mean reduction across 10 corpora. Memory measured as total RSS after loading from cache.
# Core library
pip install context-fabric
# With MCP server
pip install context-fabric[mcp]from cfabric.core import Fabric
# Load a corpus
CF = Fabric(locations='path/to/corpus')
api = CF.load('feature1 feature2')
# Navigate nodes
for node in api.N.walk():
print(api.F.feature1.v(node))
# Traverse structure
embedders = api.L.u(node) # nodes containing this node
embedded = api.L.d(node) # nodes within this node
# Search patterns
results = api.S.search('''
clause
phrase function=Pred
word sp=verb
''')| API | Purpose |
|---|---|
| N | Walk nodes in canonical order |
| F | Access node features |
| E | Access edge features |
| L | Navigate locality (up/down the hierarchy) |
| T | Retrieve text representations |
| S | Search with structural templates |
Context-Fabric trades one-time compilation cost for dramatic runtime efficiency. Compile once, benefit forever.
| Metric | Mean Improvement |
|---|---|
| Load time | 3.5x faster |
| Memory (single) | 65% less |
| Memory (spawn) | 62% less |
| Memory (fork) | 62% less |
Mean across 10 corpora. The larger cache enables memory-mapped access—no deserialization, instant loads, shared memory across workers.
<p align="center"> <img src="libs/benchmarks/benchmark_results/2026-01-09_032952/fig_memory_multicorpus.png" alt="Memory Comparison Across Corpora" width="700"> </p>
Run benchmarks yourself:
pip install context-fabric[benchmarks]
cfabric-bench memory --corpus path/to/corpus| Package | Description |
|---|---|
| context-fabric | Core graph engine |
| cfabric-mcp | MCP server for AI agents |
| cfabric-benchmarks | Performance benchmarking suite |
If you use Context-Fabric in your research, please cite:
Kingham, Cody. "Carrying Text-Fabric Forward: Context-Fabric and the Scalable Corpus Ecosystem." January 2026.
Context-Fabric by Cody Kingham, built on Text-Fabric by Dirk Roorda.
MIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.