Provides persistent multimodal context storage that multiple LLM agents can share through thread-based scoping. You get 13 tools including store_context, search_context, and update_context for managing text and images with metadata filtering, tag-based organization, and date range queries. The real power is in the optional search capabilities: semantic search with embeddings from Ollama, OpenAI, or HuggingFace, full-text search with stemming and boolean queries, or hybrid search combining both with reciprocal rank fusion. Includes automatic LLM-based summarization for search results and cross-encoder reranking for precision. Runs on SQLite by default or PostgreSQL for high-concurrency deployments. Reach for this when you need agents to build and query shared context across conversations without losing state.
A high-performance Model Context Protocol (MCP) server providing persistent multimodal context storage for LLM agents. Built with FastMCP, this server enables seamless context sharing across multiple agents working on the same task through thread-based scoping.
text_content in all search tool results for better agent context efficiency (enabled by default with Ollama)The fastest way to connect the MCP Context Server to Claude Code is the one-command Docker bootstrap.
For step-by-step instructions, prerequisites, troubleshooting, and update/uninstall commands, see the Connecting to Your AI Assistant Guide.
The server is fully configured via environment variables, supporting core settings, transport, authentication, embedding providers, summary generation, search features, database tuning, and more. Variables can be set in your MCP client configuration, in a .env file, or directly in the shell.
For the complete reference of all environment variables with types, defaults, constraints, and descriptions, see the Environment Variables Reference.
Summary generation automatically creates concise LLM-based summaries for each stored context entry. Summaries are returned in the summary field of all search tool results alongside truncated text_content, providing dense, informative summaries that help agents determine relevance without fetching full entries.
For detailed instructions including all providers (Ollama, OpenAI, Anthropic), model selection, and custom prompt configuration, see the Summary Generation Guide.
For detailed instructions on enabling optional semantic search with multiple embedding providers (Ollama, OpenAI, Azure, HuggingFace, Voyage), see the Semantic Search Guide.
For full-text search with linguistic processing, stemming, ranking, and boolean queries, see the Full-Text Search Guide.
For combined FTS + semantic search using Reciprocal Rank Fusion (RRF), see the Hybrid Search Guide.
For comprehensive metadata filtering including 16 operators, nested JSON paths, and performance optimization, see the Metadata Guide.
The server supports multiple database backends, selectable via the STORAGE_BACKEND environment variable. SQLite (default) provides zero-configuration local storage perfect for single-user deployments. PostgreSQL offers high-performance capabilities with 10x+ write throughput for multi-user and high-traffic deployments.
For detailed configuration instructions including PostgreSQL setup with Docker, Supabase integration, connection methods, and troubleshooting, see the Database Backends Guide.
The MCP Context Server exposes 13 MCP tools for context management:
Core Operations: store_context, search_context, get_context_by_ids, delete_context, update_context, list_threads, get_statistics
Search Tools: semantic_search_context, fts_search_context, hybrid_search_context
Batch Operations: store_context_batch, update_context_batch, delete_context_batch
For complete tool documentation including parameters, return values, filtering options, and examples, see the API Reference.
For production deployments with HTTP transport and container orchestration, Docker Compose configurations are available for SQLite, PostgreSQL, and external PostgreSQL (Supabase). See the Docker Deployment Guide for setup instructions and client connection details.
For Kubernetes deployments, a Helm chart is provided with configurable values for different environments. See the Helm Deployment Guide for installation instructions, or the Kubernetes Deployment Guide for general Kubernetes concepts.
For HTTP transport deployments requiring authentication, see the Authentication Guide for bearer token configuration.
LOG_LEVELLog level
STORAGE_BACKENDStorage backend type: sqlite (default) or postgresql
MAX_IMAGE_SIZE_MBMaximum individual image size in megabytes
MAX_TOTAL_SIZE_MBMaximum total request size in megabytes
DB_PATHCustom database file location path
POOL_MAX_READERSMaximum number of concurrent read connections in the pool
POOL_MAX_WRITERSMaximum number of concurrent write connections in the pool
POOL_CONNECTION_TIMEOUT_SConnection timeout in seconds
POOL_IDLE_TIMEOUT_SIdle connection timeout in seconds
POOL_HEALTH_CHECK_INTERVAL_SConnection health check interval in seconds
RETRY_MAX_RETRIESMaximum number of retry attempts for failed operations
RETRY_BASE_DELAY_SBase delay in seconds between retry attempts
RETRY_MAX_DELAY_SMaximum delay in seconds between retry attempts
RETRY_JITTEREnable random jitter in retry delays
RETRY_BACKOFF_FACTORExponential backoff multiplication factor for retries
SQLITE_FOREIGN_KEYSEnable SQLite foreign key constraints
SQLITE_JOURNAL_MODESQLite journal mode (e.g., WAL, DELETE)
SQLITE_SYNCHRONOUSSQLite synchronous mode (e.g., NORMAL, FULL, OFF)
SQLITE_TEMP_STORESQLite temporary storage location (e.g., MEMORY, FILE)
SQLITE_MMAP_SIZESQLite memory-mapped I/O size in bytes
SQLITE_CACHE_SIZESQLite cache size (negative value for KB, positive for pages)
SQLITE_PAGE_SIZESQLite page size in bytes
SQLITE_WAL_AUTOCHECKPOINTSQLite WAL autocheckpoint threshold in pages
SQLITE_BUSY_TIMEOUT_MSSQLite busy timeout in milliseconds
io.github.ericm1018/skillfm-llm-cost-optimizer-openai-anthropic-usage
io.github.mikerawsonnz/llm-orchestration-agent
io.github.mikerawsonnz/authenticated-llm-agent
labforgedev/copilot-memory-mcp
csoai-org/agent-prompt-injection-firewall-mcp
io.github.mikerawsonnz/authenticated-multi-llm-agent