Mcp Server Commands
@g0t4
About Mcp Server Commands
Model Context Protocol server to run commands (tool: `runProcess`)
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-server-commands": {
"command": "uvx",
"args": [
"mcpo",
"--port",
"3010",
"--api-key",
"supersecret",
"--",
"npx",
"mcp-server-commands"
]
}
}
}Tools
1run a command, i.e. `hostname` or `ls -al` or `echo "hello world"` etc
Overview
What is Mcp Server Commands?
Mcp Server Commands is an MCP server that provides a single tool runProcess to run commands on the host machine. It supports both shell command lines (with pipes, redirects, variable expansion) and direct executable invocation via an argv array. The server returns standard output and standard error as text, and optionally accepts stdin. It is designed for use with LLMs that need to execute system commands and use the output in conversations.
How to use Mcp Server Commands?
Install the npm package mcp-server-commands and configure it in your MCP client (e.g., Claude Desktop). Invoke the runProcess tool with either a command_line string (shell interpreted) or an argv array (direct executable). Optionally provide a stdin string to pass data to the command’s standard input. The tool returns STDOUT and STDERR as text. For local models, use a system prompt that encourages tool usage.
Key features of Mcp Server Commands
- Runs commands via shell or direct argv invocation.
- Returns stdout and stderr as separate text outputs.
- Supports optional stdin for passing scripts or input.
- Single tool design, easy for models to learn.
- Security warning: always review commands before approving.
- Works with Claude Desktop, Groq Desktop, and HTTP via mcpo.
Use cases of Mcp Server Commands
- Run simple commands like
hostnameorls -aland feed output to the model. - Execute scripts passed via stdin to interpreters (bash, python, fish, etc.).
- Create files from model-generated content using
cat >> pathwith stdin. - Enable an LLM to execute user‑requested system commands interactively.
FAQ from Mcp Server Commands
How is the command executed?
Two mutually exclusive ways: command_line (string) runs through the default shell with pipes, redirects, and variable expansion; argv (array) executes the executable directly without shell interpretation.
How can I pass input to a command?
Use the optional stdin parameter. The text you provide will be fed to the command's standard input – useful for scripting or creating files with cat >>.
What are the security considerations?
The server runs with the user's permissions. Do not run with sudo. In Claude Desktop, use "Approve Once" to review each command; deny if you don't trust it.
How do I install Mcp Server Commands?
Published as mcp-server-commands on npm. Add the config to claude_desktop_config.json with command: "npx" and args: ["mcp-server-commands"]. Or build locally from the repository with npm run build and point to the built script.
How can I debug the server?
Use the MCP Inspector via npm run inspector. Logs are written to STDERR; add --verbose to the args for more messages. Claude Desktop logs to ~/Library/Logs/Claude/mcp-server-mcp-server-commands.log.
Frequently asked questions
How is the command executed?
Two mutually exclusive ways: `command_line` (string) runs through the default shell with pipes, redirects, and variable expansion; `argv` (array) executes the executable directly without shell interpretation.
How can I pass input to a command?
Use the optional `stdin` parameter. The text you provide will be fed to the command's standard input – useful for scripting or creating files with `cat >>`.
What are the security considerations?
The server runs with the user's permissions. Do not run with `sudo`. In Claude Desktop, use "Approve Once" to review each command; deny if you don't trust it.
How do I install Mcp Server Commands?
Published as `mcp-server-commands` on npm. Add the config to `claude_desktop_config.json` with `command: "npx"` and `args: ["mcp-server-commands"]`. Or build locally from the repository with `npm run build` and point to the built script.
How can I debug the server?
Use the MCP Inspector via `npm run inspector`. Logs are written to STDERR; add `--verbose` to the args for more messages. Claude Desktop logs to `~/Library/Logs/Claude/mcp-server-mcp-server-commands.log`.
Basic information
More Other MCP servers
Inbox Zero AI MCP
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
Blender
ahujasidOpen-source MCP to use Blender with any LLM
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
Comments