Skip to main content

An MCP server that lets AI agents run long jobs in the background and collect results later

Project description

backburner

Put your AI agent's slow work on the back burner. Keep cooking.

backburner is an MCP server that gives any AI assistant (Claude, and any other MCP client) the ability to run long shell commands as background tasks — start a test suite, a build, a scrape, a batch job — then keep working and check back for the results, instead of sitting frozen until it finishes.

agent: start_task("pytest -q")        ->  { task_id: "a1b2c3d4", status: "working" }
        ... agent does other useful work ...
agent: task_status("a1b2c3d4")        ->  { status: "completed", duration_seconds: 312 }
agent: task_result("a1b2c3d4")        ->  { output: "418 passed in 311.2s" }

Why

AI agents are bad at waiting. A tool call that takes 10 minutes blocks the whole conversation — or times out and loses the work entirely. The MCP specification is formalizing a Tasks pattern for exactly this problem (extension finalized in the 2026-07-28 spec release); backburner brings that workflow to every client today via plain tools, with first-class Tasks-extension support on the roadmap.

Tools

Tool What it does
start_task(command, cwd?, timeout_seconds?) Run a shell command in the background, returns a task id immediately
task_status(task_id) working / completed / failed / cancelled / timed_out / interrupted
task_result(task_id, tail_lines?) Captured output — works mid-run too, so you can peek at progress
cancel_task(task_id) Kill the task and its whole process tree
list_tasks(limit?) Recent tasks, newest first

Features

  • Survives restarts — tasks are tracked in SQLite under ~/.backburner/; output is captured to per-task log files. If the server dies mid-task, orphaned tasks are honestly marked interrupted, never silently lost.

  • Real cancellation — kills the full process tree (worker processes included), on Windows and Unix.

  • Peek at live progresstask_result on a running task returns the output so far.

  • Timeouts — pass timeout_seconds and a runaway task is killed and honestly marked timed_out instead of hanging forever.

  • Command policy — restrict what the AI may run with environment variables (regexes, comma-separated; deny always wins):

    BACKBURNER_ALLOW="^pytest,^npm (test|run build)"   # only these may run
    BACKBURNER_DENY="rm -rf,shutdown,format"           # these never run
    
  • Zero infrastructure — stdlib only (SQLite, subprocess, threads). No Redis, no Celery, no Docker.

  • Tested — a pytest suite covers the full job lifecycle: completion, failure, cancellation, timeouts, crash recovery, and the command policy.

Install

pip install backburner-mcp

Claude Code

claude mcp add backburner -- python -m backburner.server

Claude Desktop / other clients

{
  "mcpServers": {
    "backburner": {
      "command": "python",
      "args": ["-m", "backburner.server"]
    }
  }
}

Security note

backburner executes the shell commands the AI sends it, with your user's permissions. That is its job — but treat it like giving your agent a terminal. Run it only with clients whose tool-use you review/approve, prefer permission modes that require confirmation for start_task, and use BACKBURNER_ALLOW / BACKBURNER_DENY to scope what may run.

Roadmap

  • Task timeouts and max-runtime limits
  • Allowlist/denylist for commands
  • MCP Tasks extension support (spec 2026-07-28) — native tasks/get, tasks/cancel alongside the plain tools
  • Structured progress reporting (parse % / step markers from output)
  • PyPI release — pip install backburner-mcp

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

backburner_mcp-0.1.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

backburner_mcp-0.1.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file backburner_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: backburner_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for backburner_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9a1fd3bb60e94fd0b2f129ff14c29cb337cc45d55c02a39f091ab84a1dfffdc5
MD5 ec447faea28855a5c52b0645fc7085b3
BLAKE2b-256 6464c223880294bb091380cd87ef95b60235b792e868aa22a4dcd87ada5aa99a

See more details on using hashes here.

File details

Details for the file backburner_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: backburner_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for backburner_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 04e05a6db58a94f5ec9bfdcdb812c85f6c0ccd7239fa76434c23ffcd4f06073f
MD5 dc462c54fb2985f8511181955410d962
BLAKE2b-256 308e7fb460a3f1891863c0fe0d5f22b5bcc425c23adb366119ed4fb572a49e44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page