Skip to main content
Glama
idealinvestse

Terminal MCP Server

Terminal MCP Server

HTTP MCP server that exposes authenticated shell tools so grok.com can run commands on this machine.

Quick start

cd /root/terminal-mcp
cp .env.example .env
# Set TERMINAL_MCP_TOKEN: openssl rand -hex 32
chmod +x scripts/*.sh
./scripts/start.sh
curl http://127.0.0.1:3001/health

Related MCP server: Remote MCP Server

grok.com setup

  1. Set tunnel mode in .env:

    TERMINAL_MCP_TUNNEL_MODE=true
  2. Restart: ./scripts/stop.sh && ./scripts/start.sh

  3. Tunnel: ./scripts/tunnel.sh — copy the URL and set TERMINAL_MCP_TUNNEL_HOST

  4. Restart again after setting tunnel host

  5. Register at grok.com/connectors → Custom:

    • URL: https://<tunnel-host>/mcp

    • Auth: Bearer <TERMINAL_MCP_TOKEN>

Stable tunnel URLs

  • ngrok paid: reserved domain — set TERMINAL_MCP_TUNNEL_HOST once

  • Cloudflare named tunnel: Cloudflare Tunnel docs — persistent hostname

Tools

Tool

Description

run_command

Run shell command (shell_mode: auto/shell/exec)

get_command_output

Poll background job (supports tail_bytes)

list_tasks

List all jobs

kill_task

Terminate background job

get_cwd_info

Environment and policy summary

Resources

  • terminal://tasks/{task_id}/log — task output log

Security

Configured in config.toml:

  • mode: blocklist (default), allowlist, or permissive

  • Command blocklist / allowlist

  • Webhook approval for destructive commands ([security.webhook])

  • Sanitized child environment (no inherited secrets)

  • Audit log: logs/audit.jsonl

systemd

sudo cp deploy/terminal-mcp.service /etc/systemd/system/
sudo systemctl enable --now terminal-mcp

Tests

.venv/bin/pip install -e ".[dev]"
.venv/bin/pytest -q

Local Grok CLI

grok mcp add terminal --transport http \
  --header "Authorization=Bearer ${TERMINAL_MCP_TOKEN}" \
  http://127.0.0.1:3001/mcp
F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    C
    maintenance
    Enables AI assistants to securely execute shell commands on local machines through an SSH interface with session management, command execution, and sudo support.
    1
  • F
    license
    -
    quality
    D
    maintenance
    Enables AI tools like Claude to interact with a remote machine's file system and shell via a secure HTTPS endpoint. It provides standardized tools for executing shell commands, reading and writing files, and navigating directories.

View all related MCP servers

Related MCP Connectors

  • Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.

  • Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.

  • x402-paid agent tools: 18 over HTTP, 14 over stdio. USDC per call, no API key.

View all MCP Connectors

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/idealinvestse/terminal-mcp'

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