copilot-memory-mcp
copilot-memory-mcp
VS Code の GitHub Copilot 向けの永続的なセマンティックメモリ。
セッションをまたいで Copilot に永続的でプロジェクト単位のメモリを提供するローカル MCP サーバーです。メモリは組み込みの 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 を参照してください。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
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).
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.-
- AlicenseBqualityDmaintenanceMCP 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.997 PyPI93Apache 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.4-
- 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.194MIT