mcpField
S
Shell Mcp Server

Shell Mcp Server

Local
github.com/ZHAN2006Developer Tools0Updated 65w ago

About Shell Mcp Server

Shell Mcp Server is an MCP server for executing shell commands from MCP clients. It supports cmd and powershell and can be launched with npx.

Key features

  1. 01Execute shell commands
  2. 02Support for cmd and powershell
  3. 03Run through npx

Use cases

  1. 01Run shell commands from an MCP client
  2. 02Execute commands in cmd or powershell

MCP support

It acts as an MCP server that exposes shell-command execution to clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"shell-mcp-server-zhan2006": {
"command": "npx",
"args": [
"-y",
"shell-mcp-server"
]
}
}
}
Run commandnpx -y shell-mcp-server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmshell-mcp-server

Tools

1

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
commandstringYesThe Shell command string to execute, e.g.: - Windows: 'dir C:\' or 'Get-ChildItem' (PowerShell) - Unix: 'ls -la' or 'pwd'
shellenumNoSpecify the terminal type to use (Windows only): - cmd: Windows Command Prompt (default) - powershell: PowerShell terminal. Unix systems automatically use the bash terminal and ignore this parameter.cmd | powershell

Details

From the project README

shell-mcp-server

MCP Server for executing shell commands

快速开始

通过npx直接运行
npx -y shell-mcp-server
作为MCP服务器配置
{
  "mcpServers": {
    "shell-mcp-server": {
      "command": "npx",
      "args": ["-y", "shell-mcp-server"]
    }
  }
}
安装为全局命令
npm install -g shell-mcp-server
shell-mcp-server
作为项目依赖安装
npm install shell-mcp-server

使用方法

直接运行
npx -y shell-mcp-server
# 或安装后
shell-mcp-server
编程方式使用
import { startServer } from 'shell-mcp-server';

startServer({
  port: 3000
});

功能特性

  • 安全执行Shell命令
  • 支持多种终端类型(cmd, powershell)
  • 基于Model Context Protocol (MCP) SDK构建
  • 支持npx一键运行
  • 可作为MCP服务器配置

许可证

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.