Skip to main content
MCP server CX Codex

Shell Exec — Claude Code MCP server: bash commands and background jobs

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

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env MCP_TRANSPORT=<MCP_TRANSPORT> --transport stdio shell-exec -- npx -y shell-exec-mcp
Open on GitHub

What Shell Exec 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.

What it helps with

  • 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 for the agent

  • 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

How to install Shell Exec

Platform CLI

claude mcp add --env MCP_TRANSPORT=<MCP_TRANSPORT> --transport stdio shell-exec -- npx -y shell-exec-mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Shell Exec

How do I install Shell Exec in Claude Code?

Run claude mcp add shell-exec-mcp -- npx -y shell-exec-mcp. For a transport setting, use claude mcp add --env MCP_TRANSPORT=<MCP_TRANSPORT> --transport stdio shell-exec -- npx -y shell-exec-mcp.

What does Shell Exec do?

It provides the execute tool for bash commands and get_job_status for background jobs. Builds, file searches and background servers all go through those two.

Does Shell Exec need Node.js?

Yes. The server starts with npx -y shell-exec-mcp, so Node.js and npm must be installed. Commands run in your own shell, with no sandbox around them.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor