UN

utk09-ncl/mini-memory-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

14 stars 12 forks 质量 60 趋势 20

A lightweight, local-first persistent memory server for AI tools. Stores structured memory entries in SQLite and exposes them over both the Model Context Protocol (MCP) and a plain REST HTTP API

概览

A lightweight, local-first persistent memory server for AI tools. Stores structured memory entries in SQLite and exposes them over both the and a plain . Comes with a React UI for browsing and managing memories in the browser. - Persists named memory entries (title + content + tags) in a local SQLite database - Full-text search via SQLite FTS5 (prefix queries, quoted phrases, negative filters) - Tag-based filtering with namespace:value convention (e.g. project:myapp, lang:typescript) - Exposes memories to AI clients over or - Also serves a plain REST API for direct HTTP access - Includes a React 19 browser UI for visual management - Health check: GET http://localhost:5172/ - REST API: http://localhost:5172/api/memories - MCP Streamable HTTP: http://localhost:5172/mcp The process speaks the MCP protocol over stdin/stdout. No HTTP server is started. UI starts on and proxies /api requests to the server on port 5172. Open http://localhost:5173 in your browser.

README

以下为原文 README 节选,完整内容请查看原文。

Mini Memory MCP

A lightweight, local-first persistent memory server for AI tools. Stores structured memory entries in SQLite and exposes them over both the Model Context Protocol (MCP) and a plain REST HTTP API. Comes with a React UI for browsing and managing memories in the browser.


What it does

  • Persists named memory entries (title + content + tags) in a local SQLite database
  • Full-text search via SQLite FTS5 (prefix queries, quoted phrases, negative filters)
  • Tag-based filtering with namespace:value convention (e.g. project:myapp, lang:typescript)
  • Exposes memories to AI clients over MCP stdio or MCP Streamable HTTP
  • Also serves a plain REST API for direct HTTP access
  • Includes a React 19 browser UI for visual management

Project structure

mini-memory-mcp/
├── server/
│   ├── index.ts          # Entry point — stdio or HTTP mode
│   ├── db.ts             # SQLite init, WAL, FTS5 schema & triggers
│   ├── memory-store.ts   # CRUD + FTS search logic
│   ├── routes.ts         # Express REST router (/api/memories)
│   └── mcp-tools.ts      # MCP tool definitions (memory_list/create/read/update/delete/search)
├── ui/
│   └── src/
│       ├── api.ts                    # Typed fetch helpers
│       ├── hooks/useMemories.ts      # State, debounced search, CRUD
│       └── components/               # MemoryList, MemoryCard, MemoryForm, SearchBar
├── data/
│   └── mini-memory.sqlite            # Auto-created on first run
└── package.json

Prerequisites

  • Node.js >= 20

Installation

# Install server dependencies
npm install

# Install UI dependencies
cd ui && npm install

Running the server

HTTP mode (REST API + MCP Streamable HTTP)

npm start

Server starts on port 5172.

  • Health check: GET http://localhost:5172/
  • REST API: http://localhost:5172/api/memories
  • MCP Streamable HTTP: http://localhost:5172/mcp

stdio mode (MCP stdio — for Claude Desktop / Claude CLI)

npm run start:mcp

The process speaks the MCP protocol over stdin/stdout. No HTTP server is started.


Running the UI

With the HTTP server already running:

cd ui
npm run dev

UI starts on port 5173 and proxies /api requests to the server on port 5172.

Open http://localhost:5173 in your browser.


Connecting via MCP

stdio (Claude Desktop)

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "mini-memory-mcp": {
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/mini-memory-mcp/server/index.ts", "--stdio"]
    }
  }
}

Or with npm run start:mcp:

{
  "mcpServers": {
    "mini-memory-mcp": {
      "command": "npm",
      "args": ["run", "start:mcp"],
      "cwd": "/absolute/path/to/mini-memory-mcp"
    }
  }
}

stdio (Claude Code CLI)

claude mcp add mini-memory-mcp -- npx tsx /absolute/path/to/mini-memory-mcp/server/index.ts --stdio
在 GitHub 查看完整 README

安装

npx tsx /absolute/path/to/mini-memory-mcp/server/index.ts --stdio
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "mini-memory-mcp": { "command": "npx", "args": ["tsx", "/absolute/path/to/mini-memory-mcp/server/index.ts", "--stdio"] } } }