Skip to main content

A terminal controller MCP server for UVx

Project description

Terminal Controller for UVx

A Model Context Protocol (MCP) server that enables secure terminal command execution, directory navigation, and file system operations through a standardized interface, packaged for UVx.

MCP Server

Features

  • Command Execution: Run terminal commands with timeout controls and comprehensive output capture
  • Directory Management: Navigate and list directory contents with intuitive formatting
  • Security Measures: Built-in safeguards against dangerous commands and operations
  • Command History: Track and display recent command executions
  • Cross-Platform Support: Works on both Windows and UNIX-based systems
  • UVx Integration: Easily installable via UVx for seamless integration

Installation

Using UVx (Recommended)

Install using UVx with a single command:

uvx install terminal-controller

Manual Installation

For manual installation:

  1. Clone this repository:

    git clone https://github.com/GongRzhe/terminal-controller-uvx.git
    cd terminal-controller-uvx
    
  2. Install the package:

    pip install .
    

Usage

With UVx

After installation, you can use the Terminal Controller directly with UVx-compatible LLM clients.

As a Standalone MCP Server

You can also run the Terminal Controller as a standalone MCP server:

terminal-controller

Client Configuration

Claude Desktop

Configure Claude Desktop to use Terminal Controller by adding the following to your Claude Desktop configuration:

"terminal-controller": {
  "command": "terminal-controller",
  "args": [],
  "env": {}
}

Other MCP Clients

For other clients, refer to their documentation on how to configure UVx or external MCP servers.

API Reference

Terminal Controller exposes the following MCP tools:

execute_command

Execute a terminal command and return its results.

Parameters:

  • command: The command line command to execute
  • timeout: Command timeout in seconds (default: 30)

get_command_history

Get recent command execution history.

Parameters:

  • count: Number of recent commands to return (default: 10)

get_current_directory

Get the current working directory.

change_directory

Change the current working directory.

Parameters:

  • path: Directory path to switch to

list_directory

List files and subdirectories in the specified directory.

Parameters:

  • path: Directory path to list contents (default: current directory)

Security Considerations

Terminal Controller implements several security measures:

  • Timeout controls to prevent long-running commands
  • Blacklisting of dangerous commands (rm -rf /, format, mkfs)
  • Proper error handling and isolation of command execution
  • Access only to the commands and directories specifically granted

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terminal_controller_uvx-0.1.4.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terminal_controller_uvx-0.1.4-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file terminal_controller_uvx-0.1.4.tar.gz.

File metadata

  • Download URL: terminal_controller_uvx-0.1.4.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for terminal_controller_uvx-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d13e0908bd58440bb2f3ebd86de9a547de0fa872253f2a4791ab0fe3046e33b6
MD5 d3129673a75aa6628ca60469b9c4c9d1
BLAKE2b-256 aa41df58182fa2e51cf1d5ad3c09e75d6aa3dc470532dfcc6b052ea26adfb74e

See more details on using hashes here.

File details

Details for the file terminal_controller_uvx-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for terminal_controller_uvx-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e3d5a8590ab40a75223fff8657596773973a1ffa04e938a34b20fceb15ec517f
MD5 b3bcc597b08c9ac1dddf2305b4e1e2b4
BLAKE2b-256 d8a464cc01e30ca85ceaf5328d8a13faef08edbb58b68ceb462385b1c35a8f02

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page