modusensus / modusensus/dsh-mneme

[Feature] MCP stdio server(v1):让记忆能力进入任意 MCP 客户端

Closed
#181 0 comments 0 reactions 0 assignees View on GitHub
feature help wanted
Dominant language
JavaScript
Stars
100
Forks
11
Avg merge
1h 17m
Merged PRs (30d)
124

Description

## 目标

让 dsh-mneme 的记忆能力**脱离 DSH 宿主、在任何 MCP 客户端可用**(Claude Code / Cursor / 任意支持 Model Context Protocol 的工具)。这是插件「通用化」的方向性一步。

## v1 形态

- **stdio MCP server**(`bin/dsh-mneme-mcp.mjs` 独立进程):任何 MCP host 直接挂载
- 传输/数据面:走 **standalone API(8790,Bearer)** 而非直连 memory.db——写入并发由 DSH 单点负责,最稳;DSH 未运行时记忆只读性/可用性另议
- **工具面六件套**(命名对齐 DSH 内工具,零迁移成本):`memory_save / memory_search / memory_list / memory_get / memory_update / memory_delete`
- 依赖策略:MCP SDK 按 #131 自管运行时先例处理(peerDependencies / 可选档),不硬捆

## 前置

- #180(standalone API 补 profile / rules 路由)——画像读取是 MCP 工具面的一部分

## 开放讨论点

- transport:v1 只做 stdio,还是同时提供 streamable HTTP?
- 工具粒度:六件套是否需要 `memory_entities` / 图查询?
- 鉴权:token 由 MCP host 的 env 传入(`DSH_MNEME_URL` / `DSH_MNEME_TOKEN` 沿用 CLI 约定)

## 验收

- Claude Code 挂载后六件套全部可用,与 DSH 内工具行为一致(去重合并、重要性等语义不漂移)

Contributor guide

Open the contributing guide

Research direction

Start by reading the proposed entry point, bin/dsh-mneme-mcp.mjs, and the standalone API work in #180. Trace how DSH’s six memory tools map to the standalone API, including Bearer authentication and the DSH_MNEME_URL/DSH_MNEME_TOKEN environment variables. Done means Claude Code can mount the stdio server and use all six tools without semantic drift.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.