Learn the WorkBuddy / Claude / Doubao skill pack

~6 min · WorkBuddy · Claude · Doubao

快来学习 WorkBuddy / Claude / 豆包 技能接入包

约 6 分钟 · WorkBuddy · Claude · 豆包

This is the hands-on walkthrough for the memory-lock “skill pack”. No server to deploy — memory-lock is already live at api.memlock.cn. You only open an account, get your own API key, and point your AI at it. After that, destructive actions are gated behind a 6-digit code from the mini program.

Outcome: “Before my AI deletes / pays / resets, it stops and asks me for the current code on my phone.”

1 · Get your own API key (~20 s)

  1. Open the WeChat memory-lock mini program (register with email / WeChat if new).
  2. Switch to the Interface Info tab at the bottom.
  3. Copy the API Key shown there. It belongs only to you.
Know your code source: the key page shows the rolling current dynamic code. Do not confuse it with the one-time email/login code.

2 · Get the pack, then run memory-lock

First download the pack (already bundled — no npm install needed):

  1. Grab the ZIP: memory-lock-mcp.zip (~5 MB).
  2. Unzip it anywhere, e.g. C:/memory-lock-mcp or ~/memory-lock-mcp. You now have a memory-lock-mcp/ folder with src/ and node_modules/ inside.
  3. You need Node.js ≥ 18 installed (node -v to check). Nothing else — deps are pre-bundled.

Any MCP-capable client launches a local stdio process with two variables (first required):

node <unzipped>/memory-lock-mcp/src/index.js
MEMLOCK_API_KEY=YOUR_KEY            # from Interface Info
MEMLOCK_API_BASE=https://api.memlock.cn  # optional, default

3 · Register it in your client

Client
Where
WorkBuddy
Click the “+” next to the chat area → Connectors → Manage Connectors → the “Custom Connector” button at top-right → Configure MCP: paste the edited code below completely in → click Save → click Trust and wait 3–5s until it turns green → shows “2/2 tools enabled”
Claude Desktop
Settings → Developer → Edit Config → claude_desktop_config.json
Doubao
“Skills · Connectors · Partners” → top-right “+ New” → “New Custom Connector” (form-based, no JSON — see the detailed steps below)

Shared JSON shape:

{ "mcpServers": { "memory-lock": {
      "command": "node",
      "args": ["<your-unzipped>/memory-lock-mcp/src/index.js"],
      "env": { "MEMLOCK_API_KEY": "YOUR_KEY", "MEMLOCK_API_BASE": "https://api.memlock.cn" }
    } } }
Windows slash trap — read this. Paths copied from Windows Explorer come out with backslashes \. Inside the JSON config you must convert them all to forward slashes / — a lone backslash is a JSON escape character and will break parsing or mangle the path. Example — wrong: C:\Users\tom\memory-lock-mcp\src\index.js; right: C:/Users/tom/memory-lock-mcp/src/index.js. (If you insist on backslashes, every one must be doubled to \\.) Replace <your-unzipped> with your unzip folder (e.g. C:/memory-lock-mcp), save, then reconnect the client (see the WorkBuddy note below).
If you're on WorkBuddy: click the chat-area “+” → Connectors → Manage Connectors → the “Custom Connector” button at top-right → Configure MCP, then edit the shared JSON above in three places and paste it in completely:
  1. In "command": "node", replace the bare node with the absolute path to your node.exe, e.g. C:/Users/your-username/.workbuddy/binaries/node/versions/24.14.0/node.exe (match your real version — see how paths are written in your existing connector configs). A bare node here often fails with Connection closed (-32000).
  2. Replace the <your-unzipped> in args with the real path of your downloaded-and-unzipped memory-lock-mcp pack.
  3. Fill env’s MEMLOCK_API_KEY with your own API Key (copy it from the “Interface Info” page in the mini program).
Then click Save → Trust and wait 3–5s until it turns green — it should show “2/2 tools enabled”. No restart needed.
Doubao setup:
Doubao uses a form-based config — no JSON needed. Sign in first, then go to “Skills · Connectors · Partners” → top-right “+ New” → “New Custom Connector”, set Transport to STDIO (it defaults to HTTP — you must change it), then fill in the table below item by item:
Form field
What to enter
Server name
memory-lock
Transport
STDIO
Command
the absolute path to node.exe, e.g. C:/Users/your-name/.workbuddy/binaries/node/versions/24.14.0/node.exe
Arguments
<unzipped-pack>/memory-lock-mcp/src/index.js (this one only — nothing else)
Env vars
MEMLOCK_API_KEY = your own API Key
MEMLOCK_API_BASE = https://api.memlock.cn
Add arguments and env vars one at a time with “+ Add”, then save. It only takes effect in a new task after the connector is created. Custom connectors are local to this machine only — you must reconfigure on another computer.

4 · Confirm both tools are exposed

Ask your AI: “Which memory-lock MCP tools do you have?” Expect exactly two:

verify_dynamic_code     — validate a 6-digit dynamic code
detect_high_risk_action  — flag delete / transfer / reset / bulk

A healthy server logs on startup (stderr, not stdout):

[memory-lock] MCP Server started, backend=https://api.memlock.cn, api_key=set
# api_key=MISSING → env not loaded; set → ready

5 · Rehearse the human gate

Ask it to delete a test file. The correct behaviour:

  1. Agent says “this is a destructive delete” and stops.
  2. It shows the command and asks you for the current code from the mini program.
  3. You read it aloud; the agent calls verify_dynamic_code and only proceeds on success.

If it deletes right away, the gate is not active. Check: is the key yours? did the client reload? did you hand it the current code rather than an email code? and is node an absolute path?

Done. From now on your AI stops and asks for your phone code before destructive actions.

这篇是「技能接入包」的实操手册。无需自建服务器——记忆之锁已在 api.memlock.cn 在线。你只需用邮箱注册、获取专属API Key、按教程配置MCP,训练自定义高危词即可

期望效果:「我的 AI 在删数据 / 付款 / 重置前,会先停下来等我核对手机上的动态口令。」

第 1 步 · 获取专属 API Key

  1. 微信打开 「记忆之锁」 小程序(新用户微信授权登录,必须绑定邮箱)。
  2. 切到底部「接口信息」那一页(新用户赠送7天体验期)。
  3. 复制页上显示的专属API Key。
提示:接口信息页里有滚动的「当前动态口令」。别和邮箱/登录、绑定用的一次性验证码混淆。

第 2 步 · 下载并解压MCP接入包

  1. 点此下载 ZIP:memory-lock-mcp.zip(约 5 MB)。
  2. 解压到任意目录,解压后得到一个 memory-lock-mcp/ 文件夹,里面有 src/ 和 node_modules/。
提示:需要本机已安装 Node.js ≥ 18。

第 3 步 · 修改JSON并在客户端登记规则

修改共用的 JSON 写法:

{ "mcpServers": { "memory-lock": {
      "command": "node",
      "args": ["<MCP包解压目录>/memory-lock-mcp/src/index.js"],
      "env": { "MEMLOCK_API_KEY": "你的Key", "MEMLOCK_API_BASE": "https://api.memlock.cn" }
    } } }
Windows 斜杠坑(重点,必看)。Windows 复制出来的路径默认是反斜杠 \,写进 JSON 配置时必须全部改正斜杠 /——反斜杠在 JSON 里是转义符,直接粘贴会导致配置解析失败或路径错乱。
对照示例:
错:C:\Users\tom\memory-lock-mcp\src\index.js;
对:C:/Users/tom/memory-lock-mcp/src/index.js。
客户端
在哪配
WorkBuddy
点击聊天区下方「+」→ 选「连接器」→「管理连接器」→ 右上方「自定义连接器」→ 配置 MCP。
Claude Desktop
Settings → Developer → Edit Config → claude_desktop_config.json
豆包
「技能·连接器·伙伴」 → 右上角「+ 新建」 → 「新建自定义连接器」(表单式配置,见下方详细步骤)
WorkBuddy接入步骤:
按照上表说明进入「管理连接器 → 自定义连接器 → 配置 MCP」后,把上面共用的 JSON 修改下面三处,再整段粘贴保存:
  1. 把 "command": "node" 中的 node 换成你机器上 node.exe 的绝对路径,例如 C:/Users/你的用户名/.workbuddy/binaries/node/versions/24.14.0/node.exe(可参照MCP服务管理上配置文件路径)。
  2. 把 args 里的 <MCP包解压目录> 换成你下载解压的 memory-lock-mcp 接入包真实路径。
  3. 给 env 的 MEMLOCK_API_KEY 填入你的专属 API Key(小程序「接口信息」页可复制)。
点「保存」→「信任」,等 3~5 秒变绿即连接成功,应显示「2/2 个工具已启用」。
豆包接入步骤:
豆包是表单式配置,不需要写 JSON。先登录,进入「技能·连接器·伙伴」→ 右上角「+ 新建」→「新建自定义连接器」,传输类型选 STDIO(默认是 HTTP,必须改),然后按下表逐项填写:
表单字段
填什么
服务器名称
memory-lock
传输类型
STDIO
命令
node.exe 的绝对路径,例如 C:/Users/你的用户名/.workbuddy/binaries/node/versions/24.14.0/node.exe
参数
<MCP包解压目录>/memory-lock-mcp/src/index.js(只填这一条,不要加别的)
环境变量
MEMLOCK_API_KEY = 你的专属 API Key
MEMLOCK_API_BASE = https://api.memlock.cn
参数和环境变量都用「+ 添加」逐个加,保存。新建任务连接器才生效。自定义连接器仅限本机使用,换电脑需重新配置。

第 4 步 · 自定义高危词注入规则

在对话框输入以下内容(用户可自行修改)

从现在起,把「删除文件」、「删除文件夹」当作高危操作。
执行动作前,先把你准备做什么完整列给我,
调用memory-lock校验,只有我从小程序
报出当前 6 位动态口令并通过,你才能执行。

版本不同,模型不同,回复内容不同(此处略)

第 5 步 · 演练一次高危拦截

让它删一个测试文件,看它是不是会停下来:

  1. Agent 先说“这是删除类高危操作”并停下。
  2. 把要执行的命令列给你,请你去小程序取「当前动态口令」。
  3. 输入你取得的 6 位动态口令;它调 memory-lock,通过才继续。

如果它二话不说直接删了,说明拦截没生效。逐项排查:Key 是不是你自己的?客户端有没有重载?有没有把「当前动态口令」误用成邮箱验证码?node 配置路径是不是绝对路径?

提示:更换电脑需要重新配置,否则失效。动态口令失效,请检查配置的API是不是登录邮箱对应的API。