Bash MCP Server
English
A Model Context Protocol (MCP) server that enables execution of bash commands on the host machine.
Features
- Execute arbitrary bash commands
- Configurable working directory
- Command timeout support
- Returns stdout, stderr, and exit code
Installation
Using pip
From source
Configuration
Add to your Claude Desktop configuration:
Usage
The server provides an execute_command
tool with the following parameters:
command
(required): Bash command to executecwd
(optional): Working directory for command executiontimeout
(optional): Command timeout in seconds (default: 30)
Example Request
Example Response
Security Warning
⚠️ WARNING: This MCP server can execute arbitrary system commands. Use with caution:
- Only use in trusted environments
- Be careful with commands that could damage your system
- Consider implementing access controls
Development
Requirements
- Python >= 3.8
- mcp >= 0.1.0
- pydantic >= 2.0.0
Local Development
License
MIT License
中文
一个用于在宿主机上执行 bash 命令的 MCP(Model Context Protocol)服务器。
功能特性
- 执行任意 bash 命令
- 支持指定工作目录
- 可配置命令超时时间
- 返回标准输出、标准错误和执行状态
安装
使用 pip
从源码安装
配置
在 Claude Desktop 的配置文件中添加:
使用示例
MCP 服务器提供了一个 execute_command
工具,支持以下参数:
command
(必需): 要执行的 bash 命令cwd
(可选): 工作目录timeout
(可选): 超时时间(秒),默认 30 秒
示例请求
示例响应
安全注意事项
⚠️ 警告: 此 MCP 服务器可以执行任意系统命令,请谨慎使用:
- 仅在受信任的环境中使用
- 避免执行可能造成系统损坏的命令
- 建议配置适当的权限和访问控制
开发
依赖项
- Python >= 3.8
- mcp >= 0.1.0
- pydantic >= 2.0.0
本地开发
许可证
MIT License
This server cannot be installed
An MCP server that enables Claude to execute bash commands on the host machine with configurable working directories and timeouts.
Related MCP Servers
- AsecurityAlicenseAqualityThis MCP server enables users to execute shell commands in the current iTerm2 session through integration with Claude Desktop, facilitating seamless command execution via the Model Context Protocol.Last updated -3514296TypeScriptMIT License
- AsecurityAlicenseAqualityAllows Claude desktop app to execute terminal commands and edit files on your computer through MCP, with features including command execution, process management, and diff-based file editing.Last updated -197,0403,572JavaScriptMIT License
- -securityFlicense-qualityAn MCP server that allows AI assistants like Claude to execute terminal commands on the user's computer and return the output, functioning like a terminal through AI.Last updated -38Python
- -security-license-qualityA server built with mcp-framework that allows users to extend Claude's capabilities by adding custom tools that can be used through the Claude Desktop client.Last updated -TypeScript