Skip to main content

本地语义记忆 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lm_mem-0.5.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lm_mem-0.5.0-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

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

Hashes for lm_mem-0.5.0.tar.gz
Algorithm Hash digest
SHA256 62e6305fbd4712c9f401716af707c7faf31e56f382409672386c0e21ee09ef36
MD5 82999c569db806ee159d74f5ed178970
BLAKE2b-256 1d41cba34faeb94bbed65786f8b42e12056d7f3a56f16fdef63abec38503636b

See more details on using hashes here.

Provenance

The following attestation bundles were made for lm_mem-0.5.0.tar.gz:

Publisher: publish.yml on laomou/lm-mem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for lm_mem-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4894f90fbf4669b93c4e1ffa6d543a288df3f6380497573deafde51dc164ae88
MD5 50405e28485291dfd296db2634b77d25
BLAKE2b-256 0ae5ed21e42935da0546fef6b04bacb48e0e6476bdb61c46b72e9d32ca7a2766

See more details on using hashes here.

Provenance

The following attestation bundles were made for lm_mem-0.5.0-py3-none-any.whl:

Publisher: publish.yml on laomou/lm-mem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page