Shell Server MCP Server

Executes shell commands via the Model Context Protocol (MCP) enabling safe execution of shell commands by AI agents.

Local serverstdio 8

What is the Shell Server MCP server?

Most developer tooling work still happens through a UI a human drives. Shell Server MCP server moves it into the conversation instead. Executes shell commands via the Model Context Protocol (MCP) enabling safe execution of shell commands by AI agents.

The short version

A server that uses the Model Context Protocol (MCP) to execute shell commands. It functions as a bridge that allows AI agents to safely execute shell commands.

  • Execute shell commands (single-line and multi-line support)
  • Support for various shells (bash, zsh, fish, powershell, cmd, etc.)
  • Detailed error handling and logging
  • MCP Inspector compatible

The tools it exposes

The server publishes 6 tools. What each one is for:

  • shell_exec — The shell_exec tool exposed by this server
  • hostname — The hostname tool exposed by this server
  • platform — The platform tool exposed by this server
  • shell — The shell tool exposed by this server
  • username — The username tool exposed by this server
  • Logging — The Logging tool exposed by this server

Getting it running

Installation goes through your MCP client rather than a global install: point it at @mkusaka/mcp-shell-server on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

How it compares

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Shell Server's toolset — shell_exec, hostname, platform and 3 more — is a fair guide to whether it matches your workflow. It is maintained by mkusaka; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Shell Server's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
shell_execThe shell_exec tool exposed by this server.
hostnameThe hostname tool exposed by this server.
platformThe platform tool exposed by this server.
shellThe shell tool exposed by this server.
usernameThe username tool exposed by this server.
LoggingThe Logging tool exposed by this server.

How to install the Shell Server MCP server

{
  "mcpServers": {
    "shell": {
      "command": "npx",
      "args": ["-y", "@mkusaka/mcp-shell-server"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use Shell Server to shell exec.
  • Use Shell Server to hostname.
  • Use Shell Server to platform.

Frequently asked questions

Shell Server is a tool that uses the Model Context Protocol (MCP) to execute shell commands, allowing AI agents to safely interact with the system by running commands in a controlled environment.