amazon-quick-exec-mcp
Integrates with Amazon Quick to provide a real local shell outside its normal sandbox. It exposes tools for synchronous and background command execution, streaming/job monitoring, waiting on or killing entire process trees, inspecting runtime identity/config/paths, passing stdin/env/cwd/timeouts, truncating large outputs safely, and writing an audit log.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@amazon-quick-exec-mcp run whoami and hostname to confirm I'm outside the sandbox"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
amazon-quick-exec-mcp — a real shell for Amazon Quick
Amazon Quick's built-in agent tools (run_python, ripgrep, and friends) execute
inside quickwork-sandbox: they cannot reach localhost and cannot see most of
your filesystem. Local MCP servers are different — Quick launches them as ordinary
child processes of the desktop app, outside that sandbox.
So this server runs commands on the real machine, as you. Sync execution, background jobs, process-tree cleanup, an audit log, and a narrow guard against the handful of commands nobody means to run.
Commands go through a login shell (zsh -lc), so PATH matches Terminal. That
matters more than it sounds: anything installed under ~/.local/bin,
~/.toolbox/bin, or by a version manager only exists once the profile is sourced.
Install
git clone <this repo> && cd quick-exec-mcp
uv sync # create the venv
./.venv/bin/python test_exec_mcp.py # 70 checks over real MCP stdio
python install.py install # register with QuickThen in Quick: Settings → Capabilities → Connectors → Local Shell (exec) →
Refresh. Ask it call shell_info as a first message — it reports the user, host
and PATH your commands actually get, which is how you confirm you are outside
the sandbox.
Requires Python 3.10+ and uv. install.py is
stdlib-only, so it runs with any python3.
python install.py status what Quick currently has registered
python install.py install add this server, enabled
python install.py disable keep the entry, turn it off
python install.py enable turn it back on
python install.py uninstall remove the entryIt edits the active profile's mcp_config.json — the same file the Connectors UI
writes — and backs it up to mcp_config.json.bak before every write. A reinstall
preserves secret:// references and any env you set by hand. See
docs/how-quick-loads-mcp.md for the file layout,
the schema, and the gotchas that cost the most time.
Related MCP server: permission-aware-mcp
Tools
Tool | What it does |
| Run and wait. Returns |
| Run in the background, returns a |
| Snapshot of a job's output so far. Safe to call repeatedly |
| Block until a job exits, then return its output. Beats polling |
| Kill a job and its whole process tree |
| Every job started this session, running and finished |
| Configuration plus a live |
shell_execute takes cwd (defaults to $HOME, ~ expands), timeout
(default 120s), stdin, and env (merged over the inherited environment).
Configuration
Set these in the env block of the exec entry in Quick's mcp_config.json.
Variable | Default | Meaning |
|
| Which shell to use |
|
|
|
|
| Working directory when |
|
| Default timeout, seconds |
|
| Ceiling on the |
|
| Per-stream output cap, roughly 15k tokens |
|
| Seconds to keep draining the pipes after the child exits |
|
| Finished jobs retained before the oldest are dropped |
|
| Audit log path |
|
|
|
| unset |
|
Audit log
Every command appends one JSON line to ~/.quick-exec-mcp/audit.jsonl — time,
command, cwd, exit code, duration — and refusals are logged too. This is how you
find out what Quick actually ran on your machine.
tail -20 ~/.quick-exec-mcp/audit.jsonl | jq -c '[.ts, .kind, .exit_code, .command]'Command guard
Refused by default (QUICK_EXEC_ALLOW_DANGEROUS=1 disables it):
recursive delete of
/,$HOME,/System,/Applications,/usr, and peersmkfs*,diskutil eraseDisk/reformat/partitionDisk,dd of=/dev/disk*fork bombs
shutdown/reboot/haltin command positioncsrutil disable,spctl --master-disable(turning off SIP / Gatekeeper)
Patterns are matched against the command both verbatim and with quotes stripped,
because rm -rf "$HOME" is how a model writes that as often as not. They stay
deliberately narrow, so ordinary work goes through: rm -rf on a specific
directory is allowed, rm -rf "$HOME/project" is allowed, and so is
grep shutdown /etc/hosts — shutdown there is an argument, not a command.
This guards against a model slipping, not against malice. It is pattern
matching, so any indirection ($(echo rm) -rf /) defeats it, and anyone who can
reach this server can already run anything you can.
Behaviour worth knowing
Timeouts kill the whole process tree. Children run in their own process group (
start_new_session=True); on timeout the group gets SIGTERM then SIGKILL, so a timed-outnpm installleaves no orphans. Output produced before the timeout is kept, withtimed_out: true.timeoutis a real bound, even against a process that escapes. Anything that callssetsid— a daemon, mostly — leaves the process group, survives the kill, and keeps the inherited stdout pipe open. Waiting for end-of-file on that pipe would hang the call forever and make the connector look dead, so the drain gets its ownQUICK_EXEC_READER_GRACEbudget and the reply comes back withoutput_incomplete: true. Expect roughlytimeout + 5sin that case: SIGTERM, the escalation to SIGKILL, then the grace period.timeout: 0or a negative value means "use the default", not "give up immediately".Truncation keeps the head and the tail. Over the cap, the first third and last two thirds survive with a note about how many bytes went missing in between. A failing build puts the useful part at the end; keeping only the head would discard exactly what you need.
stdout and stderr come back separately, never interleaved.
Interactive pagers are disabled via
PAGER=cat,GIT_PAGER=cat,TERM=dumb,NO_COLOR=1, sogit logcannot hang inlessor return a wall of ANSI escapes. Override any of them throughenv.
Tests
./.venv/bin/python test_exec_mcp.py70 checks driving the server over real MCP stdio — initialize,
tools/list, tools/call, the whole JSON-RPC exchange Quick makes — rather than
importing the module and calling functions. Tools that look fine in Python and
break over the wire are exactly the failure this catches. Covered: handshake, tool
schemas, login-shell PATH (compared against an actual zsh -lc), stream
separation, stdin, env overrides, invalid UTF-8, timeout with orphan detection via
pgrep, an orphan that escapes the process group entirely, head-and-tail
truncation, background job lifecycle, job pruning, and the audit log.
The destructive guard cases — rm -rf "$HOME" and friends — are asserted against
_guard() in-process, so they are never handed to a shell. A suite that sends
them to a live server and trusts a regex to stop them is one bad regex away from
deleting the home directory of whoever ran it. The one case that does go over the
wire runs with HOME pointed at a throwaway directory and then asserts that
directory is still intact, so a future regression destroys a temp dir instead.
Security
This gives Quick full shell access as your user — read and write any file you can, read credential files, call the AWS CLI, push code, make network requests. Bypassing the sandbox is the point of it, not a bug.
Leave Quick's
global_defaulttool permission onpromptso calls are confirmed before they run.Read
~/.quick-exec-mcp/audit.jsonlnow and then.Do not register this on a machine or client you do not trust.
Keep credentials out of the config file; Quick's secret store (
secret://) exists for that, and a reinstall preserves those references.
License
MIT — see LICENSE.
Available Tools
7 toolsshell_executeA
Run a shell command on this Mac and wait for it to finish.
Runs through a login shell, so pipes, globs, redirects, &&, $VARS, heredocs and shell functions all work — pass the command exactly as you would type it in Terminal. Use this for anything that finishes within the timeout.
For work that outlives the timeout (builds, installs, dev servers) use shell_start instead.
Args: command: Shell command line, e.g. "ls -la ~/Documents | head -20". cwd: Working directory. Defaults to the user's home. ~ is expanded. timeout: Seconds before the process tree is killed. Default 120, max 3600. Zero or negative means "use the default", not "give up immediately". stdin: Text piped to the command's stdin. env: Extra environment variables, merged over the inherited environment.
Returns: exit_code, stdout, stderr, duration_s, cwd, timed_out, and stdout_truncated / stderr_truncated flags.
Inputs: command (required), cwd, env, stdin, +1 more.
shell_infoA
Report how this server is configured and what environment commands see.
Worth calling first in a session: it proves the server is running on the real host as the real user rather than inside Quick's sandbox.
Inputs: no named parameters.
shell_job_killA
Kill a background job and its whole process tree.
Args: job_id: Id returned by shell_start.
Inputs: job_id (required).
shell_job_outputA
Read the output captured so far from a background job.
Safe to call repeatedly while the job runs — it returns a snapshot and does not consume the buffer.
Args: job_id: Id returned by shell_start. tail_lines: Return only the last N lines of each stream. 0 means all.
Returns: running, exit_code (null while running), stdout, stderr, elapsed_s.
Inputs: job_id (required), tail_lines.
shell_job_waitA
Block until a background job exits, then return its output.
Cheaper and more reliable than polling shell_job_output in a loop. If the
timeout expires the job keeps running and running comes back true — call
again or kill it.
Args: job_id: Id returned by shell_start. timeout: Max seconds to wait. The job is NOT killed on timeout. tail_lines: Return only the last N lines of each stream. 0 means all.
Inputs: job_id (required), timeout, tail_lines.
shell_list_jobsB
List background jobs started this session, running and finished.
Inputs: no named parameters.
shell_startA
Start a long-running command in the background and return a job id.
Output is buffered as it arrives; read it with shell_job_output, block on it with shell_job_wait, stop it with shell_job_kill. Use this for builds, installs, test suites and dev servers that would blow shell_execute's timeout.
Args: command: Shell command line. cwd: Working directory. Defaults to the user's home. env: Extra environment variables.
Returns: job_id, pid, command, cwd.
Inputs: command (required), cwd, env.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool owns a distinct slice of the shell workflow: shell_execute for synchronous commands vs shell_start for background jobs, and the job lifecycle tools (list/output/wait/kill) are clearly separated from each other and from shell_info. Descriptions explicitly cross-reference when to use which (e.g. timeout overflow -> shell_start), leaving no realistic misselection.
Every tool uses snake_case with a consistent shell_ prefix, and the shell_job_* family groups the background-job operations predictably (start, list, output, wait, kill). No mixed conventions or vague verbs.
Seven tools is well-scoped for a shell-execution server: one synchronous path, one background-job lifecycle, plus a configuration probe. No tool feels redundant or padding.
The surface covers synchronous execution, the full background lifecycle (start, snapshot output, block, list, kill), and environment introspection — a complete operational loop. The only minor gap is no way to write new stdin to an already-running job, which agents can work around by designing the initial command.
Maintenance
Related MCP Connectors
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Scoped, audited SSH exec, sessions, and SFTP on your saved servers without exposing credentials
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Use a person's computer after they approve it there: files, Terminal, browser, local MCP.
Related MCP Servers
- FlicenseBqualityNot gradedmaintenanceProvides unrestricted access to your development environment with filesystem operations and shell command execution capabilities, including sudo support for local development machines.49-
- FlicenseAqualityDmaintenanceEnables secure file system operations (read, write, delete) and simulated command execution with server-enforced permission policies, risk assessment, and human-in-the-loop approval.5-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to execute shell commands on a host macOS computer with configurable file access permissions, granting access to credentials and tools while enforcing sandbox restrictions.MIT
- AlicenseNot gradedqualityCmaintenanceEnables running shell commands on hosts where OS-level sandboxing is unavailable, with policy checks that block obviously destructive operations and protected-path writes, plus an append-only audit trail.MIT