Script Runner MCP Server

Script Runner MCP Server

Enables execution, listing, reading, and help retrieval of local Bash, PowerShell, and Python scripts from a specified directory.

Category
Visit Server

README

Script Runner MCP Server

This MCP server runs local Bash, PowerShell, or Python scripts and returns the output. It also allows the LLM to explore the script's help if there is help text supported (pro-tip, document your scripts and create a print_help function that future you can call with a help flag when future you forgets what the script does exactly or what the arguments are), or to simply provide the full text of the script for the LLM context.

Features

  • Execute Local Scripts: Run scripts with .py, .sh, and .ps1 extensions.
  • Dynamic Script Discovery: List all available scripts within a designated directory.
  • Inspect Scripts: Read the full source code of any script.
  • Get Help: Retrieve help text from scripts that support a -h flag.

Installation

  1. First, if you haven't already, install uv: curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Clone the Github repo: git clone http://github.com/ashrobertsdragon/script-runner-mcp.git

Configuration

To use this server, you need to add its configuration to your MCP client (e.g., Claude Desktop, Cursor). The client will manage starting the server process.

Here is an example configuration for claude_desktop_config.json:

{
  "mcpServers": {
    "ScriptRunner": {
      "command": "uv", # if uv is not in your PATH, you will need to provide the full path the the uv executabe
      "args": [
        "run",
        "--directory",
        "<repo cloned directory> # The full path to the cloned repo
        "script-runner-mcp",
        "-d",
        "/path/to/your/scripts"
      ]
    }
  }
}

Alternatively, you can have uv pull the MCP server directly from GitHub and avoid cloning:

{
  "mcpServers": {
    "ScriptRunner": {
      "command": "uvx", # if uv is not in your PATH, you will need to provide the full path the the uvx executabe
      "args": [
        "--from",
        "http://github.com/ashrobertsdragon/script-runner-mcp",
        "-d",
        "/path/to/your/scripts"
      ]
    }
  }
}

If you do not provide a path to a scripts directory with the -d argument, the server will use the current working directory as a default.

Available Tools

The server exposes the following tools:

  • list_scripts(directory: str | None = None) -> str: Lists available scripts in the configured or passed in directory.
  • read_script(script_name: str, directory: str | None = None) -> str: Reads the content of a specified script.
  • call_help(script_name: str, directory: str | None = None) -> str: Calls a script with the -h flag to get its help text.
  • call_script(script_name: str, args: list[str] | None = None, directory: str | None = None) -> str: Executes a script with the provided arguments.
  • verify_script(script_name: str, directory: str | None = None) -> str: Verifies that a script exists in the given or configured directory.

License

This project is licensed under the MIT License.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured