Chat Memory MCP - Search & Summarize Your VS Code Chat History
NPM Version MIT Licensed
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.
❌ Without Chat Memory
- ❌ 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.
✅ With Chat Memory
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.
- ✅ 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.
1. search_vs_code_chats
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)
2. get_vs_code_chat_content
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
Installation
Standard Installation
Install in VS Code
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"]
}
}
}
Important Tips
Accessing History
Simply ask your agent:
"Search my past chats for how I implemented JWT authentication in the other project."
Clean Context
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.
Local Data
The server reads directly from your VS Code workspace storage. Your data never leaves your machine except when sent to your chosen LLM for summarization.
Context7 Chat Memory provides the following tools:
search_vs_code_chats: Search through past VS Code Copilot Chat sessions.
query (required): Search query to find in chat titles and messages.
get_vs_code_chat_content: Retrieve an AI-generated summary of a specific chat session.
sessionId (required): Absolute file path to the chat session JSON file.
Data Location
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/
License
MIT