ContextForge
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
title: ContextForge emoji: 🐢 colorFrom: yellow colorTo: blue sdk: gradio sdk_version: 6.26.0 python_version: '3.12' app_file: app.py pinned: false license: apache-2.0 short_description: Shared project memory for Claude and Codex agents.
ContextForge
Tenant-isolated MCP project memory for Claude and Codex agents.
ContextForge is a Python and Gradio MCP server that enables compatible AI hosts to store, search, and exchange architectural decisions, implementation notes, and structured work packets. It runs locally or on Hugging Face Spaces without requiring Docker.
Related MCP server: codebase-wiki
Live demo
Application: https://huggingface.co/spaces/kkishor191/ContextForge
MCP endpoint: https://kkishor191-contextforge.hf.space/gradio_api/mcp/
Example prompt:
Use ContextForge to record an architectural decision titled “Use SQLite for the MVP,” including the rationale and Codex as the source.
The hosted Space currently demonstrates the original shared-memory schema (v1). This repository contains the newer tenant-isolated schema (v2), which must be deployed and verified before tenant isolation is described as active in the live demo.
Why it exists
AI coding sessions often lose important decisions when a conversation ends or work moves between hosts. ContextForge gives Claude, Codex, and other MCP clients a shared source of durable project knowledge.
Claude / Codex
│ Streamable HTTP MCP
▼
ContextForge (Gradio)
│ trusted tenant context
▼
SQLite project memoryMCP tools
record_decision,list_decisions, andsearch_projectcreate_work_packetandget_work_packetrecord_implementationandupdate_record_statusproject_summary,health_check, andbackup_database
Persistence modes
Self-hosted: local SQLite, an implicit
localtenant, and no API key.Hosted: shared SQLite with API-key authentication and tenant-scoped data.
Hosted keys use cf_live_<key-id>_<secret>. ContextForge stores only an
HMAC-SHA256 digest and resolves the tenant internally. MCP tools never accept a
caller-controlled tenant_id.
Run locally
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python app.pyConnect Claude or Codex to:
http://localhost:7860/gradio_api/mcp/Then try:
Use ContextForge to record our decision to use SQLite for the MVP.
Search ContextForge for decisions about persistence and summarize them.
Create a work packet for migrating the storage adapter to PostgreSQL.See CONNECTING.md for client and hosted-authentication examples.
Hosted configuration
Mount durable storage at /data and configure:
CONTEXTFORGE_STORAGE_MODE=hosted
CONTEXTFORGE_DB=/data/contextforge.db
CONTEXTFORGE_BACKUP_DIR=/data/backups
CONTEXTFORGE_KEY_PEPPER=<secure-random-secret>Provision consumers with:
python admin.py create-tenant --name "Acme"
python admin.py issue-key --tenant-id "TENANT_UUID"
python admin.py revoke-key --key-id "KEY_ID"Engineering highlights
Native Gradio Streamable HTTP MCP server
SQLite WAL mode, busy timeout, and bounded write retries
Automatic schema migration and integrity-checked backups
Structured, redacted errors with incident IDs
Tenant-scoped record operations and revocable API keys
Input-size and query-complexity limits
Compatibility with a Docker-free Hugging Face Space
SQLite tenancy is application-enforced and intended for a single-instance MVP. PostgreSQL is the recommended next step for multiple replicas or sustained write concurrency.
Test
python -m unittest discover -s tests -vThe suite covers record lifecycles, migration, backups, concurrent writes, lock contention, validation, API-key authentication and revocation, MCP schema discovery, and cross-tenant access denial.
Stack
Python · Gradio · Model Context Protocol · SQLite · Hugging Face Spaces
See OPERATIONS.md for monitoring, recovery, capacity, and security guidance.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared project docs, task planning and GitHub evidence for people and their AI agents.
Shared project context for AI agents and teams: docs, tasks, and messages that stay current.
Project memory, documentation and controlled secret access for AI coding agents.
Shared, permission-aware company context for AI agents, with provenance, approvals and audit.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides persistent, searchable memory and knowledge capture for AI-assisted development, enabling agents to retain decisions, bugs, and patterns across sessions and projects.265 PyPIMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to index, search, and retrieve architectural documentation and store self-learning notes from codebases.1MIT
- AlicenseCqualityBmaintenanceEnables engineering agents to maintain persistent knowledge across sessions by storing decisions, invariants, gotchas, and rejected ideas, with staleness detection, conflict detection, full-text search, and structured context assembly.622MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to persist and retrieve durable project knowledge across coding sessions, capturing decisions, conventions, lessons and reusable skills through ordinary chat requests. It supports searching, editing and reviewing saved items, and promoting local notes into Git-shareable versioned knowledge alongside repository changes.29 npm3MIT