MCP Script Runner logo

MCP Script Runner

by ktrysmt

MCP Script Runner allows you to execute scripts within the MCP (likely a larger system) by configuring it to run scripts from a specified directory. It provides a way to extend MCP functionality with custom scripts.

View on GitHub

Last updated: N/A

What is MCP Script Runner?

MCP Script Runner is a tool that enables the execution of custom scripts within an MCP environment. It allows users to add and run scripts by configuring the MCP to use the Script Runner, which then executes the scripts.

How to use MCP Script Runner?

  1. Clone the repository.
  2. Install prerequisites (python, uv).
  3. Configure the MCP server to use the script runner by adding a configuration block to mcp.json.
  4. Add scripts to the commands directory.
  5. Reload the MCP server to apply the changes.

Key features of MCP Script Runner

  • Script execution within MCP

  • Customizable script directory

  • Support for shebangs

  • Environment variable configuration

  • Dotenv support

Use cases of MCP Script Runner

  • Automating tasks within MCP

  • Extending MCP functionality with custom commands

  • Running maintenance scripts

  • Integrating with external systems

FAQ from MCP Script Runner

What prerequisites are required?

Python and uv are required. Specific versions are recommended in the README.

How do I add a new script?

Create a new shell script in the commands directory and ensure it has execute permissions.

How do I configure the script runner in MCP?

Add a configuration block to your mcp.json file, specifying the command to run the script runner.

Can I use environment variables?

Yes, you can configure environment variables in the mcp.json configuration or use a .env file.

Is this safe to use?

The README emphasizes that this is intended for local use only and scripts should be carefully reviewed before use due to direct file execution.