local-history
MCP server for accessing VS Code/Cursor's Local History
claude mcp add --transport stdio xxczaki-local-history-mcp npx -y local-history-mcp
How to use
The Local History MCP Server exposes Cursor/VS Code Local History data through the Model Context Protocol, enabling AI assistants to access past file snapshots and history entries for recovery and context enrichment. Once running, you can query tools such as list_history_files to enumerate files that have Local History entries, get_file_history to retrieve the full history of a specific file, and get_history_entry to pull the content of a single historical revision. You can also restore files to a prior state with restore_from_history, search across history content with search_history_content, and view overview statistics through get_history_stats. This makes it possible for AI copilots and assistants to reason about prior work and provide more informed suggestions or recovery options.
How to install
Prerequisites:
- Node.js (recommended via LTS release)
- npm or a compatible package manager (pnpm, yarn, bun is optional)
Option 1: Package Manager (Recommended)
-
Install and run using npx:
npm
npx -y local-history-mcp
pnpm
pnpm dlx local-history-mcp
yarn
yarn global add local-history-mcp
bun
bunx local-history-mcp
Option 2: From Source
- Clone the repository and install dependencies, then run: git clone https://github.com/xxczaki/local-history-mcp.git && cd local-history-mcp pnpm install pnpm build pnpm start
Additional notes
Notes and tips:
- The MCP server is designed for personal or development use to access Local History data from editor tools.
- If you integrate with Cursor, Claude, or VS Code, ensure your MCP config matches the tooling requirements and any authentication or local path mappings needed by Local History.
- If you encounter permission or path errors, verify the environment has access to the Local History data directories used by your editor.
- You can customize the command in mcp_config to use a different package manager invocation if needed, or pin a specific version of the package by adjusting the command/args accordingly.
Related MCP Servers
penpot
Penpot MCP server
sec-edgar
A SEC EDGAR MCP (Model Context Protocol) Server
git
An MCP (Model Context Protocol) server enabling LLMs and AI agents to interact with Git repositories. Provides tools for comprehensive Git operations including clone, commit, branch, diff, log, status, push, pull, merge, rebase, worktree, tag management, and more, via the MCP standard. STDIO & HTTP.
mcp -odoo
A Model Context Protocol (MCP) server that enables AI assistants to securely interact with Odoo ERP systems through standardized resources and tools for data retrieval and manipulation.
mcp-tasks
A comprehensive and efficient MCP server for task management with multi-format support (Markdown, JSON, YAML)
unity-api
Instant, accurate Unity API lookups instead of expensive source file reads, saving your agent tokens, context, and hallucinations