MCP Catalogs
Homelocal-history-mcp screenshot

local-history-mcp

by xxczaki·15·Score 42

MCP server providing AI access to VS Code/Cursor's Local History for data recovery.

developer-toolsfile-systemai-llm
5
Forks
11
Open issues
this month
Last commit
2d ago
Indexed

Overview

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. The server provides direct access to Cursor/VS Code Local History for personal use through the Model Context Protocol.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Recover accidentally deleted or overwritten code from editor history
you:Search across all previous versions of files to find older implementations
you:Restore a file to a previous state while creating a backup of current version
you:What is Local History?
you:How does this MCP server work?

When to choose this

Choose this if you're using VS Code or Cursor and need to recover lost code versions or compare file states without leaving your AI workflow.

When NOT to choose this

Don't use this if you need history recovery for other editors, or if you're working in an environment where Local History is disabled or not supported.

Tools this server exposes

6 tools extracted from the README
  • 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

Comparable tools

vscode-local-historyfile-history-mcpgit-mcp

Installation

Package Manager Installation

# npm
npx local-history-mcp

# pnpm
pnpm dlx local-history-mcp

# yarn
yarn global add local-history-mcp

# bun
bunx local-history-mcp

Claude Desktop

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "local-history": {
      "command": "npx",
      "args": ["-y", "local-history-mcp"]
    }
  }
}

VS Code/Cursor

Use the one-click install button or follow the official documentation to add this MCP server.

FAQ

What is Local History?
Local History is a feature in VS Code and Cursor that automatically saves snapshots of files when they are saved, allowing recovery of work that might be lost through accidental deletion or overwriting.
How does this MCP server work?
The server exposes tools that allow AI assistants to access, search, and restore file versions from the Local History database through the MCP protocol.

Compare local-history-mcp with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.