localmem-mcp-zh
localmem-mcp-zh
🇨🇳 ローカル優先・API ゼロの中国語 AI メモリ MCP — SQLite + fastembed 中国語最適化

localmem-mcp-zh は、あらゆる MCP 互換クライアント(Claude Code、Codex、Gemini CLI、Cursor、Windsurf、Cline …)に完全ローカル・クラウド呼び出しゼロの長期メモリを提供します。すべてのメモリは 1 つの SQLite ファイルに保存され、検索はローカル余弦類似度 + 中国語 FTS5 + jieba 分かち書きによる重み付け BM25 で行われ、検索にトークンは一切かかりません。
OpenAgentHQ/localmem-mcp(6 ⭐、2026-08-14 作成)から着想を得ており、オリジナルは英語のみです。本リポジトリでは中国語向けの最適化を実施しています:
jieba による中国語分かち書き — 英語用 unicode61 トークナイザーが中国語で機能しない問題を回避
デフォルトの埋め込みモデル
BAAI/bge-small-zh-v1.5(中国語検索向け SOTA 小型モデル)ツール説明はすべて中日バイリンガル — 中国語エージェントが意図を理解しやすく
なぜ必要なのか
ほとんどの AI メモリツール(Mem0、Zep、Graphiti)は、保存と検索の経路で LLM を呼び出します。本リポジトリはローカルで埋め込みモデルを 1 回実行するだけで、以降は完全オフラインです。プライバシー以上に重要なのはコストです:メモリ 1 万件の保存、検索 1 万回でも、localmem-mcp-zh が LLM を呼び出す回数は 0 回です。
Related MCP server: tartarus-mcp
インストール
pip install localmem-mcp-zh
# 或
uvx localmem-mcp-zh初回実行時に Hugging Face から埋め込みモデルをダウンロードします(約 90 MB)。以降は完全オフラインで動作します。
クライアントへの接続
Claude Code / Codex / Gemini CLI
次の設定を MCP 設定(~/.config/mcp/servers.json または対応するクライアントの設定ファイル)に追加します:
{
"mcpServers": {
"localmem-zh": {
"command": "uvx",
"args": ["localmem-mcp-zh"],
"env": {
"LOCALMEM_DB": "~/.localmem-mcp-zh/memories.db"
}
}
}
}Cursor / Windsurf / VS Code
IDE の MCP 設定で同名のサーバーを新規追加し、パラメータは上記と同じにします。
4 つのツール
ツール | 用途 |
| 永続メモリを 1 件保存 — 決定・好み・事実、tags 付き可能 |
| 意味でメモリを検索。「どのデータベース?」で「SQLite を選びました」が見つかります |
| id でメモリを 1 件再読込、または最新の数件を取得 |
| データベースの場所、保存件数を確認 |
プライバシー
埋め込みモデルの初回ダウンロードを除き、ネットワークリクエストは一切発生しません。~/.localmem-mcp-zh/memories.db を削除すればメモリは完全に消去されます。
開発
git clone https://github.com/lvyuan1688/localmem-mcp-zh
cd localmem-mcp-zh
pip install -e ".[dev]"
pytestライセンス
MIT — 詳細は LICENSE を参照してください。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted memory for AI agents over MCP. One memory shared by all your agents.
An MCP memory server. One memory your agents share — across models, devices and apps.
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Cloud-hosted MCP server for durable AI memory
Related MCP Servers
- AlicenseAqualityCmaintenanceA local, fully-offline MCP memory server that enables persistent storage and retrieval of information using SQLite with both keyword and semantic vector search capabilities.1031 npm13MIT
- AlicenseNot gradedqualityBmaintenanceA local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.1Functional Source , Version 1.1, ALv2 Future
- AlicenseNot gradedqualityDmaintenanceLocal-first AI Memory MCP server for AI agents to search and manage knowledge stored in Obsidian vaults, optimized for CJK languages with zero AI dependency.2MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server for managing persistent AI memory using hybrid search (keyword + semantic vector) with SQLite storage and offline-first local embeddings.-