Token导航 LogoToken导航

MCP Server · 开发工具

Shell MCP Server

Secure shell command execution MCP server for Claude AI. Enables controlled shell access within specified directories.

stdio官方级别未说明来源级核验工具 0
PythonClaude开发工具Claude Desktop

快速开始

作者 / 组织
blazickjp
提供方
blazickjp
运行时
Python

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

19

仓库热度

收录来源

4 个

MCP.so

选型结论

Shell MCP Server 属于开发工具类 MCP Server,公开资料标注 0 个工具,通过stdio 本地进程接入,适配 Claude、Claude Desktop,有可以直接复制的安装命令;接入前先确认权限范围。

分类

开发工具

传输方式

stdio

认证方式

无需认证

部署方式

公开资料未说明

安装与配置

安装命令

pip install shell-mcp-server

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Python,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

🖥️ 壳牌MCP服务器

🚀 使用shell MCP Server为您的AI应用程序添加安全的shell命令执行功能!为模型上下文协议构建。

✨ 特性

  • 🔒 安全执行 -命令仅在指定目录中运行
  • 🐚 多个外壳 -支持bash、sh、cmd、powershell
  • ⏱️ 超时控制 -自动终止长时间运行的命令
  • 🌍 交叉平台的 -适用于Unix和Windows系统
  • 🛡️ 默认安全 -内置目录和shell验证

🚀 快速开始

安装

# Using pip
pip install shell-mcp-server

# Using uv (recommended)
uv pip install shell-mcp-server

🔌 Claude桌面集成

将此添加到您的Claude Desktop配置中,以启用shell命令执行:

📝 Click to view configuration

{
    "mcpServers": {
        "shell-mcp-server": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/shell-mcp-server",
                "run",
                "shell-mcp-server",
                "/path/to/allowed/dir1",
                "/path/to/allowed/dir2",
                "--shell", "bash", "/bin/bash",
                "--shell", "zsh", "/bin/zsh"
            ]
        }
    }
}

🎮 使用示例

基本文件操作

# List directory contents
result = execute_command(
    command="ls -la",
    shell="bash",
    cwd="/path/to/project"
)

# Find files by pattern
result = execute_command(
    command="find . -name '*.py'",
    shell="bash",
    cwd="/path/to/project"
)

项目管理

# Git operations
result = execute_command(
    command="git status && git diff",
    shell="bash",
    cwd="/path/to/repo"
)

# Package management
result = execute_command(
    command="pip list --outdated",
    shell="bash",
    cwd="/path/to/python/project"
)

系统信息

# Resource usage
result = execute_command(
    command="df -h && free -h",
    shell="bash",
    cwd="/path/to/dir"
)

# Process monitoring
result = execute_command(
    command="ps aux | grep python",
    shell="bash",
    cwd="/path/to/dir"
)

文件处理

# Search file content
result = execute_command(
    command="grep -r 'TODO' .",
    shell="bash",
    cwd="/path/to/project"
)

# File manipulation
result = execute_command(
    command="awk '{print $1}' data.csv | sort | uniq -c",
    shell="bash",
    cwd="/path/to/data"
)

Windows特定示例

# List processes
result = execute_command(
    command="Get-Process | Where-Object {$_.CPU -gt 10}",
    shell="powershell",
    cwd="C:\\path\\to\\dir"
)

# System information
result = execute_command(
    command="systeminfo | findstr /B /C:'OS'",
    shell="cmd",
    cwd="C:\\path\\to\\dir"
)

⚙️ 配置

使用命令行参数配置行为:

参数描述
directories📁 允许的目录列表
--shell name path🐚 外壳规格(名称和路径)

环境变量:

  • COMMAND_TIMEOUT: ⏱️ 最大执行时间(秒)(默认值:30)

🛡️ 安全功能

  • 🔐 目录隔离:命令只能在指定目录中执行
  • 🔒 壳牌控制:只允许使用已配置的shell
  • ⏰ 超时保护:所有命令都有可配置的超时
  • 🛑 路径验证:工作目录验证可防止遍历攻击
  • 👤 权限隔离:命令以与服务器进程相同的权限运行

🛠️ 发展

设置您的开发环境:

# Create and activate virtual environment
uv venv
source .venv/bin/activate

# Install development dependencies
uv pip install -e ".[test]"

# Run tests
python -m pytest

# Run tests with coverage
python -m pytest --cov=shell_mcp_server

🤝 贡献

欢迎投稿!请随意:

  • 🐛 报告错误
  • 💡 建议功能
  • 🔧 提交拉取请求
  • 📚 改进文档

📜 许可证

MIT许可证-请参阅 许可证 了解详情。

______________________________________________________________________

🌟 通过安全的Shell访问增强您的AI! 🌟

为 模型上下文协议 |由以下材料制成❤️ MCP社区

🎉 Star us on GitHub!

If you find this tool useful, consider giving it a star! It helps others discover the project.

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

developer-toolsShell命令执行Python本地部署AI工具集成跨平台支持安全执行环境

支持客户端

ClaudeClaude Desktop

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

让助手直接读代码

把仓库、提交记录和 issue 交给模型检索,补全和重构时不用来回复制文件。

在对话里跑命令

触发构建、测试和脚本,执行结果直接回到上下文,省去切终端。

接进开发流程

把 PR、CI 状态和代码审查接进助手,减少在几个工具之间跳。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已经适配 Claude、Claude Desktop,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好 Python,换机器要重新装一遍。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Shell MCP Server

MCP.so · 本页

0stdio有4 个2026-05-17
Git 838e2ec1

MCP World

12stdio有2 个2026-05-17
Markitdown MCP 2c653a5f

MCP World

1stdio有1 个2026-05-17
Context7 MCP C671e75a

MCP World

0stdio有1 个2026-05-17
Context7 831acf40

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Shell MCP Server 怎么安装?

公开资料给出的安装命令是 pip install shell-mcp-server,运行环境为 Python。装完后按客户端要求写进 MCP 配置,重启客户端生效。

Shell MCP Server 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Python;保存后完全退出客户端再打开,配置才会生效。

Shell MCP Server 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Shell MCP Server 需要 API Key 吗?

公开资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Shell MCP Server 支持哪些客户端?

公开资料标注支持 Claude、Claude Desktop;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP