Skip to main content
Glama
gkgaurav31

MCP Terminal Tool Server

by gkgaurav31

MCP Terminal Tool Server

This is a simple MCP server built with the MCP Python SDK. It exposes a single tool called terminal_tool that allows users to run terminal commands and returns their output.

Requirements

  • Python 3.8+

  • MCP Python SDK (pip install mcp-sdk)

Related MCP server: MCP Terminal Server

Running the Server

python server.py

Exposed Tool

terminal_tool

  • Description: Run a terminal command and return its output as a string.

  • Arguments:

    • command (str): The terminal command to execute.

  • Returns:

    • Output of the command as a string (stdout or stderr).


Note: Use with caution. This tool executes arbitrary shell commands on the server.

MCP Inspector & Claude Configuration

To connect this server to the MCP Inspector, Claude (Anthropic), or other MCP-compatible clients, use a configuration like the following:

{
  "mcpServers": {
    "terminal_tool": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/your/project",
        "run",
        "server.py"
      ]
    }
  }
}
  • Replace /path/to/your/project with the absolute path to your project directory.

  • This configuration will launch the server using uv and connect via stdio transport (default).

  • Claude (Anthropic) users: You can add this configuration to your Claude MCP settings to enable tool use with your local server.

  • For HTTP transport, start the server manually with python server.py (or uv run server.py) and connect to the appropriate URL in the Inspector.

Available Tools

1 tool
terminal_toolB

Run a terminal command and return its output as a string.

ParametersJSON Schema
NameRequiredDescriptionDefault
commandYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the action and output but lacks critical details like security implications, execution environment, error handling, or side effects (e.g., whether commands are destructive).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core functionality with zero wasted words. It directly communicates the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (executing arbitrary commands) and lack of annotations, the description is incomplete—it misses safety warnings and behavioral context. However, the presence of an output schema reduces the need to explain return values, keeping it minimally adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description implies the 'command' parameter is a terminal command to run. However, it doesn't add meaningful details beyond what's obvious from the schema (e.g., command syntax, shell type, or validation rules), so it meets the baseline for minimal compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Run a terminal command') and the resource/output ('return its output as a string'), making the purpose immediately understandable. It uses precise verbs and distinguishes what the tool does from its input/output flow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or constraints. It simply states what the tool does without context about appropriate scenarios or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 1 tool updatev0.1.0
    • First observedterminal_tool

TDQS

B3.4/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap between tools. The tool has a single, clear purpose: running terminal commands and returning output.

Naming Consistency5/5

The single tool name 'terminal_tool' follows a consistent noun_noun pattern, though with only one tool, consistency is inherently perfect. There are no deviations or mixed conventions to evaluate.

Tool Count2/5

A single tool for a terminal server is too few for the apparent scope, as it lacks coverage for common terminal operations like listing files, navigating directories, or managing processes. This minimal set will likely cause agent failures due to missing functionality.

Completeness2/5

The tool surface is severely incomplete for a terminal server. While 'terminal_tool' can run arbitrary commands, there are significant gaps: no dedicated tools for basic operations (e.g., ls, cd, pwd, ps) or structured outputs, forcing agents to rely on raw command parsing and increasing error risk.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    C
    maintenance
    A server that enables AI assistants to execute terminal commands and retrieve outputs via the Model Context Protocol (MCP).
    3
    27
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A simple MCP server that allows running terminal commands with output capture, enabling command execution on the host system from MCP-compatible clients like Claude Desktop.
    1
    -
  • -
    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
    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
    -