home / mcp / mcp commands server
Model Context Protocol server to run commands (tool: `runProcess`)
Configuration
View docs{
"mcpServers": {
"g0t4-mcp-server-commands": {
"command": "npx",
"args": [
"mcp-server-commands"
]
}
}
}You can run commands for an LLM-powered workflow using a lightweight MCP server that exposes a simple, explicit interface for executing either shell commands or executable programs. It returns both standard output and standard error, and can accept input through STDIN to feed scripts or create files. This is useful for enabling model-assisted automation in local or remote environments while keeping command execution under your control.
To use this MCP server, connect with an MCP client and start commands from your model. You can run typical shell commands like hostname or ls, or you can execute more complex scripts by piping content through STDIN. The server returns both the command’s standard output and standard error, allowing you to verify results and handle failures gracefully.
Prerequisites: you need Node.js and npm installed on your system.
# Install dependencies for the MCP server
npm install
# Build the server for development or production use
npm run build
# For development with auto-rebuild on file changes
npm run watchConfiguration and usage notes based on the available examples show two explicit ways to run the MCP server. You can use the published npm package, which runs the server via npx, or you can run a local build from a repository checkout. The latter works when you have a built index file that can be executed directly.
{
"mcpServers": {
"mcp_cmds": {
"command": "npx",
"args": ["mcp-server-commands"]
}
}
}
```
```json
{
"mcpServers": {
"mcp_cmds_build": {
// works because of the shebang in index.js
"command": "/path/to/mcp-server-commands/build/index.js",
"args": []
}
}
}Execute a command or script from an MCP client and return its STDOUT and STDERR. You can pass input via STDIN to feed scripts or create files, enabling flexible automation workflows.