copilot-memory-mcp
copilot-memory-mcp
GitHub Copilot 在 VS Code 中的持久化语义记忆。
一个本地 MCP 服务器,为 Copilot 提供跨会话的持久化、项目级记忆。记忆存储在内嵌的 ChromaDB 向量数据库中,使用 all-MiniLM-L6-v2 嵌入,支持语义检索(RAG)。一切都在单个 Docker 容器中运行——无需云服务。
为什么存在
Copilot 每次会话都从空白开始。这个 MCP 服务器为其提供了一个持久、可搜索的知识库,使决策、约定和上下文能够在会话之间延续——全部在本地 Docker 中运行。
Related MCP server: AIVectorMemory
快速开始
docker compose up -d服务器启动于 http://localhost:8000/sse。
.vscode/mcp.json 已将 Copilot 指向服务器——无需进一步配置 VS Code。
示例配置见 examples/vscode/mcp.json。将其复制到项目的 .vscode/mcp.json。
MCP 工具
工具 | 描述 |
| 存储新记忆,包含标题、内容、可选的项目范围和标签 |
| 语义向量搜索;可按项目和/或标签过滤 |
| 按 ID 更新现有记忆;更改时重新嵌入 |
| 按 ID 永久删除记忆 |
| 分页浏览记忆(轻量级,不含内容) |
Copilot 指令与代理(示例)
现成示例位于 examples/。将相关文件复制到您项目的根目录或 .github/ 中。
文件 | 使用者 |
OpenAI Codex、Claude Code 及大多数代理运行时 | |
Claude Code( | |
Cursor(旧格式,项目根目录) | |
Cursor(现代逐规则格式) | |
VS Code 中的 GitHub Copilot | |
VS Code | |
VS Code | |
VS Code |
架构
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)项目结构
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开发
安装依赖
pip install -e ".[dev]"运行测试
pytest测试使用临时的内存 ChromaDB 和模拟的嵌入函数——无需 Docker,无需下载模型。
本地运行服务器(无需 Docker)
pip install -e .
PYTHONPATH=. python app/main.py环境变量
变量 | 默认值 | 描述 |
|
| 模型缓存目录 |
|
| ChromaDB 持久化路径 |
|
| HTTP 服务器端口 |
将 .env.example 复制为 .env,如有需要可进行调整。
许可证
MIT——见 LICENSE。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceLocal MCP server that provides semantic search (RAG) over code repositories, enabling AI clients like Claude and Gemini to access project context without manual re-upload.
- AlicenseBqualityBmaintenanceMCP server that provides cross-session persistent memory for AI coding assistants using local vector database and semantic search, enabling automatic recall of project context, issues, and tasks.991Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA local MCP server that provides semantic memory storage and retrieval for coding and AI agents, enabling durable context across chat sessions.1314
- AlicenseAqualityDmaintenanceMCP server for semantic code indexing using vector embeddings, enabling AI agents to maintain persistent memory of codebases through natural language queries and intelligent chunking.19764MIT
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Cloud-hosted MCP server for durable AI memory
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LabForgeDev/copilot-memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server