localmem-mcp-zh
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@localmem-mcp-zh我们之前选了哪个数据库?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
localmem-mcp-zh
🇨🇳 Local-first, zero-API Chinese AI memory MCP — SQLite + fastembed Chinese-optimized

localmem-mcp-zh gives any MCP-compatible client (Claude Code, Codex, Gemini CLI, Cursor, Windsurf, Cline …) a fully local, zero-cloud long-term memory. All memories are stored in a single SQLite file; search uses local cosine similarity + Chinese FTS5 + jieba tokenization weighted BM25, and retrieval costs zero tokens.
Inspired by OpenAgentHQ/localmem-mcp (6 ⭐, created 2026-08-14), the original is English-only. This repo makes Chinese optimizations:
jieba Chinese tokenization, avoiding the English unicode61 tokenizer failing on Chinese
Default embedding model
BAAI/bge-small-zh-v1.5(SOTA small model for Chinese retrieval)All tool descriptions are bilingual (Chinese/English), making it easy for Chinese agents to understand intent
Why you need it
Most AI memory tools (Mem0, Zep, Graphiti) call an LLM on both the storage and retrieval paths. This repo only runs the embedding model once locally, then stays offline forever. Beyond privacy, cost matters even more: storing 10,000 memories and retrieving 10,000 times, localmem-mcp-zh makes 0 LLM calls.
Related MCP server: tartarus-mcp
Installation
pip install localmem-mcp-zh
# 或
uvx localmem-mcp-zhThe first run downloads the embedding model from Hugging Face (~90 MB), then it's fully offline afterwards.
Connecting clients
Claude Code / Codex / Gemini CLI
Add the following to your MCP config (~/.config/mcp/servers.json or your client's config file):
{
"mcpServers": {
"localmem-zh": {
"command": "uvx",
"args": ["localmem-mcp-zh"],
"env": {
"LOCALMEM_DB": "~/.localmem-mcp-zh/memories.db"
}
}
}
}Cursor / Windsurf / VS Code
Add a server with the same name in the IDE's MCP settings, with the same parameters as above.
Four tools
Tool | Purpose |
| Save a persistent memory — decisions, preferences, facts, optionally with tags |
| Search memories by semantics. "Which database?" can find "we chose SQLite" |
| Re-read a memory by id, or fetch the most recent few |
| Where the database is, how many entries are stored |
Privacy
No network requests at all, except for the one-time embedding model download. Delete ~/.localmem-mcp-zh/memories.db and the memories are gone.
Development
git clone https://github.com/lvyuan1688/localmem-mcp-zh
cd localmem-mcp-zh
pip install -e ".[dev]"
pytestLicense
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceA local, fully-offline MCP memory server that enables persistent storage and retrieval of information using SQLite with both keyword and semantic vector search capabilities.107812MIT
- AlicenseNot gradedqualityDmaintenanceA local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.51Apache 2.0
- AlicenseNot gradedqualityBmaintenanceLocal-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.
Related MCP Connectors
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
Cloud-hosted MCP server for durable AI memory
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lvyuan1688/localmem-mcp-zh'
If you have feedback or need assistance with the MCP directory API, please join our Discord server