mymore

mymore

A category-first, lightweight MCP memory server that provides persistent memory for AI agents using Markdown and SQLite FTS5, with triage classification and consolidation.

Category
Visit Server

README

mymore

分类优先的轻量 MCP 记忆存储系统。

mymore 是一个本地优先的 MCP(Model Context Protocol)记忆服务器,为 AI Agent 提供持久化记忆能力。以 Markdown 为权威源,SQLite FTS5 为检索引擎,支持三分类、时效管理、Frozen Snapshot 前缀缓存优化。


架构

┌──────────────┐    ┌─────────────────────────────────┐
│  MCP Client  │ ◄─►│         mcp-server               │
│ (Claude etc) │    │  MidwayJS + @midwayjs/mcp        │
└──────────────┘    │  4 Tools + 1 Resource            │
                    └────────────┬─────────────────────┘
                                 │
                    ┌────────────▼─────────────────────┐
                    │        @mymore/core               │
                    │                                    │
                    │  Markdown ← 权威源(可读/可 Git)    │
                    │  + SQLite FTS5 ← 搜索引擎           │
                    │  + Cascade ← md ↔ FTS5 同步         │
                    │  + Consolidator ← LLM 归纳去重      │
                    │  + Frozen Snapshot ← Prefix Cache   │
                    └────────────────────────────────────┘

存储布局~/.mymore/

~/.mymore/
├── memory/
│   ├── users/<id>/episodes/    # 用户记忆(每文件一条记录)
│   └── agents/<id>/episodes/   # Agent 记忆
└── .index/memory.db            # FTS5 检索引擎

三分类原则

分类 规则 示例
persistent 不可重新推导,跨 session 有效 用户偏好、bug 修复、技术决策
session 短期高价值,跟随 session 临时变量、中间工具结果
archived 过时或被替代,保留但排除搜索 valid_until 过期、superseded

MCP Tools

Tool 功能
add_memory 存储记忆,自动三分类,写入 Markdown + FTS5
search_memory 关键词搜索,支持 owner/track/category 过滤
forget_memory 标记过时/被替代(不删除,保留溯源链)
consolidate 归纳:去重、时效淘汰、精华提炼

Resource: mymore://memory/{id} — 浏览原始 Markdown 文件


快速开始

# 构建 Docker 镜像
docker build -t mymore-mcp -f apps/mcp-server/Dockerfile .

# 运行 MCP Server(stdio 模式)
docker run -i --rm -v ~/.mymore:/root/.mymore mymore-mcp

首次运行会自动创建 ~/.mymore/ 目录并初始化数据库。

开发模式

# 安装依赖
pnpm install

# 构建
pnpm build

# 运行测试(共 38 个)
pnpm test

Claude Desktop 配置

{
  "mcpServers": {
    "mymore": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "~/.mymore:/root/.mymore",
        "mymore-mcp"
      ]
    }
  }
}

---

## Monorepo 结构

mymore/ ├── apps/ │ └── mcp-server/ # MidwayJS MCP Server │ ├── src/tools/ # add-memory, search-memory, forget-memory, consolidate │ └── src/resources/ # memory-resource ├── packages/ │ └── core/ # @mymore/core — 纯逻辑,零框架依赖 │ ├── src/models.ts # 数据模型 + SQL Schema │ ├── src/classifier.ts # 三分类引擎 │ ├── src/storage.ts # FTS5 存储封装 │ ├── src/markdown.ts # Markdown 文件读写 │ ├── src/cascade.ts # md ↔ FTS5 同步 │ └── src/consolidator.ts # 归纳层 ├── docs/ # Wiki 源文件(兼容 dumi/Docusaurus) └── build/ # 设计工作稿


---

## 开发

```bash
# 代码格式化
pnpm format

# Lint 检查
pnpm lint

# 版本管理
pnpm changeset     # 记录变更
pnpm version       # 升版本

提交规范:遵循 Conventional Commits

feat(core): add memory classifier
fix(mcp-server): correct fts5 search ranking
docs: update architecture design

渐进式升配路径

Phase 新增 状态
Phase 1 Markdown + FTS5 + Frozen Snapshot + Consolidation ✅ 已完成
Phase 2 文件 watcher(chokidar)实时检测 md 编辑 📋 待开发
Phase 3 Episode → AtomicFact 提取层 📋 待开发
Phase 4 向量库(LanceDB / pgvector) 📋 待开发
Phase N mymore-ui(WebUI 监控) 📋 待开发

技术栈

选型
MCP 框架 MidwayJS + @midwayjs/mcp
存储 SQLite FTS5(better-sqlite3)
Markdown gray-matter(frontmatter)
Monorepo pnpm workspaces
测试 vitest
构建 tsup
规范 ESLint + Prettier + EditorConfig + Husky + Commitlint + Changesets

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured