shell-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@shell-mcpRundf -hto check disk usage."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
shell-mcp
A deliberately small MCP server that exposes a single tool, run_shell, for executing arbitrary shell commands over Streamable HTTP.
It uses the stable v2 Model Context Protocol TypeScript SDK (@modelcontextprotocol/server and @modelcontextprotocol/node) and runs on Node.js 20+.
run_shell has the same operating-system permissions as the shell-mcp process. Treat access to this server as equivalent to shell access. The default bind address is loopback-only. A bearer token is required if you bind to a non-loopback address.
Tool
run_shell
Input | Required | Description |
| yes | Command string to execute. |
| no | Shell executable/path, e.g. |
| no | Working directory. Defaults to the server process working directory. |
| no | Environment variables to add or override for the command. |
| no | Command timeout in milliseconds. Defaults to 30 seconds. |
The result includes stdout, stderr, exit code, terminating signal, duration, timeout state, and whether the output limit was exceeded.
Related MCP server: mcp2term
Run
npm install
npm run build
npm startThe MCP endpoint defaults to:
http://127.0.0.1:3000/mcpFor development:
npm run devConfiguration
Environment variable | Default | Purpose |
|
| HTTP listen address. |
|
| HTTP listen port. |
| unset | Optional bearer token on loopback; required for non-loopback binds. |
|
| Default command timeout. |
|
| Maximum timeout accepted by the tool. |
|
| Maximum combined stdout/stderr retained before the command is terminated. |
Example network bind:
HOST=0.0.0.0 \
SHELL_MCP_TOKEN='use-a-long-random-secret' \
npm startConfigure the MCP client to send:
Authorization: Bearer use-a-long-random-secretFor anything beyond a trusted local network, put the endpoint behind TLS and an authenticated reverse proxy rather than exposing the Node process directly.
Examples
Bash:
{
"command": "uname -a && pwd",
"shell": "bash"
}PowerShell:
{
"command": "Get-ChildItem Env: | Select-Object -First 5",
"shell": "pwsh"
}Development
npm run checkDesign
One MCP tool; no resources or prompts.
Streamable HTTP only; no stdio transport.
Stateless MCP handler with a fresh
McpServerper request, following the v2 SDK serving model.Explicit shell invocation for POSIX shells, PowerShell, and
cmd.exe.Process-tree termination on timeout or output overflow.
Loopback binding by default, with bearer authentication required for non-loopback binds.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Execute code in 8 languages (Python, JS, TS, Go, Java, C++, C, Bash) in gVisor sandboxes.
- mcp-serverOAuthai.cdbx
Build Apps and run code in 30 languages — sandboxed, with persistent sessions for agent loops.
Exposes FEDLIN's public security scanners as agent-callable tools over Streamable HTTP.
Related MCP Servers
- AlicenseBqualityDmaintenanceExecute terminal commands locally or remotely via SSH with session persistence and environment variable support. Manage terminal sessions that maintain state for up to 20 minutes, enabling efficient command execution workflows. Connect using stdio or SSE for flexible integration with AI models and a12MIT
- FlicenseBqualityDmaintenanceEnables safe execution of system shell commands with real-time streaming output and rich metadata capture. Provides configurable command execution with timeout controls, environment management, and extensible plugin architecture for monitoring command lifecycles.4-
- AlicenseNot gradedqualityDmaintenanceProvides tools for executing shell commands both synchronously and asynchronously with real-time output streaming and process management capabilities. It enables users to start background tasks, monitor progress, and manage long-running processes via Stdio or HTTP transports.225MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to execute Python functions and system commands via Streamable HTTP, including bash, Python code execution, file operations, and text searching.2,013MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mhingston/shell-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server