Bash MCP服务器
AI代理的Shell命令执行。基于 Claude Code的Bash工具设计.
设置
使用工具CLI
从安装CLIhttps://github.com/zerocore-ai/tool-cli
# Install from tool.store
tool install library/bash# View available tools
tool info library/bash# Execute a command
tool call library/bash -m exec -p command="echo hello"# Run a command with timeout
tool call library/bash -m exec -p command="sleep 5" -p timeout_ms=10000工具
exec
执行shell命令并返回其输出。
输入:
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
command | string | Yes | 要执行的shell命令 |
description | string | 否 | 命令功能的简短描述(5-10个单词) |
timeout_ms | integer | 否 | 超时(毫秒)(默认值:120000,最大值:600000) |
working_directory | string | 否 | 命令执行的工作目录 |
输出:
| 字段 | 类型 | 描述 |
|---|---|---|
stdout | string | 命令的标准输出 |
stderr | string | 命令中的标准错误 |
exit_code | integer | 命令的退出代码(0=成功) |
stdout_truncated | boolean | stdout是否因大小限制而被截断 |
stderr_truncated | boolean | stderr是否因大小限制而被截断 |
duration_ms | integer | 实际执行持续时间(毫秒) |
许可证
阿帕奇-2.0
