MCP ExplorerExplorer

Mcp Script Runner

@ktrysmton 10 months ago
1 MIT
FreeCommunity
AI Systems
A mcp server that executes shell scripts in a designated folder as tools.

Overview

What is Mcp Script Runner

mcp-script-runner is a MCP server designed to execute shell scripts located in a specified directory as tools.

Use cases

Use cases include automating repetitive tasks, running custom scripts for setup or configuration, and integrating various tools into a cohesive workflow for developers.

How to use

To use mcp-script-runner, clone the repository, configure the mcp.json file with the appropriate command and directory, and ensure that the necessary prerequisites like Python and uv are installed. You can add tools by creating shell script files in the commands directory and reloading the MCP.

Key features

Key features include the ability to execute shell scripts directly, support for environment variable configuration, and the requirement for execution permissions on script files. It is designed for local use and emphasizes the importance of understanding the scripts being executed.

Where to use

mcp-script-runner can be used in local development environments where automation of shell script execution is needed, such as in testing, deployment, or development workflows.

Content

MCP Script Runner

Prerequisites

Configure

git clone https://github.com/ktrysmt/mcp-script-runner
cd ./mcp-script-runner
uv sync

and add mcp.json to your mcp config like this:

{
  "mcpServers": {
    "mcp-script-runner": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-script-runner",
        "run",
        "main.py"
      ]
    }
  }
}

Change command dir:

{
  "mcpServers": {
    "mcp-script-runner": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-script-runner",
        "run",
        "main.py"
      ],
      "env": {
        "COMMAND_DIRECTORY": "/path/to/your/dir"
      }
    }
  }
}

Use dotenv:

cd ./mcp-script-runner
$EDITOR .env

Add a tool

cd ./mcp-script-runner
$EDITOR ./commands/command_name.sh

and reload the mcp.

Precautions

  • Since files are executed directly, do not forget to include the shebang in each file.
  • Execution permission is required for the files (although there is a process to adjust permissions included).
  • This is intended for local use only, and only scripts that you understand should be placed here.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers