Get the FREE Ultimate OpenClaw Setup Guide →

local-memory

A fully local MCP memory server for Cursor IDE - no API keys required

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio wlixi008-byte-local-memory-mcp-server node /path/to/server.js \
  --env MEMORY_DATA_DIR="Optional custom data directory path"

How to use

This MCP server runs entirely locally and uses a JSON file to store memories, sessions, prompts, and code changes. It provides fuzzy search via Fuse.js, supports multiple sessions, and presents a timeline view for recent memory history. You can interact with the server through the MCP interface defined by the tools in the README, such as add_memory, search_memory, get_recent_context, timeline, and get_changes_history. To integrate with an editor like Cursor, configure a local server entry that points to your Node.js server, enabling you to manage memories directly from your IDE with commands and prompts.

Key capabilities include: a local JSON data store (memory.json), smart search, automatic recording of prompts and code changes, and robust session management. The tool list shows actions you can perform on memories (add, search, update, delete), manage sessions, and view history and changes. Use the provided examples to add memories, query for fuzzy matches, view recent context, and generate timelines to understand memory evolution over time.

How to install

Prerequisites:

  • Node.js 18 or newer installed on your system
  • npm (comes with Node.js)
  • Basic familiarity with your terminal/command prompt

Install and run the server locally:

  1. Clone the repository: git clone https://github.com/yourusername/local-memory-mcp-server.git cd local-memory-mcp-server

  2. Install dependencies: npm install

  3. Run the MCP server (example): node server.js

    If you have a custom entry path, adjust accordingly

  4. (Optional) configure Cursor or your MCP client to point to the local server:

    • In Cursor, add a server entry with command: node args: ["/path/to/local-memory-mcp-server/server.js"] (You can set MEMORY_DATA_DIR via the env block if you want a custom data path.)
  5. Open your MCP client and verify you can list and manage memories, sessions, and prompts.

Additional notes

Tips and notes:

  • Data is stored locally in memory.json by default, along with prompts.log and changes.log. Make regular backups of memory.json.
  • You can customize the data directory by setting MEMORY_DATA_DIR in the environment variables.
  • On Windows, use full paths for server.js in your MCP client configuration (e.g., C:\Users\YourName\local-memory-mcp-server\server.js).
  • If memory saving isn’t happening, check write permissions to the data directory.
  • The auto-record feature logs prompts containing keywords and significant code changes; adjust thresholds or keywords in your implementation if needed.
  • Ensure Node.js 18+ compatibility to avoid runtime issues with newer syntax used in the server.
  • When upgrading, review the changes.json/logs to understand what memory or code changes were captured.

Related MCP Servers

Sponsor this space

Reach thousands of developers