Mcp Server Commands

io.github.bytedance由 GitHub 账号 bytedance 发布v1.0.0更新于 Oct 25, 2026

An MCP server to run arbitrary commands

概览

AI 生成的概览

一个本地 MCP 服务器,让 AI 助手在用户机器上执行任意命令并运行脚本。

可以做什么
通过服务器的命令执行工具在本机运行任意命令,启动时可用工作目录参数(如 --cwd)限定位置。按解释器名称执行脚本片段,例如内存调用示例中用 node 解释器调用 run_script。既可作为 stdio 本地进程运行,也可用指定端口启动为 Streamable HTTP 或 SSE 端点供远程客户端连接。可在 JavaScript 或 TypeScript 的 MCP 客户端中通过进程内调用嵌入,无需安装命令行工具。
适用场景
适合助手需要在你自己机器上执行 shell 命令或短脚本的开发者场景,例如查看文件、运行构建或测试步骤、自动化本地任务。它是通用的命令执行通道,适用于你已信任客户端并希望直接获得命令访问权限的环境。
运行要求
需要 Node.js 18 或更高版本,以及 VS Code、Cursor、Windsurf 或 Claude Desktop 等 MCP 客户端。通过 npm 包 @agent-infra/mcp-server-commands 安装,通常用 npx 启动。未声明认证、环境变量或请求头。远程模式需以端口参数启动。
安装前请注意
它会在你的机器上执行任意命令,助手被诱导执行的任何内容都会以你的用户权限运行,可能读取、修改或删除文件并访问网络。未声明任何认证,因此远程 HTTP 或 SSE 端点不应暴露在 localhost 之外。批准前请检查命令,并考虑限制工作目录。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Commands MCP Server

[NPM Downloads]

[Install MCP Server] [Install in VS Code] [Install in VS Code Insiders]

A Model Context Protocol (MCP) server that provides execuate arbitrary commands.

[图片]

Requirements

  • Node.js 18 or newer
  • VS Code, Cursor, Windsurf, Claude Desktop or any other MCP client

Getting started

Local (Stdio)

First, install the Commands MCP server with your client. A typical configuration looks like this:

js
{  "mcpServers": {    "commands": {      "command": "npx",      "args": [        "-y",        "@agent-infra/mcp-server-commands@latest",        "--cwd",        "/tmp"      ]    }  }}
Install in VS Code

You can also install the Commands MCP server using the VS Code CLI:

bash
# For VS Codecode --add-mcp '{"name":"commands","command":"npx","args":["@agent-infra/mcp-server-commands@latest"]}'

After installation, the Commands MCP server will be available for use with your GitHub Copilot agent in VS Code.

Install in Cursor

Go to Cursor Settings -> MCP -> Add new MCP Server. Name to your liking, use command type with the command npx @agent-infra/mcp-server-commands. You can also verify config or add command like arguments via clicking Edit.

js
{  "mcpServers": {    "commands": {      "command": "npx",      "args": [        "-y",        "@agent-infra/mcp-server-commands@latest"      ]    }  }}
Install in Windsurf

Follow Windsuff MCP documentation. Use following configuration:

js
{  "mcpServers": {    "commands": {      "command": "npx",      "args": [        "-y",        "@agent-infra/mcp-server-commands@latest"      ]    }  }}
Install in Claude Desktop

Follow the MCP install guide, use following configuration:

js
{  "mcpServers": {    "commands": {      "command": "npx",      "args": [        "-y",        "@agent-infra/mcp-server-commands@latest"      ]    }  }}
Remote (SSE / Streamable HTTP)

At the same time, use --port $your_port arg to start the browser mcp can be converted into SSE and Streamable HTTP Server.

bash
# normal run remote mcp servernpx @agent-infra/mcp-server-commands --port 8089

You can use one of the two MCP Server remote endpoint:

  • Streamable HTTP(Recommended): http://127.0.0.1:8089/mcp
  • SSE: http://127.0.0.1:8089/sse

And then in MCP client config, set the url to the SSE endpoint:

js
{  "mcpServers": {    "commands": {      "url": "http://127.0.0.1:8089/sse"    }  }}

url to the Streamable HTTP:

js
{  "mcpServers": {    "commands": {      "type": "streamable-http", // If there is MCP Client support      "url": "http://127.0.0.1:8089/mcp"    }  }}
In-memory call

If your MCP Client is developed based on JavaScript / TypeScript, you can directly use in-process calls to avoid requiring your users to install the command-line interface to use Commands MCP.

js
import { Client } from '@modelcontextprotocol/sdk/client/index.js';import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
// type: module project usageimport { createServer } from '@agent-infra/mcp-server-commands';// commonjs project usage// const { createServer } = await import('@agent-infra/mcp-server-commands')
const client = new Client(  {    name: 'test commands client',    version: '1.0',  },  {    capabilities: {},  },);
const server = createServer();const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
await Promise.all([  client.connect(clientTransport),  server.connect(serverTransport),]);
// list toolsconst result = await client.listTools();console.log(result);
// call toolconst toolResult = await client.callTool({  name: 'run_script',  arguments: {    interpreter: 'node',    script: 'console.log(1+1);',  },});console.log(toolResult);

Developement

Access http://127.0.0.1:6274/:

bash
npm run dev

来源:packages/agent-infra/mcp-servers/commands/README.md,提交 2ff41a9

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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