本地语义记忆 MCP Server — 跨会话持久化,语义检索
Project description
lm-mem
本地语义记忆 MCP Server — 跨会话持久化,语义检索。
安装
pip install lm-mem
使用
# 启动后端
lm-mem backend start
# MCP Server (stdio)
lm-mem mcp
MCP 客户端配置
{
"mcpServers": {
"memory": {
"command": "uvx",
"args": ["lm-mem", "mcp"],
"env": {
"LM_MEM_BACKEND_URL": "http://127.0.0.1:8901"
}
}
}
}
环境变量
| 变量 | 默认值 | 说明 |
|---|---|---|
LM_MEM_BACKEND_URL |
http://127.0.0.1:8901 |
后端地址 |
LM_MEM_BACKEND_PORT |
8901 |
后端端口(仅 _run / manage.py 用) |
LM_MEM_DATA_DIR |
~/.lm-mem |
数据根目录 |
LM_MEM_DB_PATH |
$LM_MEM_DATA_DIR/chroma |
数据库路径 |
LM_MEM_WEB_HOST |
127.0.0.1 |
Web UI 绑定地址 |
LM_MEM_WEB_PORT |
7531 |
Web UI 端口 |
作为库使用
from lm_mem.backend import _collection
from lm_mem.memory_utils import _hits_to_records, _scope_where
from lm_mem.mcp_tools import search_memories, add_memory
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lm_mem-0.5.0.tar.gz.
File metadata
- Download URL: lm_mem-0.5.0.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62e6305fbd4712c9f401716af707c7faf31e56f382409672386c0e21ee09ef36
|
|
| MD5 |
82999c569db806ee159d74f5ed178970
|
|
| BLAKE2b-256 |
1d41cba34faeb94bbed65786f8b42e12056d7f3a56f16fdef63abec38503636b
|
Provenance
The following attestation bundles were made for lm_mem-0.5.0.tar.gz:
Publisher:
publish.yml on laomou/lm-mem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lm_mem-0.5.0.tar.gz -
Subject digest:
62e6305fbd4712c9f401716af707c7faf31e56f382409672386c0e21ee09ef36 - Sigstore transparency entry: 2084145407
- Sigstore integration time:
-
Permalink:
laomou/lm-mem@8ab84828bdbd00e3f9aab97b6affd57375fe3928 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/laomou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8ab84828bdbd00e3f9aab97b6affd57375fe3928 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lm_mem-0.5.0-py3-none-any.whl.
File metadata
- Download URL: lm_mem-0.5.0-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4894f90fbf4669b93c4e1ffa6d543a288df3f6380497573deafde51dc164ae88
|
|
| MD5 |
50405e28485291dfd296db2634b77d25
|
|
| BLAKE2b-256 |
0ae5ed21e42935da0546fef6b04bacb48e0e6476bdb61c46b72e9d32ca7a2766
|
Provenance
The following attestation bundles were made for lm_mem-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on laomou/lm-mem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lm_mem-0.5.0-py3-none-any.whl -
Subject digest:
4894f90fbf4669b93c4e1ffa6d543a288df3f6380497573deafde51dc164ae88 - Sigstore transparency entry: 2084145437
- Sigstore integration time:
-
Permalink:
laomou/lm-mem@8ab84828bdbd00e3f9aab97b6affd57375fe3928 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/laomou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8ab84828bdbd00e3f9aab97b6affd57375fe3928 -
Trigger Event:
push
-
Statement type: