Context-Fabric logo

Context-Fabric

Organization
Context-Fabric

The next evolution of Text-Fabric

PublisherContext-Fabric
Repositorycontext-fabric
LanguagePython
Forks
2
Stars
10
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Context-Fabric exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    10 stars and 2 forks from the linked repository.


Overview

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.

  • Built for Production — Memory-mapped arrays enable true parallelization. Multiple workers share data instead of duplicating it.
  • AI-Native — MCP server exposes corpus operations to Claude, GPT, and other LLM-powered tools.
  • Powerful Data Model — Standoff annotation, graph traversal, pattern search, and arbitrary feature annotations.
  • Dramatic Efficiency — 3.5x faster loads, 65% less memory in single process, 62% less with parallel workers.

→ Read the Technical Paper


MCP Server for AI Agents

Context-Fabric includes cfabric-mcp, a Model Context Protocol server that exposes corpus operations to AI agents:

bash
# Start the MCP server
cfabric-mcp --corpus /path/to/bhsa

# Or with SSE transport for remote clients
cfabric-mcp --corpus /path/to/bhsa --sse 8000

The server provides 10 tools for discovery, search, and data access—designed for iterative, token-efficient agent workflows.

→ MCP Server Documentation


Memory Efficiency

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:

ScenarioMemory Reduction
Single process65% 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.


Installation

bash
# Core library
pip install context-fabric

# With MCP server
pip install context-fabric[mcp]

Quick Start

python
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
''')

Core API

APIPurpose
NWalk nodes in canonical order
FAccess node features
EAccess edge features
LNavigate locality (up/down the hierarchy)
TRetrieve text representations
SSearch with structural templates

Performance

Context-Fabric trades one-time compilation cost for dramatic runtime efficiency. Compile once, benefit forever.

MetricMean Improvement
Load time3.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.

Run benchmarks yourself:

bash
pip install context-fabric[benchmarks]
cfabric-bench memory --corpus path/to/corpus

Packages

PackageDescription
context-fabricCore graph engine
cfabric-mcpMCP server for AI agents
cfabric-benchmarksPerformance benchmarking suite

Links

Citation

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.

Authors

Context-Fabric by Cody Kingham, built on Text-Fabric by Dirk Roorda.

License

MIT

Use Context-Fabric MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Context-Fabric is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Context-Fabric as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Context-Fabric MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "context-fabric": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Context-Fabric MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Context-Fabric MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Context-Fabric to help me with this task?
Context-Fabric
Sure. I read it.
Here is what I found using Context-Fabric.

Frequently asked questions

What is the Context-Fabric MCP server used for?

Context-Fabric is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Context-Fabric MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Context-Fabric with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Context-Fabric MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Context-Fabric connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Context-Fabric MCP to TypingMind?

Context-Fabric runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Context-Fabric MCP provide in TypingMind?

Context-Fabric exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Context-Fabric MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Context-Fabric requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇