script-runner

script-runner

Remote MCP server that launches user-supplied scripts inside disposable Docker containers, returning task IDs for async tracking and bounded output tails.

Category
Visit Server

README

script-runner

Remote MCP server that launches user-supplied scripts inside disposable Docker containers and tracks them asynchronously.

An AI client submits a base64 one-liner (plus an optional base64 zip of source files) and a runtime. The call returns a task_id immediately; the script runs in a separate worker. The client polls for status and gets bounded stdout/stderr tails so results never overflow its context window.

Runtimes

value image
node24 node:24-slim
python3.8 python:3.8-slim
python3.13 python:3.13-slim

The one-liner runs in /workspace, where the zip (if any) is extracted.

Transport & auth

Stateless MCP Streamable HTTP at POST /mcp. Every request must carry Authorization: Bearer <SCRIPT_RUNNER_TOKEN>. GET /healthz is open.

Tools

  • run_script — { runtime, command_base64, zip_base64?, timeout_seconds? } → { task_id }. Enqueues and returns instantly. timeout_seconds defaults to 300 (server-capped).
  • get_task_status — { task_id, tail_bytes? } → { state, exit_code, reason, runtime_seconds, seconds_since_last_output, stdout_tail, stderr_tail, ... }. state ∈ queued | running | succeeded | failed | killed | timed-out. Use seconds_since_last_output to detect a stuck task; *_truncated flags mark clipped tails.
  • kill_task — { task_id } → stops a queued or running task.

Safety & limits

Each task runs in its own container: CapDrop: ALL, no-new-privileges, memory / CPU / PID caps, and an isolated bridge network (internet reachable, app not). Hard wall-clock timeouts kill runaways; a reaper enforces timeouts and GCs old task dirs; on restart, in-flight tasks are marked killed and orphan containers removed.

Local development

npm install
cp .env.example .env      # set SCRIPT_RUNNER_TOKEN, e.g. openssl rand -hex 32
export TASKS_DIR=$PWD/tasks-data
npm run dev               # requires a local Docker daemon

npm run typecheck runs tsc --noEmit.

Deployment

A Linux host behind Caddy (automatic TLS). One-time: deploy/setup-host.sh. Each push to main triggers .github/workflows/deploy.yml, which SSHes in and runs deploy/deploy.sh (git reset --hard origin/main + docker compose up -d --build). The bearer token lives only in the host's .env.

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