About this project

MCP Context Server is a high-performance Model Context Protocol (MCP) server built with FastMCP that provides persistent multimodal context storage for LLM agents. It enables seamless context sharing across multiple agents working on the same task through thread-based scoping. Key capabilities include: - Multimodal Context Storage: Store and retrieve both text and images with UUIDv7 context identifiers providing time-ordered, globally unique IDs. - Thread-Based Scoping: Agents working on the same task share context through thread IDs, enabling collaborative workflows. - Flexible Metadata Filtering: Store custom structured data with any JSON-serializable fields and filter using 16 powerful operators, including date range filtering and tag-based organization. - Summary Generation: Optional automatic LLM-based summarization returned alongside truncated text content in search results for better agent context efficiency (enabled by default with Ollama). - Full-Text Search: Linguistic search with stemming, ranking, and boolean queries using FTS5 (SQLite) or tsvector (PostgreSQL), auto-enabled by default. - Semantic Search: Vector similarity search for meaning-based retrieval with cross-encoder reranking, auto-enabled when an embedding provider is available. - Hybrid Search: Combined FTS + semantic search using Reciprocal Rank Fusion (RRF) with cross-encoder reranking. - Server-Side Grep: Literal/regex pattern matching over stored records with ripgrep-style output modes. - Record Navigation: On-demand Markdown-heading table of contents per record with optional per-node LLM summaries. - Partial Reads: Extract slices of records by character range, line range, or outline node ID. - Cross-Encoder Reranking: Automatic result refinement using FlashRank cross-encoder models. - Embedding Compression: Reduces embedding storage by approximately 8x using bit-packed compressed vectors. - Multiple Database Backends: SQLite (default, zero-config) or PostgreSQL (high-concurrency, production-grade). - MCP Standard Compliance: Works with Claude Code, LangGraph, and any MCP-compatible client. The server exposes 16 MCP tools for context management, including core operations (store, search, get, delete, update), search tools (semantic, FTS, hybrid), navigation tools (grep, navigate, read range), and batch operations. Configuration is fully environment-variable driven, supporting core settings, transport, authentication, embedding providers, summary generation, search features, and database tuning. Docker Compose and Kubernetes Helm chart deployments are available for production use. The project is licensed under the Elastic License 2.0 (ELv2), which permits free use, modification, and distribution for personal and commercial projects, but prohibits providing the software as a hosted or managed service to third parties without a commercial agreement.