Install
$ agentstack add mcp-charantejmandali18-copilot-mem ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
🧠 Copilot-Mem
Persistent memory for GitHub Copilot — never lose context across chat sessions again.
[](https://opensource.org/licenses/MIT) [](https://github.com/charantejmandali18/copilot-mem/releases) [](https://nodejs.org/) [](https://www.typescriptlang.org/)
Inspired by claude-mem, copilot-mem brings persistent memory to the GitHub Copilot ecosystem. It automatically captures, compresses, and retrieves context across coding sessions — so Copilot remembers your past decisions, debugging insights, and project conventions.
Features
- Persistent Memory — Seamlessly preserves context across Copilot Chat sessions
- Auto-Capture — Automatically records chat messages, file edits, and tool usage
- Full-Text Search — SQLite FTS5-powered search with BM25 ranking
- MCP Integration — 5 MCP tools that Copilot can call directly for memory retrieval
- Progressive Disclosure — Token-efficient retrieval: search → timeline → full details (~10x savings)
- Privacy First — All data local,
.copilot-mem-ignoresupport, `` tag stripping - Web Viewer — Browse, search, and manage memories at
localhost:37888/ui - VS Code Extension — One-click install with auto-capture and context injection
Architecture
┌─────────────────────────────────────────────────────┐
│ VS Code Extension │
│ (copilot-mem) │
│ │
│ ┌──────────────┐ ┌─────────────┐ ┌────────────┐ │
│ │ Auto-Capture │ │ Auto-Config │ │ Commands │ │
│ │ (chat events, │ │ (MCP server │ │ (save, │ │
│ │ file edits) │ │ registration│ │ viewer) │ │
│ └──────┬───────┘ └─────────────┘ └────────────┘ │
└─────────┼───────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ MCP Server + HTTP API │
│ (@copilot-mem/mcp-server) │
│ │
│ MCP Tools: HTTP API (port 37888): │
│ • search • POST /capture │
│ • timeline • GET /api/sessions │
│ • get_memories • GET /api/observations │
│ • save_memory • GET /api/search │
│ • smart_search • GET /ui │
└─────────┬───────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ Core Library │
│ (@copilot-mem/core) │
│ │
│ ┌──────────┐ ┌───────────┐ ┌──────────────────┐ │
│ │ Storage │ │ Config │ │ Search Engine │ │
│ │ (SQLite │ │ (~/. │ │ (FTS5 + BM25 │ │
│ │ + WAL) │ │ copilot- │ │ ranking) │ │
│ │ │ │ mem/) │ │ │ │
│ └──────────┘ └───────────┘ └──────────────────┘ │
└─────────────────────────────────────────────────────┘
Installation
Via npm (MCP server only)
npm install -g @copilot-mem/mcp-server
Then add to your VS Code .vscode/mcp.json:
{
"servers": {
"copilot-mem": {
"type": "stdio",
"command": "copilot-mem-server"
}
}
}
Via VS Code Extension (recommended)
> Coming soon to VS Code Marketplace
Install the extension, and it will:
- Auto-start the MCP server
- Register itself with Copilot
- Begin capturing chat events automatically
MCP Tools
| Tool | Description | Token Cost | |------|-------------|------------| | search | Query memories by keywords, returns compact index with IDs | ~50-100/result | | timeline | Chronological context around specific observations | ~200/result | | get_memories | Fetch full details by observation ID(s) | ~500-1000/result | | save_memory | Manually save something important | — | | smart_search | Natural language query with auto-expansion | varies |
Progressive Disclosure Pattern
1. search("auth bug") → 10 results, ~500 tokens
2. timeline(["id1", "id2"]) → surrounding context, ~400 tokens
3. get_memories(["id1"]) → full details, ~800 tokens
vs. fetching everything upfront → ~8000+ tokens
Configuration
Settings stored in ~/.copilot-mem/settings.json:
{
"port": 37888,
"dataDir": "~/.copilot-mem/data/",
"autoCapture": true,
"compressionModel": null,
"logLevel": "info",
"contextInjection": true,
"maxContextTokens": 2000
}
| Setting | Default | Description | |---------|---------|-------------| | port | 37888 | HTTP server port | | dataDir | ~/.copilot-mem/data/ | SQLite database location | | autoCapture | true | Auto-capture chat events and file edits | | logLevel | "info" | Log level: debug, info, warn, error | | contextInjection | true | Inject relevant memories into new sessions | | maxContextTokens | 2000 | Max tokens for injected context |
Privacy
- All data stays local — stored in
~/.copilot-mem/ .copilot-mem-ignore— gitignore-style file to exclude paths from capture- `` tags — wrap sensitive content to exclude it from storage
- No telemetry — zero data sent anywhere
Web Viewer
Open http://localhost:37888/ui to browse your memories:
- View all sessions and observations
- Search with full-text search
- Delete individual memories
- View storage statistics
Development
Prerequisites
- Node.js 18+
- npm 9+
Setup
git clone https://github.com/charantejmandali18/copilot-mem.git
cd copilot-mem
npm install
npm run build
npm test
Project Structure
copilot-mem/
├── packages/
│ ├── core/ # @copilot-mem/core — storage, search, config
│ ├── mcp-server/ # @copilot-mem/mcp-server — MCP tools + HTTP API
│ └── vscode/ # copilot-mem — VS Code extension
├── docs/
│ ├── specs/ # Design specifications
│ └── conversation-context.md
├── turbo.json # Turborepo config
└── tsconfig.base.json # Shared TypeScript config
Scripts
npm run build # Build all packages
npm test # Run all tests
npm run dev # Watch mode
npm run format # Format code with Prettier
npm run format:check # Check formatting
Running Locally
# Start the MCP server with HTTP API
node packages/mcp-server/dist/index.js
# Test the HTTP API
curl http://localhost:37888/api/sessions
# Save a memory
curl -X POST http://localhost:37888/capture \
-H "Content-Type: application/json" \
-d '[{"type":"manual","content":"Fixed auth bug in login.ts"}]'
# Search memories
curl "http://localhost:37888/api/search?q=auth+bug"
# Open web viewer
open http://localhost:37888/ui
Roadmap
- [x] Core storage layer (SQLite + FTS5)
- [x] MCP server with 5 tools
- [x] HTTP API + Web viewer
- [x] VS Code extension (auto-capture, context injection)
- [x] AI-based compression (reduce storage, improve search)
- [x] Chroma vector search (semantic search)
- [x] npm package publishing
- [ ] VS Code Marketplace publishing
Contributing
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License — see the [LICENSE](LICENSE) file for details.
Acknowledgments
- claude-mem by Alex Newman — the inspiration for this project
- Model Context Protocol — the protocol that makes this possible
- GitHub Copilot — the AI assistant we're enhancing
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: charantejmandali18
- Source: charantejmandali18/copilot-mem
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.