Back to MCP directory
publicPublicdnsLocal runtime

PermShell

一个通过通知确认权限的Shell命令执行MCP服务

article

README

🚀 壳权限 MCP 服务器

本项目是一个基于模型上下文协议 (MCP) 的服务器,主要用于带有权限通知的壳命令执行。它能有效解决在执行壳命令时的权限管理问题,为用户提供更安全、标准化的命令执行环境。

🚀 快速开始

本服务器可让你在执行壳命令时进行权限管理。以下是快速搭建和使用该服务器的步骤。

✨ 主要特性

  • 📢 通过 -growl 通知执行带显式权限的壳命令。
  • 🛠️ 搭建在模型上下文协议上,实现标准化大语言模型工具。
  • 🔒 多重保护措施防止未经授权的命令执行。
  • 👀 权限对话框透明显示将要执行的具体命令。

📦 安装指南

# 克隆仓库
git clone https://github.com/yourusername/perm-shell-mcp.git
cd perm-shell-mcp

# 安装依赖项
npm install

# 构建项目
npm run build

💻 使用示例

基础用法

作为独立工具运行

# 直接启动服务器
npm start

集成到 Claude Desktop

在你的 Claude Desktop 配置文件中添加以下内容:

{
  "mcpServers": {
    "permshell": {
      "command": "node",
      "args": ["/path/to/perm-shell-mcp/dist/index.js"]
    }
  }
}

高级用法

可用工具

execute-command

带权限执行壳命令。 示例:

你能列出我的主目录中的文件吗?
system-info

获取系统信息,包括操作系统、运行时间、内存、磁盘和 CPU 详情。 示例:

我的系统信息是什么?

⚠️ 重要提示

  • 所有命令都需要通过桌面通知明确授权。
  • 显示工作目录以实现完全透明。
  • 超时限制防止进程无限制运行。
  • 输入净化防止命令注入攻击。

📚 详细文档

开发指南

# 开发模式下运行
npm run dev
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client