mcp-task-runner
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-task-runner
An MCP server that lets an AI assistant run and schedule shell tasks safely.
Every command is checked against an allow-list + deny-list before execution, runs
with shell=False (no shell injection), and is killed if it exceeds a timeout.
┌────────────┐ register_task / run_task ┌────────────────────┐
│ MCP Client │ ─────────────────────────▶ │ task-runner │
│ (assistant)│ ◀───────────────────────── │ (FastMCP) │
└────────────┘ stdout / rc / status └─────────┬──────────┘
│
┌────────────────────────────┼──────────────────────┐
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ security │ ─pass─▶ │ runner │ ─────▶ │ schedule │
│ allow/deny │ │ subprocess │ │ 30s/5m/1h.. │
└──────────────┘ │ + timeout │ └──────────────┘
└──────────────┘Why this exists
Giving an LLM the ability to run shell commands is powerful but dangerous.
mcp-task-runner adds a policy layer: only vetted binaries run, shell
metacharacters can't inject, and nothing runs forever. The assistant gets a
controlled "remote hands" without a foot-gun.
Related MCP server: Remote Server MCP
Safety model
Control | Mechanism |
Binary allow-list | Only known-safe binaries ( |
Deny-list |
|
No shell | Executed as an argv list with |
Timeout | Wall-clock cap kills runaway processes |
Fail-fast | Bad commands rejected at registration time |
Features
Register named tasks once, run them by name
Per-task result history (
last(),history)Schedule expressions:
30s,5m,2h,1d100% offline-testable core (execution is injectable)
Install
pip install -r requirements.txtUse as an MCP server
python -m mcp_task_runner.serverTools:
register_task(name, command)— validate + store a taskrun_task_by_name(name, timeout?)— execute, return stdout/rcparse_schedule(expr)— validate5m/1h/…
Use the engine directly
from mcp_task_runner.runner import TaskRunner
runner = TaskRunner()
runner.register("ping_gw", "ping -n 1 8.8.8.8") # rejects unknown binary
runner.register("build", "python -m pytest") # ok
res = runner.run("build")
print(res.ok, res.stdout)Verified invariants
rm -rf /,sudo ls,curl …⇒ rejected before executioninjected
echo ok ; rm -rf /⇒ rejected (denylist token)unknown binary ⇒ rejected
next_fire(None)fires immediately; afterwardslast + interval
Project layout
mcp-task-runner/
├── mcp_task_runner/
│ ├── __init__.py
│ ├── security.py # allow/deny validation
│ ├── runner.py # safe subprocess execution + registry
│ ├── schedule.py # interval / cron-like parsing
│ └── server.py # MCP/FastMCP adapter
├── tests/test_runner.py
├── conftest.py
├── requirements.txt
├── README.md
├── LICENSE
└── .gitignoreLicense
MIT © wzx11223344
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for generating rough-draft project plans from natural-language prompts.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseBqualityBmaintenanceA secure MCP server for shell operations, terminal management, and process control, enabling AI assistants to safely execute commands and manage interactive sessions.13137 npm6MIT
- AlicenseNot gradedqualityFmaintenanceA security-first MCP server that gives AI assistants controlled, safe access to manage remote servers via SSH with whitelisted operations and no generic command execution.MIT
- AlicenseNot gradedqualityFmaintenanceMCP server that allows AI coding assistants to schedule deferred tasks such as reminders, shell commands, and AI prompts, executing them as an OS daemon.11 npmMIT
- AlicenseAqualityDmaintenanceAn MCP server that enables AI clients to execute shell, Python, and Node commands on the local machine across platforms.31MIT