Shell Exec MCP
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., "@Shell Exec MCPrun 'find . -name *.log' to list all log files"
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.
shell-exec-mcp
MCP server for executing bash commands with background job support.
Use Cases
Run build commands: Execute npm run build, make, or other build tools and get the output.
File operations: Use find, grep, mv, rm, mkdir -p, stat etc. for file management.
Long-running tasks: Start servers or watch processes in background mode, check on them later.
System info: Run df -h, ps aux, env etc. to inspect the system state.
Related MCP server: Run Command MCP Server
Setup
Follow the instructions on install-mcp, which generates the right config for your MCP client (Claude Code, Claude Desktop, Cursor, Cline, VS Code, and more).
Tools
Tool | Description |
| Run a bash command (with optional timeout and background mode) |
| Check status of a background job |
Contributing
Pull requests are welcomed on GitHub! To get started:
Install Git and Node.js
Clone the repository
Install dependencies with
npm installRun
npm run testto run testsBuild with
npm run build
Releases
Versions follow the semantic versioning spec.
To release:
Use
npm version <major | minor | patch>to bump the versionRun
git push --follow-tagsto push with tagsWait for GitHub Actions to publish to the NPM registry.
Available Tools
2 toolsexecuteExecuteA
Run a command in bash.
Returns stdout, stderr, and exit code. Default timeout is 5 seconds.
For long-running commands, set 'background: true' to run in background and get a job ID. Then use get_status to check on it.
Tips:
Use background mode for commands that take more than a few seconds
For file searches, use 'find' or 'grep'
For file operations, use 'mv', 'rm', 'mkdir -p', 'stat' etc.
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The bash command to run | |
| background | No | Run in background and return job ID | |
| timeout_ms | No | Timeout in milliseconds (default: 5000) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose real behavior: it returns stdout, stderr, and exit code, defaults to a 5-second timeout, and background mode yields a job ID. It omits safety-relevant context such as sandboxing, working directory, and side effects, which matters for arbitrary command execution.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core purpose and return contract are front-loaded in the first two lines, with secondary detail in a bulleted tips block. It is reasonably tight, though the shell-usage tips verge on filler for an agent that already knows bash.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema and no annotations, so the description must cover returns — and it does, naming stdout, stderr, and exit code, plus the background job-ID pattern. It is nearly complete for this tool, with only timeout-failure behavior and environment/permission scope left unspecified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents command, background, and timeout_ms. The description restates the default timeout and background job-ID behavior without adding syntax or format detail, matching the baseline of 3 when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening line 'Run a command in bash' is a specific verb+resource and is unambiguous, and the description correctly identifies the companion tool for background jobs. It falls just short of 5 because it names that sibling as 'get_status' while the actual sibling is 'get_job_status', slightly blurring the routing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives clear conditional guidance: use background mode when a command takes more than a few seconds, and use get_status to poll a backgrounded job. It stops short of explicit when-not-to-use guidance, and the find/grep and mv/rm/mkdir tips are shell advice rather than tool-selection guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_job_statusGet Job StatusA
Check status of a background job.
Returns stdout/stderr collected so far, exit code (null if still running), and whether the job is still running.
Completed jobs are cleaned up after their status is read.
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | The job ID returned from execute with background: true |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden and does meaningful work: it discloses the return payload shape (stdout/stderr so far, exit code null while running, running flag) and, critically, that completed jobs are cleaned up after their status is read — a side effect an agent must know before calling. It omits error behavior for unknown/expired IDs and any rate/polling constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, zero filler, with the core purpose front-loaded and the cleanup caveat placed last where it reads as an important aside rather than burying the primary action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description must explain return values, and it does so concisely and accurately. The remaining gap is operational: no guidance on polling cadence, timeout/waiting behavior, or what happens when the job ID is unknown or already cleaned up.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and the single `jobId` parameter is fully documented in the schema, including that it comes from `execute` with `background: true`. The description adds no parameter-level meaning beyond that, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb+resource: 'Check status of a background job', with a clear object (job status) that is distinct from the sibling `execute`. However, the description never names `execute` or explicitly ties itself to jobs launched with `background: true`, so the sibling relationship is only inferable from the schema's param description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied rather than stated: an agent can infer this is used after starting a background job via `execute`, but there is no explicit when-to-use, when-not-to-use, or polling guidance. No alternatives are named or excluded.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v1.2.0- First observed
execute - First observed
get_job_status
TDQS
Scored across 2 tools
The two tools have largely distinct purposes: execute runs commands while get_job_status polls background jobs. However, the execute description refers to 'get_status' while the actual tool is named 'get_job_status', which could cause an agent to call a non-existent tool.
The set mixes a bare verb ('execute') with a verb_noun pattern ('get_job_status'), and the description further muddies this by referencing a third name ('get_status'). It is still readable but not a predictable pattern.
Two tools is minimal but reasonably matched to the narrow shell-execution scope, since running a command and checking job status are the two essential operations. It sits just under the typical 3-15 range.
Running commands and polling background jobs are covered, but there is no way to kill or cancel a long-running job, nor to list active jobs. These are notable gaps for a process-execution server where runaway commands are a common failure mode.
Maintenance
Related MCP Connectors
I run shell commands on your private cloud environment (bash, sh, zsh)
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables safe execution of system shell commands with real-time streaming output and rich metadata capture. Provides configurable command execution with timeout controls, environment management, and extensible plugin architecture for monitoring command lifecycles.4-
- AlicenseNot gradedqualityDmaintenanceProvides tools for executing shell commands both synchronously and asynchronously with real-time output streaming and process management capabilities. It enables users to start background tasks, monitor progress, and manage long-running processes via Stdio or HTTP transports.402 npmMIT
- AlicenseAqualityFmaintenanceEnables executing shell commands without permission prompts, including running commands and managing background processes.4226 npm11MIT
- FlicenseNot gradedqualityDmaintenanceEnables Open WebUI to execute bash commands for coding tasks in a persistent projects workspace, with configurable timeouts and output limits.-