Execute shell commands without permission prompts.
A simple MCP (Model Context Protocol) server that enables Claude to execute shell commands without permission prompts.
⚠️ Security Warning: This server executes arbitrary shell commands. Use with caution and only in trusted environments.
# Install globally
npm install -g bash-mcp
# Or use with npx
npx bash-mcp
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"bash": {
"command": "npx",
"args": ["bash-mcp"]
}
}
}
bash-mcp
run
- Execute a command// Simple command
run("ls -la")
// With working directory
run("npm test", { cwd: "/path/to/project" })
// With timeout (milliseconds)
run("long-running-command", { timeout: 60000 })
run_background
- Start a background process// Start a dev server
run_background("npm run dev", "frontend")
// Start backend service with working directory
run_background("./gradlew bootRun", "backend", { cwd: "./backend" })
kill_background
- Stop a background processkill_background("frontend")
list_background
- List all background processeslist_background()
User: Start the development servers
Assistant: I'll start both frontend and backend servers for you.
[Uses run_background tool]
Started frontend server (PID: 12345)
Started backend server (PID: 12346)
User: Check if they're running
Assistant: [Uses list_background tool]
Both servers are running successfully!
All tools return JSON formatted responses:
{
"success": true,
"stdout": "command output",
"stderr": "error output if any",
"command": "executed command"
}
For background processes:
{
"success": true,
"name": "frontend",
"pid": 12345,
"command": "npm run dev",
"message": "Started background process 'frontend' (PID: 12345)"
}
BASH_MCP_MAX_OUTPUT_SIZE
: Maximum output size in bytes before truncation (default: 51200/50KB)BASH_MCP_TEMP_DIR
: Directory for storing full output when truncated (default: system temp directory){
"mcpServers": {
"bash": {
"command": "npx",
"args": ["bash-mcp"],
"env": {
"BASH_MCP_MAX_OUTPUT_SIZE": "102400",
"BASH_MCP_TEMP_DIR": "/tmp/bash-mcp-outputs"
}
}
}
}
When command output exceeds BASH_MCP_MAX_OUTPUT_SIZE
:
This MCP server executes arbitrary shell commands with the same privileges as the Node.js process. Only use in development environments or trusted contexts.
MIT
tinywind tinywind0@gmail.com
Issues and pull requests are welcome at GitHub.
Execute shell commands with structured output via a powerful CLI server.
An interactive task loop server for Cursor IDE, designed to perform task-based operations for modern web application development.
A command-line interface wrapper for the Google Gemini API, enabling interaction with Gemini's Search and Chat tools.
A powerful and flexible MCP server designed to enhance the development experience with Shadcn UI components, providing tools for component management, documentation, and installation.
Orchestration tool for managing multiple MCP servers with a Docker Compose-style interface and a unified HTTP proxy.
Interact with Binalyze AIR's digital forensics and incident response capabilities using natural language.
An MCP server and client implementation for EdgeOne Pages Functions, supporting OpenAI-formatted requests.
AI-powered SVG animation generator that transforms static files into animated SVG components using the Allyson platform
A code observability MCP enabling dynamic code analysis based on OTEL/APM data to assist in code reviews, issues identification and fix, highlighting risky code etc.
An MCP server for interacting with the Tatara blockchain ecosystem. Requires configuration for the Tatara RPC endpoint and a wallet private key.