mcp -commands
Model Context Protocol server to run commands (tool: `runProcess`)
claude mcp add --transport stdio g0t4-mcp-server-commands npx mcp-server-commands
How to use
This MCP server exposes a general-purpose command runner under the name mcp-server-commands. It leverages the run_process tool to execute shell commands or executables and returns both STDOUT and STDERR to the client, with optional STDIN support for feeding scripts or inputs to the running process. You can use it to run simple commands like hostname or ls -al, or to execute longer scripts by streaming input via STDIN. The server is designed to be flexible: the new runProcess interface exposes two modes (executable mode and shell mode), so you can either pass an argv array where argv[0] is the executable and the rest are its arguments, or pass a full command_line to be executed by your system shell. When integrating with a client or an OpenAPI/HTTP bridge (e.g., mcpo), you can treat it as a standard tool that returns command outputs suitable for display or further processing by the model.
To use the mcp-server-commands in your workflow, configure your MCP client to start the server via the published npm package (or a local build) and then call run_process commands as needed. For HTTP/OpenAPI integrations, you can route STDIO between the MCP client and the server and rely on the logs written to STDERR for troubleshooting during development and debugging sessions.
How to install
Prerequisites:
- Node.js and npm installed on the host
- Basic familiarity with npm scripts and building Node.js projects
Install from npm (published package):
# Install the package (from npm registry)
npm install -g mcp-server-commands # or add to your project dependencies
Build from source (if you have a local checkout):
# From the repository root
npm install
npm run build
Run the server (example):
# Using the published package (as documented in the README)
npx mcp-server-commands
Configure MCP to point to the server (example in config):
{
"mcpServers": {
"mcp-server-commands": {
"command": "npx",
"args": ["mcp-server-commands"]
}
}
}
If you prefer running from a local build (repo checkout):
{
"mcpServers": {
"mcp-server-commands": {
// works because of shebang in index.js
"command": "/path/to/mcp-server-commands/build/index.js"
}
}
}
Additional notes
Tips and caveats:
- This server uses STDIO-based communication; debugging can be eased with the MCP Inspector tool (
npm run inspector). - Logs are written to STDERR and can be configured to increase verbosity with a
--verboseflag if supported by your setup. - Do not run commands with elevated privileges (no sudo) unless you explicitly trust the command and environment.
- When using HTTP bridges (e.g., mcpo), ensure proper security controls (API keys, access restrictions) since running arbitrary commands poses security risks.
- If you plan to run long-running processes or scripts, ensure resource limits are appropriate for your host to avoid overconsumption.
- For development, rebuilding after code changes is recommended to pick up updates (use
npm run build).
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud