Command Execution

Provides secure, configurable shell command execution on the local system via Claude Desktop with safety checks and limits.
  • javascript

1

GitHub Stars

javascript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ryaker-commandexecution": {
      "command": "node",
      "args": [
        "/full/path/to/command-execution-tool.js"
      ],
      "env": {
        "NODE_OPTIONS": "--no-deprecation"
      }
    }
  }
}

You can securely execute shell commands on your local machine through Claude Desktop using the Command Execution MCP Server. It provides safe, configurable access to your system's command line, with working directory control and robust error handling to help you perform automated tasks and scripts from Claude in a controlled environment.

How to use

You connect to the Command Execution MCP Server from Claude Desktop by configuring a local MCP endpoint. Once set up, you can run shell commands directly from Claude and target a specific working directory when needed. Use simple commands for quick tasks or longer pipelines for automation, and rely on the built‑in safety features to block dangerous commands and enforce execution time and output limits.

How to install

Prerequisites you need before starting:

  • Node.js version 16 or later
  • Claude Desktop
  • npm (Node Package Manager)

Step by step commands you should run in your terminal to set up the MCP server locally:

cd /path/to/command-execution-tool
npm install @modelcontextprotocol/sdk

Additional configuration and usage notes

Configure Claude Desktop to point to the local MCP server. The configuration uses a local stdio server that runs a Node script to expose the MCP interface.

{
  "mcpServers": {
    "command-execution": {
      "command": "node",
      "args": [
        "/full/path/to/command-execution-tool.js"
      ],
      "env": {
        "NODE_OPTIONS": "--no-deprecation"
      }
    }
  }
}

Security and usage considerations

The server includes multiple safety measures: it blocks obviously dangerous commands, enforces a maximum execution time of 30 seconds, caps the output buffer at 1 MB, and ensures the working directory exists before execution.

When using the server, specify a working directory to keep commands contained and predictable. Always run commands you understand and review any output for signs of issues.

Examples

Execute a directory listing in a specific folder.

execute-command with command="ls -la" and workingDirectory="/Users/yourusername/Documents"

Troubleshooting

If Claude cannot reach the local MCP server, verify the Node script path is correct and the process is running. Check that the working directory you pass exists and that the MCP server is configured under the expected name in Claude Desktop.

Notes

This setup works on macOS and other Unix-like systems. Interactive commands are not supported, and long-running tasks may be terminated by the timeout policy.

Available tools

execute-command

Executes shell commands with an optional working directory, providing controlled access to the local system.

simple-hello

A basic endpoint that returns a greeting and demonstrates a simple tool invocation.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational