Give your coding
agents memory
that compounds.
MCP Context Server turns AI coding agents from amnesiacs into collaborators with a persistent, searchable, shared memory. Every session, every decision, every past solution — accumulating, cross-linked, instantly retrievable — across agents, projects, and context compactions.
Context compaction shouldn’t cost you an afternoon.
Your agent had a plan. The window compacted. Now it’s asking what you were working on. Sound familiar?
Refactor, forgotten.
Agent builds a rich plan, starts executing, hits compaction. Plan evaporates. You spend the next five minutes re-explaining, re-pasting, re-hoping.
Refactor, continuous.
The agent stores its own plan in a persistent thread. After compaction it reads it back — instantly — and keeps executing. The plan lives outside the window.
From scratch pad to compounding knowledge base.
Keep agents on track across compactions.
Plan once, persist it, resume forever. The agent retrieves its own roadmap after every context reset and picks up exactly where it left off.
Lossless multi-agent handoffs.
Orchestrator points subagent at a thread; subagent reads the full original. No telephone-game summaries. Nothing compressed at the boundary.
Debug with full history.
Two weeks later, the agent can replay why a decision was made — original request, research, tradeoffs.
Cross-project knowledge base.
A pattern solved in project A is available to agents in project B — automatically searchable across your whole workflow.
Dedicated task threads.
Spin up a tasks or knowledge-base thread. Agents read and write there — a structured store that fits your workflow.
“Just remember this.” — a persistent scratch pad that never forgets and is always searchable.
Meeting notes, architecture decisions, review findings, requirements. Store now, retrieve later — same session, next session, different project.
One command. Three platforms. Zero config.
Downloads a Docker Compose stack (Postgres + pgvector, Ollama, MCP Context Server), starts it, and fully configures Claude Code — hooks, skills, rules included.
CLAUDE_CODE_TOOLBOX_ENV_CONFIG='https://raw.githubusercontent.com/alex-feel/mcp-context-server/refs/heads/main/agents/claude-code/environment-docker-ollama.yaml' \ CLAUDE_CODE_TOOLBOX_SKIP_INSTALL='1' \ bash -c "$(curl -fsSL https://raw.githubusercontent.com/alex-feel/claude-code-toolbox/main/scripts/macos/setup-environment.sh)"
Run the one-liner
Pulls ~1.2 GB of Ollama models on first start. Everything else is handled.
Claude Code auto-configured
Hooks, skills and rules are wired so agents learn when to store and when to retrieve. No manual setup.
Prefer another path?
Other MCP clients: Point Cursor, Codex, or
LangChain at http://localhost:8000/mcp
PyPI:
pip install mcp-context-server
Backends: SQLite (zero-config) or PostgreSQL
Deploy: Docker Compose · Kubernetes
· Helm
Full documentation ↗
Built for real workflows, not just demos.
A thoughtful stack: FastMCP, thread-scoped storage, pluggable everything.
Full-text, semantic, hybrid.
Stemming, ranking, boolean queries; pgvector similarity; Reciprocal Rank Fusion when you want both — plus cross-encoder reranking on top.
16 metadata operators.
Filter by nested JSON paths, tags, date ranges, and indexed fields. GIN indexes on array/object metadata for speed.
SQLite or PostgreSQL.
Zero-config for solo work; 10× write throughput with Postgres for teams. Same API, swap with one env var.
5 providers, one config.
Ollama (local, default), OpenAI, Azure, HuggingFace, Voyage.
LLM-generated, source-aware.
Every stored entry gets a concise summary via Ollama, OpenAI, or Anthropic.
From laptop to cluster.
Docker Compose for local; Helm chart for Kubernetes; bearer for HTTP transport auth.
Chunking, reranking, indexing.
Long docs chunked for semantic search. Results over-fetched, then reranked with ms-marco-MiniLM for precision.
A small, sharp toolbox your agent actually uses.
Persist a text or multimodal entry to a thread.
Browse and filter entries by thread, metadata, tags, dates.
Retrieve full, untruncated entries by ID.
Patch text, metadata, tags, or images in place.
Remove stale or superseded entries.
Enumerate threads with entry counts and timestamps.
Server health, feature status, and usage metrics.
Stemming, ranking, boolean queries, cross-encoder rerank.
Vector similarity with cross-encoder rerank.
FTS + semantic fused with RRF, cross-encoder rerank.
Literal or regex match across entries, ripgrep-style output.
Outline an entry by its Markdown headings, summaries optional.
Read one slice: char range, line range, or outline node.
Persist many entries in one call.
Bulk patches across entries.
Multi-criteria bulk deletion (IDs, threads, age).
Works with anything that speaks MCP.
Point any MCP-compatible client at http://localhost:8000/mcp. No lock-in, no custom protocol.
Stop re-explaining. Start compounding.
The project is source-available under the Elastic License 2.0 — free to run, modify, and self-host, including commercially; offering it to third parties as a hosted service is the one case that needs a commercial agreement. Star it, open an issue, build on it — or just run the command and feel the difference on your next coding session.