Copilot Memory MCP
Persistent semantic memory for AI agents using local ChromaDB vector search. No cloud required.
Ask AI about Copilot Memory MCP
Powered by Claude Β· Grounded in docs
I know everything about Copilot Memory MCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
copilot-memory-mcp
Persistent semantic memory for GitHub Copilot in VS Code.
A local MCP server that gives Copilot durable, project-scoped memory across sessions. Memories are stored in an embedded ChromaDB vector database with all-MiniLM-L6-v2 embeddings, enabling semantic retrieval (RAG). Everything runs in a single Docker container β no cloud services required.
Why this exists
Copilot starts every session with a blank slate. This MCP server gives it a persistent, searchable knowledge base so decisions, conventions, and context carry over between sessions β all running locally in Docker.
Quick start
docker compose up -d
The server starts on http://localhost:8000/sse.
The .vscode/mcp.json already points Copilot at the server β no further VS Code configuration needed.
A sample config is provided in examples/vscode/mcp.json. Copy it to your project's .vscode/mcp.json.
MCP tools
| Tool | Description |
|---|---|
create_memory | Store a new memory with title, content, optional project scope and tags |
search_memories | Semantic vector search; filter by project and/or tags |
update_memory | Update an existing memory by ID; re-embeds on change |
delete_memory | Permanently delete a memory by ID |
list_memories | Browse memories with pagination (lightweight, no content) |
Copilot instructions & agents (examples)
Ready-to-use examples are in examples/. Copy the relevant file(s) into the root or .github/ of your own project.
| File | Consumed by |
|---|---|
AGENTS.md | OpenAI Codex, Claude Code, and most agent runtimes |
CLAUDE.md | Claude Code (claude CLI) |
.cursorrules | Cursor (legacy format, project-root) |
.cursor/rules/memory-tools.mdc | Cursor (modern per-rule format) |
.github/copilot-instructions.md | GitHub Copilot in VS Code |
.github/prompts/save-memory.prompt.md | VS Code /save-memory prompt |
.github/prompts/recall-memory.prompt.md | VS Code /recall-memory prompt |
.github/agents/memory.md | VS Code @memory custom agent mode |
Architecture
VS Code / Copilot
β MCP HTTP/SSE (port 8000)
βΌ
βββββββββββββββββββββββββββββββββββ
β Docker Container β
β β
β FastMCP Server (port 8000) β
β βββ 5 MCP tools β
β β
β sentence-transformers β
β βββ all-MiniLM-L6-v2 β
β (384-dim embeddings) β
β β
β ChromaDB (embedded) β
β βββ collection "memories" β
ββββββββββββ¬βββββββββββββββββββββββ
β Docker named volume
βΌ
/data/chroma (persisted DB)
Project layout
copilot-memory-mcp/
βββ app/
β βββ main.py # FastMCP server, tool registration
β βββ memory_store.py # ChromaDB wrapper (CRUD + search)
β βββ embeddings.py # sentence-transformers loader + encode()
β βββ tools/
β βββ create_memory.py
β βββ search_memories.py
β βββ update_memory.py
β βββ delete_memory.py
β βββ list_memories.py
βββ tests/
β βββ test_memory_store.py
β βββ test_tools.py
βββ Dockerfile
βββ docker-compose.yml
βββ pyproject.toml
Development
Install dependencies
pip install -e ".[dev]"
Run tests
pytest
Tests use an ephemeral in-memory ChromaDB and a mocked embedding function β no Docker, no model download required.
Run the server locally (no Docker)
pip install -e .
PYTHONPATH=. python app/main.py
Environment variables
| Variable | Default | Description |
|---|---|---|
SENTENCE_TRANSFORMERS_HOME | /app/models | Model cache directory |
CHROMA_PATH | /data/chroma | ChromaDB persistence path |
PORT | 8000 | HTTP server port |
Copy .env.example to .env and adjust if needed.
License
MIT β see LICENSE.
