Labsco
MCP SERVER

Context MCP Server

by alex-feel

Store text and images that several agents on the same task can all read, then find a record by keyword, by meaning, by both at once, or by grep — and read only the section you need.

Agent MemoryVerified
Summary
Four retrieval modes, because 'find the record' is four different questions.

Most context stores pick one — keyword or vector — and make you live with its failure mode. Here full-text, semantic, hybrid and grep coexist and register themselves based on what is actually available, so a precise identifier lookup goes to grep and a vague recollection goes to semantic search. The navigation pair matters just as much on long records: build a heading outline, then read one section rather than pulling the whole entry into context. Thread-based scoping is the reason to reach for this over a single-agent memory file — several agents on one task read and write the same thread.

What it is

A persistent multimodal context store for LLM agents, built on FastMCP. Entries are scoped by thread ID so several agents working on one task share the same context, and each carries a UUIDv7 identifier that sorts by time. It runs on SQLite with no configuration, or on PostgreSQL when several people are writing at once.

What you get
  • Core storage over 16 tools: store an entry, search, fetch by ID, update, delete, list the threads in play, and read overall statistics (store_context, search_context, get_context_by_ids, update_context, delete_context, list_threads, get_statistics).
  • Three ways to search, each registering automatically when its backing capability is present: linguistic full-text with stemming, ranking and boolean queries; vector similarity for meaning-based retrieval; and a hybrid of the two combined by Reciprocal Rank Fusion — all with cross-encoder reranking on top (fts_search_context, semantic_search_context, hybrid_search_context).
  • A locate-navigate-extract path for long records: line-oriented literal or regex matching with ripgrep-style output, an on-demand Markdown table of contents per record, and a partial read that returns one slice by character range, line range or outline node (grep_context, navigate_context, read_context_range).
  • Batch versions of the write operations, for when an agent is recording many entries at once (store_context_batch, update_context_batch, delete_context_batch).
  • Optional LLM summaries returned in a summary field alongside truncated text in every search result, so an agent can judge relevance without fetching the full entry.
  • Metadata filtering over any JSON-serializable fields using 16 operators and nested paths, plus normalised indexed tags and creation-timestamp range filters.
Requirements

Nothing beyond the server itself to start: SQLite is the default backend and needs no configuration, and a one-command Docker bootstrap is the fastest route in. Everything else is environment variables — STORAGE_BACKEND switches to PostgreSQL, the search features default to auto and register themselves when their dependencies exist, and semantic search needs an embedding provider such as Ollama, OpenAI, Azure, HuggingFace or Voyage. HTTP transport deployments take a bearer token. Upgrading from a v2.x database is not automatic: v3.x uses UUIDv7 primary keys and the shipped `mcp-context-server-migrate` CLI has to run first. Licensed under Elastic License 2.0 from v3.0.0, which permits use and modification but not offering it to third parties as a hosted service.

Setup effort

One command — uvx mcp-context-server