Skip to main content

MCP server for executing terminal commands on the host machine with configurable permissions

Project description

Host Terminal MCP

Run terminal commands on your computer through Claude.

Why? Claude Cowork runs inside a sandboxed VM and can't access your host machine's terminal. This MCP plugin bridges that gap, letting Claude run commands directly on your computer (with permission controls).

Install

# Clone
git clone https://github.com/ankitag-in/host-terminal-mcp.git
cd host-terminal-mcp

# Install
uv tool install .

Configure Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or ~/.config/claude/claude_desktop_config.json (Linux):

{
  "mcpServers": {
    "host-terminal": {
      "command": "host-terminal-mcp"
    }
  }
}

Restart Claude Desktop.

Use

Ask Claude:

  • "List files in my home directory"
  • "Show git status"
  • "What's running on port 3000?"

Permission Modes

Mode Description
allowlist Only pre-approved commands (default, safest)
ask Prompts for unknown commands
allow_all Allows everything (dangerous!)

Common read commands are pre-approved: ls, cat, grep, git status, ps, etc.

Dangerous commands are always blocked: sudo, rm -rf /, etc.

Commands

# Create config file
host-terminal-mcp --init-config

# Run in ask mode (approve commands on the fly)
host-terminal-mcp --mode ask

# Show help
host-terminal-mcp --help

Config

Edit ~/.config/host-terminal-mcp/config.yaml to customize allowed commands.

License

Apache-2.0

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

host_terminal_mcp-0.1.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

host_terminal_mcp-0.1.0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file host_terminal_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: host_terminal_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for host_terminal_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 956a8ecf6336e74e0970de13460db49c7ff2b4803e1a34cb5f3fef017008e6cc
MD5 508f6005fc088546a13f80090b443316
BLAKE2b-256 45bc08387f256163d2c2a9b0e2abc698d481d37d3b8fc23fc1ad1efb99d640a3

See more details on using hashes here.

File details

Details for the file host_terminal_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: host_terminal_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for host_terminal_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 424cba5e412554b54a78c892f5c33b35029a458db32e94417b76bd45ce28d849
MD5 8d48fca7f4f23599d6dad8f63c7def69
BLAKE2b-256 e6511d79beef2f7188058e27d1588c695ddd793c22fda2be1d12cbe754a717f6

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