Skip to main content
Glama
ubbcou

system-command-mcp

by ubbcou

system-command-mcp

跨平台系统命令 MCP Server。AI 使用稳定的 program + args[] 接口调用已注册程序,不需要选择 Bash、PowerShell 或 cmd.exe,也不需要用 whichwherecommand -vGet-Command 探测工具。

工具

system_exec

program 枚举在 Server 启动时根据当前 PATH 自动生成:

{
  "program": "git",
  "args": ["status", "--short"],
  "cwd": ".",
  "timeoutMs": 30000
}

参数不会经过 Shell 展开,$HOME*.ts&& 等会原样传递。

system_environment

返回平台、架构、根工作目录,以及逻辑程序名到真实可执行文件的映射。通常无需先调用;system_exec.program 的 Schema 已包含可用程序。

Related MCP server: SSH MCP Server

构建和测试

npm install
npm run build
npm test

需要 Node.js 20 或更高版本。

MCP 配置

{
  "mcpServers": {
    "system-command": {
      "command": "node",
      "args": [
        "/absolute/path/system-command-mcp/dist/src/cli.js",
        "--root",
        "/absolute/path/to/workspace"
      ]
    }
  }
}

默认逻辑程序名

  • git、node、npm、pnpm、yarn、bun

  • python:依次解析 python3、python

  • ripgrep:解析 rg

  • powershell:依次解析 pwsh、powershell

只暴露当前环境实际存在的程序。

当前限制

  • 仅支持 stdio transport;

  • 不支持管道、重定向、任意 Shell 脚本、交互式 TTY 或后台常驻进程;

  • 默认超时 30 秒,stdout/stderr 分别保留最后 1 MiB;

  • cwd 必须位于 --root 内;

  • 程序快照在启动时生成,环境变化后需重启 Server;

  • 超时和取消只保证终止直接子进程,不保证清理完整进程树。

Install Server
F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
<1hResponse time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.

  • Runtime permission, approval, and audit layer for AI agent tool execution.

  • Intent execution engine for autonomous agent task routing

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ubbcou/system-command-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server