CanonBase
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.

大罗洞观 / CanonBase
SQLite-backed knowledge base, causal impact graph, and FastMCP gateway for multi-agent teams that cannot afford silent overwrites or accidental leaks.
简体中文 · English · Quickstart · Architecture · Relay Deploy · Releases
Why this exists
Team knowledge bases rot fast in loose Markdown folders, spreadsheets, and PDFs. One Agent reads too much context and misses a boundary rule; another edits a pricing figure without knowing which clauses or contracts depend on it; a third writes a customer-facing draft that accidentally leaks internal margins or hallucinates a policy it had no permission to read.
CanonBase (大罗洞观) turns one local SQLite (WAL + FTS5) file per project into a governed, Agent-native FastMCP Streamable HTTP engine. It needs no vector database or cloud lock-in, runs natively on Windows/Linux/macOS via Python 3.13 + uv, and keeps external asset folders strictly read-only.
Related MCP server: io.github.cunicopia-dev/knowledge-graph-rdbms
What you get
Failure mode | What CanonBase provides |
Agents burning context by reading whole folders | Char-budgeted |
Changing one figure and breaking downstream docs | Mandatory |
Mixing internal secrets with public drafts, or Agents hallucinating hidden rules | Inline |
Soft linter warnings that still ship forbidden wording | Declarative YAML hard-block Linter enforced on write and via |
Parallel Agents overwriting each other silently | Per-project async write lock, |
Exposing admin write endpoints when serving remote staff | Default-ON |
Primary desktop not online 24/7 for remote readers | Dual-mode |
Non-technical staff & strict remote MCP clients (WorkBuddy / Codex / Gemini App) | 18 KB zero-Python native Windows |
Architecture & isolation flow
flowchart LR
L[Local Agents<br/>Antigravity / Codex / Gemini CLI] -->|stdio-bridge / loopback HTTP| GW
R[Remote Read-Only Agents<br/>WireGuard /32] -->|VPS Nginx + remote-relay header| GW
GW[FastMCP Gateway<br/>127.0.0.1:18765] -->|Bearer SHA-256 + RBAC + Rate Limit| RT[ProjectRuntime<br/>Per-Project AsyncLock]
RT --> DB[(SQLite WAL + FTS5<br/>8 cb_* tables + optional plugin)]
RT --> LINT[YAML Hard-Block Linter<br/>& Inline Redaction]
RT --> WEB[Offline Static Web<br/>& UTF-8 ZIP Compiler]Protocol-level RBAC: Read-only tokens never even see write tools in
tools/list; direct attempts returnTOOL_FORBIDDEN, and cross-project calls return403 PROJECT_MISMATCH.Read-only controlled assets: Pure-Python (
python-docx,openpyxl,pymupdf) incremental SHA-256 text mirrors withfrozen=1tamper locks.Hot backups: SQLite Online Backup API + isolated
manifest.sha256&PRAGMA integrity_checkverification without blocking WAL reads/writes.
Try the Demo KB in 60 seconds
git clone https://github.com/WeiBeta/CanonBase-public.git
cd CanonBase-public
uv sync --dev
# 1. Seed the Starport Ops Demo KB (`demo`) & build 3 role-isolated offline static sites
uv run python examples/demo-kb/seed_demo.py
# 2. Verify code style and standalone test suite
uv run ruff check .
uv run pytest -v
# 3. Generate a local Bearer token & launch the FastMCP gateway
uv run canonbase token-gen --prefix cb_demo
# Copy configs/policies/tokens.example.yaml -> configs/policies/tokens.local.yaml and paste token_sha256
uv run canonbase serve --host 127.0.0.1 --port 18765Open dist/web/demo-public/index.html beside dist/web/demo-admin_full/index.html in any browser to see inline redaction stripping and anti-hallucination STUB rendering side by side. See docs/QUICKSTART.md for full harness registration.
18 built-in MCP tools
Category | Tools |
Discovery & Read |
|
Controlled Assets |
|
Compliance Gate |
|
Governed Writes |
|
Async Handoff |
|
Repository layout
Path | Contents |
Core engine (SQLite WAL + FTS5, patch/redaction/backup/assets), YAML linter, FastMCP gateway, | |
Per-project YAML config ( | |
RBAC role tool whitelists, declarative YAML linter rules, and Bearer token hash template | |
Antigravity, Codex CLI, Gemini CLI, and remote client templates + 5-step copywriting skill | |
Windows persistent daemon, daily Online Backup, firewall, Caddy TLS, WireGuard | |
Zero-dependency C# source & build script for the ~18 KB native Windows | |
Turnkey Starport Ops Demo KB seed script and read-only sample assets | |
Standalone storage, rollback, RBAC/linter, 10-way concurrency, backup, and Demo E2E tests |
Public edition and contributing
CanonBase-public is generated deterministically from a frozen commit of the private source repository with its own manifest (PUBLIC-MANIFEST.json) and zero private Git history. Private deployments, business data, operational logs, and credentials never enter this repository.
Issues and pull requests are welcome with a minimal sanitized reproduction and test coverage (uv run ruff check . && uv run pytest -v).
License
Licensed under GNU Affero General Public License v3.0 only (AGPL-3.0-only).
The cover image (assets/hero.jpg) is a conceptual illustration generated for this project; it is not a product screenshot or performance evidence.
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
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Agent-native notes, tasks, dev-docs, vaults, sync & handoffs. MCP + OpenAPI dual surface.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server for managing and searching multi-tenant knowledge bases backed by SQLite with FTS5, enabling AI agents to persist and retrieve content via full-text search.132MIT
- AlicenseNot gradedqualityDmaintenanceAn embedded knowledge graph in one SQLite file, exposing a MCP server for agents to read and write entities and relationships with full audit trail and time travel.37 PyPI1MIT
- AlicenseNot gradedqualityBmaintenanceMCP server that gives AI coding agents a git-backed markdown wiki to read and update, enabling search, read, write, verify, ingest, promote, and lint operations on versioned knowledge documents with schema validation, staleness tracking, and contradiction detection.4MIT
- FlicenseNot gradedqualityDmaintenanceProvides structured search, schema-validated writes, and linting for a markdown knowledge base, enabling agents to operate the wiki over a single streamable-HTTP MCP endpoint.1-