An MCP (Model Context Protocol) server that enables AI agents in VS Code to search and retrieve content from past Copilot Chat sessions across all your workspaces. Enhance your AI coding agent (like Cline, Roo Code, or Claude) with persistent memory.
- ✅ Continuous Memory: Search through every conversation you've ever had with Copilot.
- ✅ Instant Summaries: Get 5-8 sentence summaries of complex past discussions without polluting your context window.
- ✅ Cross-Workspace Access: Access solutions and snippets from any project, instantly.
- ✅ Local & Secure: Your data stays on your machine and is only summarized by your chosen LLM.
- ❌ Lost Context: You lose valuable insights when switching between projects/workspaces.
- ❌ Repetitive Work: You waste time re-asking Copilot the same questions you resolved yesterday.
- ❌ Isolated Knowledge: Finding a specific code snippet or architectural decision from a past chat requires manually opening old workspaces.
Chat Memory MCP connects your AI agent to your entire history of conversations. It retrieves up-to-date context from your past sessions and provides AI-generated summaries—placing them directly into your current prompt.
Search through past VS Code Copilot Chat sessions.
Input:
query(string): Search query to find in chat titles and messages
Output:
- Array of matching sessions with metadata (sessionId, title, workspaceName, lastModified)
Retrieve an AI-generated summary of a specific chat session.
Input:
sessionId(string): Absolute file path to the chat session JSON file (obtained from search results)
Output:
- AI-generated concise summary of the conversation (3-5 sentences)
- Chat title and message count
- Note: The full transcript is sent to the LLM for summarization but is NOT included in the response, keeping the prompt chain clean
For other clients (Claude Code, Roo Code, etc.), use the following command:
{
"mcpServers": {
"chat-memory": {
"command": "npx",
"args": ["-y", "@nish_ntr/chat-memory-mcp@latest"]
}
}
}Simply ask your agent:
"Search my past chats for how I implemented JWT authentication in the other project."
When you ask for content, the server uses MCP Sampling to summarize the conversation first. This means the agent gets a concise summary rather than the full transcript, keeping your token usage low and your focus sharp.
The server reads directly from your VS Code workspace storage locally.
- Local Data: Your data never leaves your machine except when sent to your chosen LLM for summarization.
- Selective Context: Only human-readable summaries are returned to the AI agent, keeping your full chats private from the immediate prompt history unless explicitly summarized.
The server automatically detects your OS and searches in:
- macOS:
~/Library/Application Support/Code/User/workspaceStorage/ - Windows:
%APPDATA%\Code\User\workspaceStorage\ - Linux:
~/.config/Code/User/workspaceStorage/
Contributions are welcome! If you have suggestions for improvements or bug fixes, please open an issue or a pull request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
MIT