Cross-platform MCP server for managing long-lived background processes from any MCP client
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A lightweight, cross-platform MCP server for managing background processes. Built in Go for single-binary distribution with zero runtime dependencies.
AI coding agents (Claude Code, Gemini CLI, Cursor, etc.) lack the ability to run long-lived processes while continuing to interact with them. Common workflows affected:
mcp-sidecar solves this by exposing process lifecycle management as MCP tools over stdio transport.
maxBytes and global SIDECAR_MAX_OUTPUT_SIZE to cap output returned to the LLMThe fastest way to install mcp-sidecar into any supported coding agent:
Supported agents: Claude Code, Codex, Cursor, VS Code, Gemini CLI, OpenCode, Zed, Goose, Cline, and more. See add-mcp for the full list.
Claude Code:
opencode (~/.config/opencode/opencode.json):
Generic (mcp.json):
Pre-built binaries are also available on GitHub Releases for windows/amd64, linux/amd64, darwin/arm64, and darwin/amd64.
| Tool | Description | Parameters | Returns |
|---|---|---|---|
start | Spawn a background process | command, name?, cwd?, env? | { id, name, pid } |
stop | Terminate a process (graceful, then force) | id | { id, exitCode, uptime } |
list | List all managed processes | -- | [{ id, name, pid, state, uptime }] |
output | Get buffered stdout/stderr | id, tail?, maxBytes? | { stdout, stderr, uptime } |
send | Write to a process's stdin | id, input | { ok } |
status | Get detailed state of one process | id | { id, name, pid, state, exitCode, uptime, outputSize } |
The uptime field reflects actual runtime: for running processes it's the time since start; for exited processes it's the time the process was alive (not the time since start).
The output tool's maxBytes parameter caps the total bytes of stdout+stderr combined. When both tail and maxBytes are provided, tail selects lines first, then maxBytes caps the byte size of the result. When the output exceeds the limit, the most recent content is kept and stderr is prioritized. Truncation preserves line boundaries. When output is truncated, the response includes "truncated": true and "totalBytes" indicating the original size.
| State | Meaning |
|---|---|
running | Process is alive |
exited | Process terminated normally |
failed | Process terminated with non-zero exit code |
killed | Process was stopped via the stop tool |
A typical session where an agent starts an API server, waits for it to be ready, tests it, and tears it down:
The agent uses its native shell for short-lived commands (curl, build tools, etc.) and mcp-sidecar for processes that need to stay alive across multiple tool calls.
All configuration is via environment variables (all optional):
| Variable | Default | Description |
|---|---|---|
SIDECAR_MAX_PROCESSES | 10 | Maximum concurrent processes |
SIDECAR_BUFFER_SIZE | 1048576 (1MB) | Output buffer size per process in bytes |
SIDECAR_KILL_TIMEOUT | 5000 | Milliseconds to wait between SIGTERM and SIGKILL |
SIDECAR_CLEANUP_AFTER | 1800 (30 min) | Seconds before exited processes are auto-removed. 0 = disabled |
SIDECAR_MAX_OUTPUT_SIZE | 0 (unlimited) | Global cap on bytes returned by the output tool. 0 = no limit |
SIDECAR_ALLOWED_EXECUTABLES | -- | Comma-separated allowlist of executables (enables secure mode) |
SIDECAR_BLOCKED_PATTERNS | -- | Comma-separated regex patterns to reject commands |
SIDECAR_AUDIT_LOG | -- | Audit log directory, or true (cwd) / temp (OS temp dir) |
Auto-cleanup note: When SIDECAR_CLEANUP_AFTER is enabled (the default), exited processes are removed from the manager after the TTL expires. Once removed, calls to output, status, or stop for that process ID will return "not found". Retrieve any output you need within the TTL window (30 minutes by default).
When SIDECAR_ALLOWED_EXECUTABLES is set, mcp-sidecar switches from shell mode to secure mode:
| Shell mode (default) | Secure mode | |
|---|---|---|
| Execution | Via sh -c / cmd /C | Direct exec (no shell) |
| Allowlist | None | Only listed executables can run |
| Metacharacters | Allowed (shell interprets them) | Rejected (|, &, ;, >, <, $, `, (, )) |
| Blocked patterns | None | Regex patterns matched against full command |
| Audit logging | None | Optional JSONL log of all start/stop/blocked events |
Metacharacters inside quotes are allowed -- grep "error|warning" file.txt works because the | is inside double quotes and won't be interpreted by a shell.
Backslash (\) is intentionally not treated as a metacharacter so Windows paths like C:\Users\me\app.exe work without escaping.
Claude Desktop / Cursor (mcp.json):
Claude Code:
The audit log is always written to a file named sidecar-audit.jsonl inside the configured directory. The SIDECAR_AUDIT_LOG variable controls where:
| Value | Log file location |
|---|---|
true | ./sidecar-audit.jsonl (current working directory) |
temp | <OS temp dir>/sidecar-audit.jsonl |
./logs | ./logs/sidecar-audit.jsonl (directory auto-created) |
Each line is a JSON object with one of three event types:
The allowlist supports three matching modes:
| Allowlist entry | Matches |
|---|---|
dotnet | dotnet anywhere (basename match) |
./build.sh | Only ./build.sh (exact match) |
/usr/bin/python3 | Only /usr/bin/python3, or any python3 resolved via PATH |
| Channel | Usage |
|---|---|
| npm | npx -y mcp-sidecar (platform binary via @mcp-sidecar/* optional packages) |
| GitHub Releases | Pre-built binaries attached to each release |
| MCP Registry | io.github.lsequeiraa/mcp-sidecar |
MIT
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-sidecar)<a href="https://allmcps.com/mcp/mcp-sidecar"><img src="https://allmcps.com/api/badge/mcp-sidecar?style=directory" alt="MCP Sidecar on AllMCPs" /></a>