Local Commander

io.github.netbka由 GitHub 账号 netbka 发布v0.1.4更新于 Nov 6, 2026

Files, Git, allowlisted dev commands, processes and localhost inside folders you choose.

发布方自己的服务:Local Commander

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手在你指定的文件夹内访问文件、Git、白名单开发命令、进程和 localhost。

可以做什么
  • 在允许的根目录内读取、列出和全文搜索文件,并创建或替换文件
  • 查看 Git 状态、差异和最近提交,或一次获取包含脚本与进程的项目快照
  • 以独立参数运行一个或多个白名单可执行程序,不经过 shell 字符串
  • 启动、列出、读取输出和终止长时间运行的开发进程,并查看调度状态
  • 向白名单内的本地主机发送受限的 HTTP 请求
适用场景
适合让助手直接处理本地真实仓库或开发环境:运行测试和构建、审阅差异、启动开发服务器并查看日志,同时不必给它一个不受限制的终端。
运行要求
以 stdio 方式在本机运行。npx 或源码安装需要 Node.js 20+;Claude Desktop 可用 .mcpb 包(无需 Node.js);也可使用 Docker 镜像。必须提供至少一个允许的文件夹,通过文件夹参数或 LCMCP_ROOTS 变量指定。可选的 HTTP 模式需要 LCMCP_TOKEN 或 OAuth 设置。
安装前请注意
它会读写文件并在你的机器上运行程序。它不是沙箱:被允许的解释器(如 node 或 python)以你的账户权限运行,能读取你能读取的任何内容,需要强隔离时请使用 Docker、低权限账户或虚拟机。默认会拦截常见密钥文件,但命令白名单可自行修改。HTTP 模式应只绑定到本机地址并用 LCMCP_TOKEN 保护。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Local Commander

Your AI, on your computer.

Let Claude, Cursor, Codex or your own agent work with the files, Git and dev tools on your machine.
You choose the folders. No account, no cloud, no telemetry.

[npm] [Docker] [MCP Registry] [License: MIT] [M8ven Score]

Get started · What people use it for · Why Local Commander · Questions · Technical reference


The problem

Your AI can write the code, but it can't see your project. You copy files into the chat, paste test output back, and run every command yourself. Giving it a raw terminal solves that, but then it can touch everything.

Local Commander sits in between. Your AI gets real tools for real work on your machine, inside the folders you pick, with commands you allow. You keep working in the chat you already have open.

What people use it for

CodeRun tests and builds · Fix a bug in the real repo · Review a diff before you push
Local servicesStart a dev server · Check a service is up · Read its logs
Project contextGet status, recent commits and scripts in one ask · Search the codebase · Edit files in place

Try asking:

"Run the tests in my-app and tell me what fails."
"Start the dev server and check that port 3000 answers."
"Show me what changed in the repo since yesterday."

Why Local Commander

🔒 You choose the access. Your AI sees only the folders you pick. Secret files such as .env and private keys are blocked by default.

🧰 Real tools, not a raw shell. Commands run from an allowlist (Git, Node, npm, Python and similar) with separate arguments. There is no free-form shell string to inject into.

⚡ Parallel work without collisions. Independent commands run side by side. Long-running processes such as dev servers keep running while your AI checks their output.

🏠 Stays on your machine. The server runs locally and talks only to the AI client that started it. No account, no telemetry, and the audit log is off unless you turn it on.

🔌 Works with the AI you already have. Claude Desktop, Claude Code, Cursor, Codex, ChatGPT over a tunnel, or anything that speaks MCP.

Get started

Pick the way that fits you. Each takes a couple of minutes.

You useDo this
Claude DesktopDownload the .mcpb file from the latest release and open it. Choose your folders. No Node.js needed.
Claude Desktop or Cursor, with Node.js 20+npx -y local-commander-mcp-agent setup --root /path/to/your/projects --client all and restart the app.
Claude Codeclaude mcp add local-commander -- npx -y local-commander-mcp-agent --stdio /path/to/your/projects
DockerMount your projects into ghcr.io/netbka/local-commander-mcp-agent. See Docker.
Any other MCP clientRun npx -y local-commander-mcp-agent --stdio /path/to/your/projects. See npx.

Before you install

What can my AI touch?

Only the folders you choose, and only through Local Commander's tools: reading and editing files, Git inspection, allowlisted commands, dev processes and requests to localhost. You can change the command list in the config file.

Is it a sandbox?

No. File tools are limited to your folders, but an allowed program such as node or python runs with your account's permissions and can read what you can read. For hard isolation, use the Docker image, a separate low-privilege account or a VM.

Does my data go anywhere?

No. The server runs on your computer and talks only to the AI client that started it. There is no telemetry. What your AI client sends to its own provider is between you and that provider.

Can I remove it?

Yes. npx -y local-commander-mcp-agent setup --remove takes it out of Claude Desktop and Cursor and keeps a backup of the previous config. In Claude Desktop you can also disable or remove the extension.

What about several computers or a team?

This open-source edition runs one computer at a time. The hosted service at localcmd.app connects ChatGPT, Claude or your own agent to all your computers at once, runs tasks on several machines in parallel and shows which computer ran what. It is a separate product and is not needed for this one.


Technical reference

Tools

ToolPurpose
project_snapshotOne-call repo context: status, diff stat, recent commits, package scripts, managed processes
fs_read, fs_list, fs_searchBounded reads, listings and text search inside allowed roots
fs_write, fs_replaceCreate/replace a file, or an exact targeted replacement
git_status, git_diff, git_logCompact Git inspection
command_run, parallel_command_runOne or several allowlisted executables with separate arguments
process_start, process_list, process_output, process_killLong-running dev processes
scheduler_statusActive/queued work and resource locks
localhost_requestBounded HTTP to allowlisted local hosts only

Install options

One-command setup

Requirements: Node.js 20+.

bash
npx -y local-commander-mcp-agent setup --root /path/to/your/projects --client all

This adds a local-commander entry to the Claude Desktop and/or Cursor MCP configuration, keeping a timestamped backup of the previous file. Repeat --root for more folders, use --client claude-desktop or --client cursor for one client, --dry-run to preview, and setup --remove to take the entry out again. Restart the client afterwards.

npx

Requirements: Node.js 20+. Folders the server may access follow --stdio:

json
{  "mcpServers": {    "local-commander": {      "command": "npx",      "args": ["-y", "local-commander-mcp-agent", "--stdio", "/path/to/your/projects"]    }  }}

On Windows some clients need "command": "cmd" with "args": ["/c", "npx", "-y", ...]; setup writes that form for you.

LCMCP_ROOTS still works instead of folder arguments. In stdio mode local state is kept in ~/.local-commander-mcp-agent unless LCMCP_OAUTH_STATE_PATH is set.

On Windows use ; between several roots and paths such as C:\\Users\\you\\source\\repos. The package includes the small Windows file-read helper, so nothing is compiled at install time.

Docker

The container is the sandbox: the server only sees the folders you mount under /workspace. The image is published as ghcr.io/netbka/local-commander-mcp-agent (tags latest and each version). To build it yourself: docker build -t local-commander-mcp-agent .

MCP client configuration (Claude Desktop, Cursor, Claude Code, Codex and others):

json
{  "mcpServers": {    "local-commander": {      "command": "docker",      "args": [        "run", "-i", "--rm",        "-v", "/path/to/your/projects:/workspace/projects",        "ghcr.io/netbka/local-commander-mcp-agent"      ]    }  }}

On Windows use a path such as C:\\Users\\you\\source\\repos:/workspace/repos. The image contains Node.js 22, Git and Python 3. Add tools by extending the image.

HTTP instead of stdio:

bash
docker run --rm -p 127.0.0.1:17321:17321 \  -e LCMCP_TOKEN=generate-a-long-random-token \  -v /path/to/your/projects:/workspace/projects \  ghcr.io/netbka/local-commander-mcp-agent --http

The image defaults to --stdio; any other argument after the image name (here --http) replaces it and starts the HTTP server. The endpoint is http://127.0.0.1:17321/mcp with Authorization: Bearer <token>. Publish the port on 127.0.0.1 only.

Node.js

Requirements: Node.js 20+.

bash
npm installnpm run build
json
{  "mcpServers": {    "local-commander": {      "command": "node",      "args": ["/path/to/local-commander-mcp-agent/dist/index.js", "--stdio", "/path/to/your/projects"]    }  }}

In stdio mode stdout carries only MCP messages and logs go to stderr. HTTP authentication settings do not apply, because only the client that started the process can talk to it.

On Windows the build also compiles a small file-read helper (release/personal/OwnerBridge.exe) with the .NET Framework compiler that ships with Windows. Other platforms use the Node reader.

HTTP and ChatGPT
bash
cp local-commander.config.example.json local-commander.config.json   # set "roots"LCMCP_AUTH_MODE=oauth LCMCP_PUBLIC_BASE_URL=https://your-tunnel.example.com npm start

When the client starts authorization, a one-time approval code is printed in the local terminal. Bearer mode (LCMCP_AUTH_MODE=bearer, LCMCP_TOKEN=...) is available for local clients.

Security model

  • Direct file operations are constrained to the configured roots; existing paths are resolved with realpath, so symlinks cannot escape a root.
  • Common secret files (.env, private keys, credential files) are blocked by default.
  • command_run takes an executable and an argument array, never a shell string. Executables are allowlisted and resolved from absolute PATH directories only.
  • Command time and output are capped; HTTP is limited to localhost and redirects are not followed.
  • Child processes are not OS-sandboxed outside Docker: an allowed interpreter can read anything the account can read. For hard containment use the Docker image, a separate low-privilege account or a VM.

Configuration

VariableMeaning
LCMCP_TRANSPORTstdio to serve over stdio (same as --stdio)
LCMCP_ROOTSAllowed roots separated by the OS path delimiter (; on Windows, : elsewhere)
LCMCP_CONFIGConfig file path (default local-commander.config.json in the working directory)
LCMCP_HOST, LCMCP_PORT, LCMCP_MCP_PATHHTTP bind and path
LCMCP_AUTH_MODEHTTP only: oauth, bearer or none
LCMCP_TOKENToken for bearer mode
LCMCP_PUBLIC_BASE_URLPublic HTTPS origin used as OAuth issuer/resource
LCMCP_OAUTH_STATE_PATHOAuth and local state file path
LCMCP_AUDIT_MODEoff (default), minimal, diagnostic or full (full requires LCMCP_AUDIT_RECOVERY_KEY)

The config file can also set the command allowlist (shell.allowedCommands), size limits and localhost hosts; see local-commander.config.example.json.

Development

bash
npm run typechecknpm testnpm run build

MIT licensed · Report an issue · Hosted multi-computer service: localcmd.app

来源:README.md,提交 6c34a80

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:服务器未能启动。

版本历史

3
  1. v0.1.4最新Oct 30, 2026
  2. v0.1.3Oct 22, 2026
  3. v0.1.1Oct 17, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

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

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Localcmd 集成