by xxczaki
Provides access to VS Code and Cursor local history through the Model Context Protocol, enabling AI assistants to retrieve, search, and restore file snapshots for data recovery and enhanced context awareness.
Local History MCP Server bridges AI assistants with the editor's Local History feature, allowing programs to list history files, fetch specific snapshots, search content, and restore previous versions directly from the Model Context Protocol.
npx local-history-mcp
list_history_files, get_file_history, get_history_entry, restore_from_history, search_history_content, get_history_stats) from your AI assistant or custom scripts.Q: Do I need Git to use this server? A: No. It works with the built‑in Local History feature of VS Code and Cursor, independent of any VCS.
Q: Is the server safe for production environments? A: It is intended for personal use and debugging; always review restored content before committing.
Q: Which editors are supported? A: Cursor, VS Code (via the MCP integration), Claude Code, and Claude Desktop.
Q: How do I uninstall the server?
A: Remove the package via your package manager (e.g., pnpm uninstall local-history-mcp) and delete the MCP entry from the editor’s configuration.
Q: Can I customize the command or environment variables? A: Yes, you can modify the MCP server entry to include any needed env vars or custom arguments.
Access Cursor/VS Code Local History through the Model Context Protocol for AI-powered data recovery
This MCP server bridges the gap between AI assistants and editor Local History, enabling data recovery and enhanced context awareness. Unlike undo/redo, Local History captures file snapshots at save points, preserving work that would otherwise be lost.
Problem: Current AI assistants (Claude, Cursor AI, GitHub Copilot) cannot access Local History data despite having extensive diagnostic capabilities.
Solution: Simple MCP server providing direct access to Cursor/VS Code Local History for personal use.
Install using your preferred package manager:
# npm
npx local-history-mcp
# pnpm
pnpm dlx local-history-mcp
# yarn
yarn global add local-history-mcp
# bun
bunx local-history-mcp
git clone https://github.com/xxczaki/local-history-mcp.git && cd local-history-mcp
pnpm install
pnpm build
pnpm start
| Tool | Description |
|---|---|
list_history_files |
List all files with Local History |
get_file_history |
View complete history for a file |
get_history_entry |
Get specific history entry content |
restore_from_history |
Restore file to previous state (with backup) |
search_history_content |
Search across all history entries |
get_history_stats |
Overview statistics |
You can install this MCP server in Cursor using the one-click install button:
Or manually configure by following the official Cursor MCP documentation.
For Claude Code (CLI), install directly:
claude mcp add local-history -- npx -y local-history-mcp
For Claude Desktop, see the official MCP documentation.
See the official documentation.
# Development mode
pnpm dev
# Run tests
pnpm test
# Linting and formatting
pnpm lint
# Launch MCP Inspector
pnpm inspector
This project contains code generated by Large Language Models (LLMs), under human supervision and proofreading.
MIT
Please log in to share your review and rating for this MCP.
{
"mcpServers": {
"local-history": {
"command": "npx",
"args": [
"-y",
"local-history-mcp"
],
"env": {}
}
}
}claude mcp add local-history npx -y local-history-mcpExplore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.