Muscle Memory

io.github.johannesloor由 GitHub 账号 johannesloor 发布v0.1.1更新于 Nov 4, 2026

MCP服务器,为你的智能体提供一个由经过测试、可复用脚本组成的库。

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

MCP server that gives your agent a library of its own tested, reusable scripts.

发布方自己的服务:Memory.fit

已验证STDIO仅桌面

概览

Muscle Memory 的本地 MCP 服务;无需登录;STDIO;4 个工具。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Muscle Memory,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[A tied shoelace bow next to the words Muscle Memory MCP Server]

Muscle Memory MCP Server

[PyPI] [Tests] [License: MIT]

Your agent solves problems by writing scripts, then throws them away like they're nothing. Tomorrow it writes the same script again. Like having to figure out how to tie your shoelaces every morning. It lacks muscle memory.

The Muscle Memory MCP server gives your agent an empty library that it fills with its own tested scripts.

Install

[Install in VS Code] [Install in VS Code Insiders] [Install in Cursor] [Install in LM Studio]

Hermes

sh
hermes mcp add muscle-memory --command uvx --args muscle-memory-mcp

Claude Code

sh
claude mcp add muscle-memory -s user -- uvx muscle-memory-mcp

To keep the library somewhere other than the default, set MUSCLE_MEMORY_DIR in the server's environment.

Codex

Add to ~/.codex/config.toml:

toml
[mcp_servers.muscle-memory]command = "uvx"args = ["muscle-memory-mcp"]# env = { MUSCLE_MEMORY_DIR = "/absolute/path/to/library" }

Cursor

Add to ~/.cursor/mcp.json:

json
{  "mcpServers": {    "muscle-memory": {      "command": "uvx",      "args": ["muscle-memory-mcp"]    }  }}

Add to your AGENTS.md

Add this standing rule to your AGENTS.md, CLAUDE.md, SOUL.md or equivalent agent instructions:

text
Before writing helper code, check muscle-memory with mm_list and run a match with mm_run.Before ending your turn, save reusable new helper scripts (not project code) with mm_save; use a background agent if available so the reply isn't delayed.If you saved something, name it in the reply.

Tool descriptions contain the safety and testing specifics for each operation.

First run and storage

The server exposes mm_list, mm_run, mm_save and mm_setup. If the personal library has not been set up, the tools guide the agent to ask you once where it should live and then call mm_setup.

The personal library defaults to ~/.muscle-memory (%USERPROFILE%\.muscle-memory on Windows); MUSCLE_MEMORY_DIR selects another location. Scripts in the personal library are available across projects.

An optional .muscle-memory/ project library holds scripts specific to one codebase. Project-root detection depends on the MCP client's working directory. Set MUSCLE_MEMORY_PROJECT_DIR to the project's absolute path in the server environment to override detection explicitly. When a script name exists in both libraries, the project copy takes precedence; listings mark the personal copy as shadowed.

For personal libraries, saves write files locally if the folder is not in git. If the library is a git repo, each saved script is committed. Setup asks whether to also push scripts to the git remote automatically; run setup again to change your answer. Project libraries are never committed or pushed automatically: you commit them with your own work. On first project setup, the agent asks whether the library should be shared through git or kept private.

Tools

  • mm_list(area?) — list available areas and script counts, or list scripts in one area.
  • mm_run(script, args) — run a saved script, passing through arguments.
  • mm_save(name, code, test, area, usage, ...) — save or update a script after its test passes. Supports runner, test selection, and personal/project scope options; see the tool description for the full schema and safety behavior.
  • mm_setup(target, ...) — set up a personal library or optional project library. Ask the user before setup; see the tool description for modes and options.

Advanced: languages and tests

The runner is picked by file extension: Python, bash/zsh, Node, Ruby, Perl, PHP, Swift, Go, Lua, R, PowerShell, and .cmd/.bat on Windows. Other languages need an explicit runner argv when saved. Runtimes are never installed for you; a missing one gives an error naming the command.

By default a script's test uses the same extension and runner. test_name and test_runner allow independent test selection. Tests live under tests/test_<stem>.<ext>; selection metadata is stored beside the script. Tests receive MM_SCRIPT (absolute script path) and MM_LIBRARY (library root). Exit status 0 passes; failed tests prevent saving. Replacing a test extension removes the prior test only after the replacement passes.

Advanced: CLI

The same command is also a CLI:

sh
uvx muscle-memory-mcp list [AREA]uvx muscle-memory-mcp run SCRIPT [ARGS...]uvx muscle-memory-mcp save NAME --code FILE --test FILE --area AREA --usage TEXTuvx muscle-memory-mcp setup [--target personal|project] [OPTIONS]uvx muscle-memory-mcp test [NAME]uvx muscle-memory-mcp trust --project

With no arguments it starts the MCP server over stdio. --help lists the options.

Security and limits

  • Scripts and tests run as you, with your environment and no sandbox. Passing tests is not a security review.
  • A project library runs only after you approve the project once with uvx muscle-memory-mcp trust --project.
  • Project-library detection depends on the client's working directory; set MUSCLE_MEMORY_PROJECT_DIR if needed.

License

MIT — see LICENSE.

来源:README.md,提交 595424d

工具

4

mm_list

List tested scripts; call before code at each reusable substep. Omit area to list areas, then select one. Same-name project scripts shadow personal. No matching script: write code. If unavailable, ask once before mm_setup.

输入参数area

mm_run

Run code as you with inherited environment; no sandbox. Report output. [write]: --dry-run then readback. [irreversible]: --dry-run, show output, wait for explicit yes before execution. Repair via mm_save replace: true.

输入参数argsscript必填

mm_save

Save reusable code and EXECUTE its test, unsandboxed; tests are not security reviews. Untrusted project library: nothing written or run; ask the user. Use args, env secrets, --dry-run for actions. Tests default to script runner/extension; test_name/test_runner override. MM_SCRIPT/MM_LIBRARY set; exit 0 passes. Failed new personal test saves nothing; replacement restores prior files. Personal commits, and pushes if chosen at setup; project never commits. Existing names: replace: true.

输入参数area必填code必填name必填test必填scopeusage必填runnerreplacenew_areatest_nametest_runner

mm_setup

After asking which: personal (mode local/existing/clone) or project (shared true uses project git, false keeps private). push: user's answer to 'Push scripts to git remote automatically?'

输入参数gitmodepathpushremotesharedtarget

版本历史

2
  1. v0.1.1最新Nov 4, 2026
  2. v0.1.0Nov 3, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Memory 集成