dsh-timem-memory

dsh-timem-memory

Bridges TiMEM's cloud MCP server with DeepSeek Harness to provide long-term memory tools and automatic memory skills for AI models, enabling persistent context and learned behaviors across conversations.

Category
Visit Server

README

dsh-timem-memory

TiMEM 长期记忆的 DeepSeek Harness(DSH)插件。 一条 cordis 条目装好两件事:

  1. MCP 桥 —— 通过 @deepseek-ai/dsh-mcp-client 连接 TiMEM 云端 MCP (https://api.timem.cloud/mcp),把 17 个工具以 mcp__timem__* 命名注册给模型 (记忆 4 个、规则 8 个、知识库 4 个、ready 1 个);
  2. 记忆 skill —— 把 5 个内置 skill 注册进 DSH skill 体系(runtime 层,rank 250), 让模型自动执行「每回合先搜记忆 → 干活 → 写记忆」的工作流,无需用户理解 S0–S6 分级。

凭证通过 ctx.credentials 解析(TiMEM_API_KEY / TiMEM_USER_ID),不在任何配置 文件里硬编码密钥;凭证变更会触发事件自动重挂 MCP 桥,无需重启。

安装

前置:DSH 已安装,pnpm 在 PATH 上(dsh plugin 依赖它)。

# 1. 把插件装进目标 profile(任意名字,web / headless / 自定义皆可)
#    GitHub 渠道(当前即可用):
dsh plugin --profile web add git+https://github.com/auuduu/dsh-timem-memory.git
#    npm 官方商店渠道(发布后):
# dsh plugin --profile web add dsh-timem-memory

# 2. 在 <DSH_HOME>/profiles/web/cordis.patch.yml 中插入一条目(保存即热生效)
- insert:
    - id: timem-memory
      name: 'dsh-timem-memory'

小白版原理讲解(包是什么、安装装到哪、DSH 怎么“叫醒”它): docs/principles.zh.md

配置凭证

凭证存在凭证存储(~/.dsh/.credentials.yaml,权限 0600,可在 DSH 网页端凭证页管理), 或环境变量 / ~/.dsh/.env(启动时加载)。以 .credentials.yaml 为例:

DEEPSEEK_API_KEY: sk-…
TiMEM_API_KEY: sk-…          # https://console.timem.cloud/settings/api-key
TiMEM_USER_ID: usr_…         # TiMEM 控制台个人资料页

写入后插件会自动重挂 MCP 桥(无需重启 DSH)。若 TiMEM 凭证缺失,插件只跳过桥接并 记录错误日志,skill 仍会注册。

配置项

字段 默认值 说明
serverName timem MCP 命名空间,模型看到的工具名 mcp__<serverName>__<tool>
url https://api.timem.cloud/mcp TiMEM 云端 MCP 端点
apiKeyRef TiMEM_API_KEY ctx.credentials 中的 API Key 引用名
userIdRef TiMEM_USER_ID ctx.credentials 中的 User ID 引用名
enableSkills true 是否注册内置 skill
skillNames 5 个内置 skill 要注册的 skill 列表
toolCallTimeoutMs 60000 透传给 MCP 客户端
failOnStartupError false 透传给 MCP 客户端
reconnect.* 客户端默认 透传给 MCP 客户端

验证

重启/热生效后,在对话里问模型「TiMEM 接好了吗」——它会调用 mcp__timem__ready 并确认 17 个工具可见;或到 设置 → 插件 页面查看 timem-memory 条目状态。

工作原理

  • lib/index.js:cordis 插件本体(inject: ['credentials', 'skills'])。 激活时:① 解析凭证 → 用 ctx.plugin(mcpClient, …) 挂载 MCP 桥; ② 读取包内 skills/*/SKILL.md → ctx.skills.register() 注册(随上下文自动销毁)。
  • skills/:5 个 skill 包(TiMEM 官方 skill 的 DSH 适配版,工具名按 mcp__timem__* 重写,自带可用性检查与 S3/S0/S6 分级)。
  • 凭证热更新:监听 credentials/updated,匹配 apiKeyRef / userIdRef 时 释放旧桥并按新凭证重挂。

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured