Skip to main content
Glama
gkgaurav31
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)

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.

-
security - not tested
F
license - not found
-
quality - not tested

Latest Blog Posts

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/gkgaurav31/terminal-app-mcp-poc'

If you have feedback or need assistance with the MCP directory API, please join our Discord server