# Shell Exec

Gives your agent two tools: run a bash command, check on a background job. Handy for builds, file searches and long-running servers.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 9
- Author: domdomegg
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/domdomegg/shell-exec-mcp
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/mcp/shell-exec

## What it does

Shell Exec is an MCP server that hands the agent a shell. It exposes two tools. `execute` runs a bash command, with an optional timeout and a background mode. `get_job_status` reports on a job you started earlier.

What goes through `execute`: build steps like `npm run build` or `make`, file work with `find`, `grep`, `mv`, `rm`, `mkdir -p`, `stat`, and system checks such as `df -h`, `ps aux`, `env`. Background mode is the reason to pick this one — a dev server or a file watcher starts without blocking the conversation, and you poll it later.

It runs via `npx -y shell-exec-mcp`, so Node.js and npm have to be present. One thing to weigh: the agent gets arbitrary command execution in your shell, not a sandbox. If your environment variables hold secrets, sort out permissions and isolation first.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `MCP_TRANSPORT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env MCP_TRANSPORT=<MCP_TRANSPORT> --transport stdio shell-exec -- npx -y shell-exec-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add shell-exec --env MCP_TRANSPORT=<MCP_TRANSPORT> -- npx -y shell-exec-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "shell-exec": {
            "command": "npx",
            "args": [
                "-y",
                "shell-exec-mcp"
            ],
            "env": {
                "MCP_TRANSPORT": "<MCP_TRANSPORT>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "shell-exec": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "shell-exec-mcp"
            ],
            "env": {
                "MCP_TRANSPORT": "<MCP_TRANSPORT>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MCP_TRANSPORT=<MCP_TRANSPORT> shell-exec npx -y shell-exec-mcp
```
Replace <…> with your own values

## When to use it
- run a build and pull the output back into the chat
- locate files by pattern with `find` and `grep`
- start a dev server in the background and check it later
- inspect disk usage and running processes
- move or delete files straight from the agent

## Example prompts
- Run `npm run build` and show me where it fails
- Start `npm run dev` in the background, then check the job status
- Grep the `src` folder for every `TODO`

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
