Bash MCP(主控制程序)
一个 TypeScript 应用程序,允许 Claude 在安全保障措施下安全地执行 Bash 命令。该项目实现了模型上下文协议 (MCP),为 Claude 等 AI 助手执行 Bash 命令提供了一个安全的接口。
特征
在受控环境中执行 bash 命令
支持无状态和有状态(交互式)命令执行
安全保障措施:
白名单命令
白名单目录
命令验证
输出清理
交互式命令的会话管理
综合日志记录
用于 AI 集成的 MCP 服务器实现
安装
配置
配置存储在config/default.json
中。您可以自定义:
允许的命令
允许的目录
会话设置
安全设置
日志记录设置
示例配置:
用法
作为图书馆
简单命令执行
互动环节
作为 MCP 服务器
该项目包括一个 MCP 服务器实现,可与 Claude Desktop 或其他 MCP 客户端一起使用:
有关 MCP 服务器实现的详细文档,请参阅MCP.md
安全注意事项
此 MCP 在设计时充分考虑了安全性,但重要的是:
保持允许的命令和目录列表尽可能严格
定期检查并更新配置
监控日志中是否存在可疑活动
保持 MCP 及其依赖项保持最新
发展
建筑
代码检查和格式化
要检查 linting 问题:
要自动修复 linting 和格式问题:
或者手动:
测试
MCP SDK 版本
该项目使用 MCP SDK 版本 1.0.1。
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
一个 TypeScript 应用程序,允许 Claude 安全地执行具有安全保障的 bash 命令,并通过模型上下文协议提供安全的接口。
Related MCP Servers
- AsecurityAlicenseAqualityA secure shell command execution server implementing the Model Context Protocol (MCP). This server allows remote execution of whitelisted shell commands with support for stdin input.Last updated -1131MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that provides secure command-line access to Windows systems, allowing MCP clients like Claude Desktop to safely execute commands in PowerShell, CMD, and Git Bash shells with configurable security controls.Last updated -9256248MIT License
- AsecurityAlicenseAqualityA Node.js implementation of the Model Context Protocol that provides secure shell command execution capabilities, allowing AI models like Claude to run shell commands in a controlled environment with built-in security measures.Last updated -111737MIT License
- -securityFlicense-qualityA TypeScript application that allows Claude to safely execute bash commands with security safeguards including whitelisted commands, directories, and comprehensive logging.Last updated -