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.
First download the pack (already bundled — no npm install needed):
memory-lock-mcp.zip (~5 MB).C:/memory-lock-mcp or ~/memory-lock-mcp. You now have a memory-lock-mcp/ folder with src/ and node_modules/ inside.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
claude_desktop_config.jsonShared 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" }
} } }
\. 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)."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).<your-unzipped> in args with the real path of your downloaded-and-unzipped memory-lock-mcp pack.env’s MEMLOCK_API_KEY with your own API Key (copy it from the “Interface Info” page in the mini program).memory-lockSTDIOC:/Users/your-name/.workbuddy/binaries/node/versions/24.14.0/node.exe<unzipped-pack>/memory-lock-mcp/src/index.js (this one only — nothing else)MEMLOCK_API_KEY = your own API KeyMEMLOCK_API_BASE = https://api.memlock.cnAsk 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
Ask it to delete a test file. The correct behaviour:
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?
这篇是「技能接入包」的实操手册。无需自建服务器——记忆之锁已在 api.memlock.cn 在线。你只需用邮箱注册、获取专属API Key、按教程配置MCP,训练自定义高危词即可
memory-lock-mcp.zip(约 5 MB)。memory-lock-mcp/ 文件夹,里面有 src/ 和 node_modules/。修改共用的 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" }
} } }
\,写进 JSON 配置时必须全部改正斜杠 /——反斜杠在 JSON 里是转义符,直接粘贴会导致配置解析失败或路径错乱。
C:\Users\tom\memory-lock-mcp\src\index.js;C:/Users/tom/memory-lock-mcp/src/index.js。claude_desktop_config.json"command": "node" 中的 node 换成你机器上 node.exe 的绝对路径,例如 C:/Users/你的用户名/.workbuddy/binaries/node/versions/24.14.0/node.exe(可参照MCP服务管理上配置文件路径)。args 里的 <MCP包解压目录> 换成你下载解压的 memory-lock-mcp 接入包真实路径。env 的 MEMLOCK_API_KEY 填入你的专属 API Key(小程序「接口信息」页可复制)。memory-lockSTDIOC:/Users/你的用户名/.workbuddy/binaries/node/versions/24.14.0/node.exe<MCP包解压目录>/memory-lock-mcp/src/index.js(只填这一条,不要加别的)MEMLOCK_API_KEY = 你的专属 API KeyMEMLOCK_API_BASE = https://api.memlock.cn在对话框输入以下内容(用户可自行修改)
从现在起,把「删除文件」、「删除文件夹」当作高危操作。
执行动作前,先把你准备做什么完整列给我,
调用memory-lock校验,只有我从小程序
报出当前 6 位动态口令并通过,你才能执行。
版本不同,模型不同,回复内容不同(此处略)
让它删一个测试文件,看它是不是会停下来:
memory-lock,通过才继续。如果它二话不说直接删了,说明拦截没生效。逐项排查:Key 是不是你自己的?客户端有没有重载?有没有把「当前动态口令」误用成邮箱验证码?node 配置路径是不是绝对路径?