Skip to main content
Glama
Shell Server

Shell Server

by schajii

Shell Server

A simple MCP server that exposes a terminal tool, allowing AI agents to execute shell commands.

Requirements

  • Python 3.10+

  • uv

Related MCP server: MCP Shell Server

Setup

uv venv
uv sync

Running

uv run server.py

Or during development with the MCP inspector:

uv run mcp dev server.py

Tool

terminal

Executes a shell command and returns its output.

Input

Parameter

Type

Description

command

string

The shell command to execute

Output

{
  "stdout": "...",
  "stderr": "...",
  "return_code": 0
}

Connecting to Cursor

Add the following to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "shellserver": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/sami/Documents/MCP/mcp-servers/shellserver",
        "run",
        "server.py"
      ]
    }
  }
}

Then restart Cursor. The terminal tool will be available to the Agent.

Security

This server executes arbitrary shell commands. Only run it locally and never expose it over a network.

Available Tools

1 tool
terminalA

Run a terminal command and return the output.

Args: command: The command to execute in the terminal.

Returns: A dictionary containing stdout, stderr, and return_code.

Inputs: command (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility for confusion or overlap. The tool is clearly distinct.

    Naming Consistency5/5

    A single tool's name cannot be inconsistent. There is no pattern to evaluate, but no conflicting conventions exist.

    Tool Count2/5

    A single tool is too few for typical usage. The server would benefit from additional tools like file operations or environment variable management to be more useful.

    Completeness2/5

    The server only provides command execution. For a shell server, missing essential operations like reading files, managing directories, or handling processes limits its usefulness and may cause agent failures.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      A server that enables AI assistants to execute terminal commands and retrieve outputs via the Model Context Protocol (MCP).
      3
      26
      MIT
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      A simple MCP server that provides a terminal tool for executing shell commands with safety features like timeouts and error handling.
      -
    • F
      license
      B
      quality
      D
      maintenance
      An MCP server that enables users to execute arbitrary shell commands on their local machine and receive the output. It provides a terminal tool for running system commands through MCP-compatible clients using the Python SDK.
      1
      -
    • F
      license
      A
      quality
      D
      maintenance
      A lightweight MCP server that provides AI assistants with access to a system's terminal through a secure terminal tool. It enables users to execute shell commands and receive stdout, stderr, and exit codes directly within an MCP-compatible client.
      1
      -