About Script Tool
Script Tool is an MCP server and standalone CLI for executing command-line scripts. It supports configurable interpreters, execution timeouts, and captured output and errors.
Key features
- 01Execute scripts through MCP
- 02Select an interpreter
- 03Timeout protection
- 04Capture output and errors
- 05Standalone CLI
Use cases
- 01Run a shell command
- 02Execute Python with a chosen interpreter
- 03Run a script in a working directory
MCP support
Exposes safe command-line script execution to MCP clients, including interpreter selection, timeout handling, and output capture. A standalone CLI is also available without an MCP client.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEScript Tool
A tool for executing command line scripts through MCP.
Features
- Execute command line scripts safely
- Support for different interpreters
- Timeout protection
- Output and error capture
- Cross-platform support (Linux, macOS, Windows)
Installation
There are several ways to install the Script Tool:
Option 1: Download from GitHub Releases
- Visit the GitHub Releases page
- Download the binary for your platform:
- script-mcp_linux_amd64` for Linux
script-mcp_darwin_amd64for macOSscript-mcp_windows_amd64.exefor Windows
- Make the binary executable (Linux/macOS):
chmod +x script-mcp_* - Move it to your PATH (Linux/macOS):
sudo mv script-mcp_* /usr/local/bin/script-mcp@latest
Option 2: Go install
go install github.com/nguyenvanduocit/script-mcp
Config
Claude
{
"mcpServers": {
"script": {
"command": "/path-to/script-mcp"
}
}
}
CLI Usage
In addition to the MCP server, script-mcp ships a standalone CLI binary (script-cli) for direct terminal use — no MCP client needed.
Installation
just install-cli
# or
go install github.com/nguyenvanduocit/script-mcp/cmd/script-cli@latest
Quick Start
No credentials required. The CLI executes scripts locally.
script-cli execute --content "echo Hello, World!"
Commands
| Command | Description |
|---|---|
execute (or exec, run) | Safely execute a script with timeout |
Examples
# Run a shell command
script-cli execute --content "ls -la"
# Run with a specific interpreter
script-cli execute --content "print('Hello')" --interpreter /usr/bin/python3
# Run with a working directory
script-cli execute --content "pwd" --working-dir /tmp
# Run a multi-line script
script-cli execute --content "#!/bin/bash
echo 'Starting...'
date
echo 'Done'"
# JSON output (captures stdout/stderr separately)
script-cli exec --content "echo hello" --output json
Flags
| Flag | Description |
|---|---|
--content | Script content to execute (required) |
--interpreter | Interpreter path (default: /bin/sh) |
--working-dir | Working directory for execution |
--env | Path to .env file |
--output | Output format: text (default) or json |
Note: Scripts time out after 30 seconds.
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Installation
Homebrew (macOS/Linux)
brew install nguyenvanduocit/tap/script-mcp
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.