Skip to main content
Glama

Lemon Ledger

Model-agnostic persistent memory and context ledger for AI coding agents, built for Cloudflare Edge.

Website: lemonledger.dev | Plan: Architecture & 4-Milestone Roadmap | License: Dual-licensed under Apache-2.0 or MIT

Status: Clean-Room Public Release in Progress (v0.1 Scaffolding Next)

Lemon Ledger is currently being built as a clean-room, modular, model-agnostic public release. Core modules, declarative tenant configuration, multi-client setup guides, and evaluation suites are rolling out across four structured milestones (v0.1 to v0.4). Watch or star this repository to follow the initial v0.1 launch.

High-Level Capabilities

Lemon Ledger provides a self-hosted Model Context Protocol (MCP) memory ledger running on Cloudflare Workers and Durable Objects, engineered for single-tenant data sovereignty, zero LLM vendor lock-in, and minimal operational overhead.

  • Model-Agnostic Multi-Agent Continuity: Speaks standard Streamable HTTP MCP so coding assistants, IDE agents, and CLI tools (such as Claude, Cursor, Windsurf, Gemini, Codex, and OpenCode) share one persistent context layer. Includes a pluggable server-side LLM adapter (Cloudflare Workers AI by default, plus OpenAI-compatible and Anthropic providers).

  • Single-Tenant Edge Retrieval Engine: Co-locates Durable Object SQLite + FTS5 (BM25), Cloudflare Vectorize (bge-m3), 1 to 2-hop Knowledge Graph traversal, Reciprocal Rank Fusion (RRF), Stage-2 cross-encoder reranking, and a token-budgeted U-shaped <ledger_context> compiler in one isolated tenant footprint.

  • Active Memory Governance & Auditability: Combines 12 MCP tools, immutable Architectural Decision Records (ADRs), nocturnal sleep-cycle consolidation, semantic contradiction triage, outcome and evidence validation, before/after mutation diffs with rollback, and a 4-tab Cognitive Dashboard.

  • Modular Opt-In Extensions: Keeps the default deployment fast and minimal while supporting opt-in Cloudflare Queues (with automatic synchronous fallback for heavy reindexing), an OAuth 2.1 / OIDC connector module for web clients, and a hybrid cloud-to-LAN federation module.

Related MCP server: contextos-memory

4-Milestone Rollout

See docs/ROADMAP.md for the full module layout and detailed specification.

  • Bootstrap: Brand (Lemon Ledger), domain (lemonledger.dev), dual Apache-2.0 / MIT license, and clean-room repository initialization

  • v0.1 Core Cognitive Engine: LemonLedgerDO (SQLite FTS5 + Vectorize bge-m3 + 1 to 2-hop KG + RRF + Cross-Encoder Reranker + <ledger_context>), all 12 MCP tools, contradiction triage, outcomes/validations, mutation diffs with rollback, nocturnal consolidation, pluggable LLM adapter, opt-in Queues (with sync fallback), synthetic evals, and multi-LLM setup guides

  • v0.2 Cognitive Dashboard Module: Modular 4-tab Cognitive Dashboard with dynamic client discovery and interactive triage, validation, and rollback views

  • v0.3 OAuth 2.1 / OIDC Connector Module: Opt-in OAuth 2.1 + PKCE and generic OIDC authentication module with multi-client redirect presets

  • v0.4 Hybrid Cloud-to-LAN Federation Module: Opt-in Tier-2 archive federation and generic local Markdown / vector sync template

License

Lemon Ledger is dual-licensed under either of the following, at your option:

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
      A
      quality
      D
      maintenance
      A persistent, event-sourced knowledge graph MCP server for AI coding agents that enables semantic search, tiered context retrieval, and git-based version control of AI memory.
      31
      210 PyPI
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides a self-hosted shared memory ledger that lets coding agents store, search, list, and forget memories over MCP, with local SQLite or remote HTTP access, secret filtering, and optional synchronization between nodes.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding agents and assistants to share a local-first, token-efficient persistent memory layer across MCP-compatible runtimes, storing typed project facts, decisions, failures, and solutions with temporal validity. It supports offline use and Postgres-compatible storage, so agents can retrieve relevant context without re-embedding entire repositories.
      Apache 2.0