MCP Hub
Back to servers

context-matters

Structured context store for AI agents - MCP server with SQLite backend

npm617/wk
Updated
Mar 18, 2026

Quick Install

npx -y context-matters

context-matters

Structured context store for AI agents. SQLite-backed, scoped, searchable.

Agents accumulate knowledge during sessions: decisions made, feedback received, patterns discovered, lessons learned. Without persistence, every session starts from zero. context-matters gives agents a place to store and retrieve that knowledge across sessions, projects, and scopes.

Install

npx context-matters serve    # MCP server on stdio

Or build from source:

cargo install --path crates/cm-cli

MCP server

Runs as a Model Context Protocol server. Nine tools, all prefixed cx_*.

cm serve
ToolPurpose
cx_recallSearch and retrieve context relevant to the current task
cx_storePersist a fact, decision, preference, or lesson
cx_depositBatch-store conversation exchanges for continuity
cx_browseList entries with filters and cursor pagination
cx_getFetch full content for specific entry IDs
cx_updatePartially update an existing entry
cx_forgetSoft-delete entries no longer relevant
cx_statsStore statistics and scope breakdown
cx_exportExport entries as JSON for backup

Scope model

Context is hierarchical. Broader scopes are visible at narrower scopes.

global                                        cross-project knowledge
global/project:helioy                         project-level decisions
global/project:helioy/repo:fmm               codebase-specific facts
global/project:helioy/repo:fmm/session:abc   ephemeral task context

Architecture

Three crates, clean separation:

CrateWhat it does
cm-coreDomain types, ContextStore trait, query construction. Zero I/O.
cm-storeSQLite adapter via sqlx. WAL mode, FTS5 search, BLAKE3 dedup.
cm-cliCLI binary + MCP server. Tool docs generated from tools.toml.

Development

Rust 2024 edition. just as task runner.

just check    # fmt + clippy (warnings = errors)
just build    # cargo build --workspace
just test     # 161 tests
just fmt      # rustfmt

License

MIT

Reviews

No reviews yet

Sign in to write a review