MCP Script Runner

by ktrysmt

212 downloads Not rated yet
GitHub

About

A mcp server that executes shell scripts in a designated folder as tools.

Explore

- Runs shell scripts as MCP tools.
- Customizable command directory via COMMAND_DIRECTORY env var.
- Supports dotenv files for environment variables.
- Simple tool addition by placing scripts in ./commands/.
- Automatically adjusts file execution permissions.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Script Runner
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- python: e.g. mise install [email protected] && mise use [email protected] -g
- uv: e.g. brew install uv

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

and reload the mcp.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

McpServers

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

Prerequisites

- python: e.g. mise install [email protected] && mise use [email protected] -g
- uv: e.g. brew install uv

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.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.