Get the FREE Ultimate OpenClaw Setup Guide →

local-history

MCP server for accessing VS Code/Cursor's Local History

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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

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

Sponsor this space

Reach thousands of developers