Skip to main content
Glama

See ContextForge in 16 Seconds

Tip for GitHub Web Viewing: GitHub renders the animated GIF above automatically on every device. To embed an inline clickable MP4 player directly in the GitHub UI, drag and drop docs/contextforge-v3.7.0-showcase.mp4 into the GitHub README editor once — GitHub will automatically generate an inline <video> CDN URL.


Related MCP server: Graft

Why We Built ContextForge: The Tuesday Afternoon Problem

Picture a normal Tuesday afternoon for an analyst, founder, attorney, or software engineer in the US:

You have a 50-page locked SEC 10-K or M&A diligence PDF, a live pricing page that quietly changed from $49/mo to $59/mo, three client .eml email threads, a 100,000-row CSV ledger, and a GitHub repository you need to review before a 4:00 PM meeting.

If you drag those raw files straight into a cloud chat window, four predictable things go wrong:

  1. Repeated page headers, footers, and boilerplate bury the actual tables, wasting thousands of tokens and degrading retrieval accuracy.

  2. Contradictory figures silently blend together — the model cites last February's $49/mo PDF price instead of November's $59/mo live page without telling you they conflict.

  3. Accidental credential or PII leaks — a forgotten OpenAI/AWS API key, database password URI, .env secret, or US Social Security Number (XXX-XX-XXXX) gets uploaded into a third-party chat log.

  4. Zero portability — if you want to switch from Claude to ChatGPT, Gemini, Cursor, or air-gapped local Ollama, you have to re-upload and re-clean every file from scratch.

ContextForge owns that exact upstream step. It is the missing AI Context Preparation Studio that runs 100% locally on your own machine: ingesting 20+ formats, auditing extraction quality across 10 concrete checks, scrubbing secrets automatically, flagging cross-document conflicts, compressing codebases with AST Skeletons, and delivering clean, verifiable Context Packs to any AI you choose.


How ContextForge Compares

Workflow Need

Direct Chat Upload

Ad-Hoc Python / Bash Scripts

ContextForge Studio (v3.7.0)

Privacy & US PII Scrubbing

Uploads raw files to third-party cloud

Manual regex maintenance

100% local + auto-scrubs API keys, JWTs, DB URIs & US SSNs

Cross-Document Conflicts

Silently blends outdated & new numbers

Not detected

Flags numeric & pricing contradictions with source dates

Verifiable Citations

Locked inside one vendor chat thread

Lost when files are concatenated

100% page, slide, sheet row, timestamp & code-line provenance

Original PDF Verification

No side-by-side extraction audit

Text dump only

Built-in Evidence Split View with inline original PDF viewer

Codebase Token Compression

Truncates or blows context limits

Blind character slicing

Python/TS AST Code Skeleton (-55% to -75% tokens) + Full Pack kept

Multi-AI Portability

Single vendor lock-in

Static .txt file

1-Click Markdown/XML Copy · Portable .zip · 9-Tool MCP · CLI


Measured Local Performance (Zero Cloud Dependencies)

Every number below is measured locally on standard CPU hardware using our automated benchmark and chaos test suites — no synthetic estimates:

Workload

Measured Performance

Key Guarantee

50-page encrypted PDF (auto-unlock + 100/100 header/footer strip + 5/5 tables)

53.4 ms

0.0% garbled text · 100% page provenance

100,000-row GB18030 semicolon CSV (streaming ingestion)

36.7 ms

O(1) RAM streaming (500k rows in 189.4 ms)

2,000-block mixed deduplication (8-Band × 2-Hash MinHash-LSH)

178.1 ms

99.0% near-duplicate recall · 0% false positives

Incremental SQLite WAL + FTS5 search & append

1.54 ms search / 0.63 ms append

Thread-safe RLock + busy_timeout=5000 + atomic snapshots

15-thread concurrent chaos stress test

0 failures

9.1 MB peak Python memory

17 corrupted / malformed binary & archive formats

0 crashes

Graceful error reporting + ZIP traversal block

Unrequested cloud file uploads

0 Bytes

Strictly local-first by architecture


Core Capabilities

  • Universal 20+ Format Local Ingest (~95% Real-World Coverage): Drag and drop anywhere on the workspace or press ⌘V / Ctrl+V to ingest PDF, DOCX, XLSX, PPTX, CSV/TSV, JSON/JSONL, XML/YAML, EML/MBOX email archives, EPUB, RTF, batch ZIP (with path-traversal protection), Markdown, HTML, VTT/SRT YouTube transcripts, same-domain websites, and public GitHub repository URLs (respecting .gitignore).

  • Red-Team Local Secret & US PII Redaction: Automatically scrubs OpenAI, Anthropic, GitHub PAT, AWS, Google, Stripe, and Slack keys, JWTs, Postgres/MySQL/MongoDB/Redis connection strings with passwords, .env secret assignments, RSA/OpenSSH private keys, and US Social Security Numbers (XXX-XX-XXXX) before clipboard copy or export — paired with SSRF guards blocking localhost, RFC1918, and obfuscated IPs.

  • 10-Point Extraction Quality Scorecard & Evidence Split View: Inspect extraction health immediately and click any citation to verify it side-by-side against the original uploaded PDF page.

  • Cross-Document Conflict Guard & MinHash-LSH Deduplication: Surfaces numeric and pricing contradictions (e.g., $49/mo vs $59/mo) with timestamps for human triage instead of letting the LLM hallucinate a compromise, while stripping repeated headers, footers, and near-duplicate boilerplate.

  • AST Code Skeleton & 2026 Frontier Token Budgets: Shrink Python and TypeScript repositories by 55–75% while keeping typed signatures and docstrings — always preserving the unmodified Full Source Pack. Calibrated for Claude Sonnet 5.5 (1M), GPT-6.2 Astra / Sol (1M), Gemini 4 Neon (1M), Ollama (8K / 32K), and custom budgets.

  • Visual Pipeline DAG, Folder Watcher & 9-Tool Read-Only MCP Server: Drag to reorder custom processing stages, watch local folders with contextforge watch for live SQLite FTS5 sync, or connect Cursor and Claude Code directly over read-only MCP.

  • 10 Standalone Free Local Tools: Includes dedicated single-purpose utilities for /pdf-to-markdown, /pdf-to-text, /url-to-markdown, /website-to-markdown, /youtube-transcript-generator, /llm-token-counter, /json-formatter, /text-chunker, /docx-to-markdown, and /markdown-to-pdf.


Quick Start (Pick Your Workflow)

Option 1: Zero-Terminal Desktop App (macOS & Windows)

Download the double-click ContextForge-macOS.dmg or ContextForge-Windows.exe from GitHub Releases. Double-clicking starts the local engine in the background and opens the studio in your browser automatically. See docs/desktop-install.md.

Option 2: Run Locally with Python (30 Seconds)

git clone https://github.com/waterdolphinkiller/ai-context-workbench.git
cd ai-context-workbench
pip install -e .

# Launch the local studio (Web UI + FastAPI REST API on http://127.0.0.1:8787)
contextforge serve

Option 3: CLI Automation & Live Folder Watcher

# Create a project calibrated for Claude Sonnet 5.5 (1M)
contextforge init "Q4 Diligence Pack" --profile claude-sonnet-5.5

# Ingest local files, a GitHub repo, or watch a folder for live updates
contextforge add <project_id> ./Annual_Report_2026.pdf
contextforge watch <project_id> ./research-folder

# Check token budget against GPT-6.2 Astra / Sol (1M) & export portable .zip Context Pack
contextforge budget <project_id> --profile gpt-6.2
contextforge export <project_id> --format zip --variant optimized --redact

Option 4: Connect Cursor or Claude Code via 9-Tool Read-Only MCP

Add ContextForge to your MCP client configuration (see docs/mcp-guide.md):

{
  "mcpServers": {
    "contextforge": {
      "command": "contextforge",
      "args": ["mcp", "--db", "/path/to/workbench.db"]
    }
  }
}

Option 5: Docker

docker compose up --build
# Studio available at http://localhost:8787

Frequently Asked Questions (FAQ)


AI-Crawler & Documentation Index (GEO Ready)

ContextForge publishes structured machine-readable documentation for both human engineers and AI search/coding agents:


Architecture & Development

# Run the full 59-test automated suite (parsers, dedup, conflicts, red-team security, 15-thread concurrency, MCP, SEO/GEO)
PYTHONPATH=. python3 -m unittest discover -s tests -v

Licensed under the Apache-2.0 License. Contributions, parser plugins, and exporter extensions are welcome.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Local-first MCP server that extracts structured knowledge from markdown notes into SQLite with full-text search, enabling AI coding tools to retrieve relevant context offline at zero cost.
      3
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Local-first codebase context engine that parses code into a ranked dependency graph and serves it to AI tools via MCP for deep structural understanding.
      5
      12 npm
      2
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A local-first, privacy-first MCP server that passively indexes personal digital activity (screenshots, clipboard, notes, downloads, links) into a local database, enabling LLMs like Claude to access your context without cloud storage.
      4
      1
      MIT