Termux MCP Server
termuxgpt/termux-mcp
API HTTP para executar shell commands no Termux via agentes IA
Ver no GitHubServidor MCP leve que expõe o shell do Termux como uma API HTTP com streaming em tempo real. Permite que agentes IA executem comandos de shell diretamente em dispositivos Android, navegando diretórios, instalando pacotes e capturando saída de forma contínua.
Instalação
npx convez-ai termuxgpt/termux-mcp1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Executar comandos shell remotamente em Android via Claude ou agentes IA
- Automação de tarefas Termux com streaming de output em tempo real
- Integração de dispositivo Android com fluxos de IA para DevOps móvel
Veredito

Solução técnica bem-executada para um caso de uso nicho: conectar agentes IA ao shell do Termux via HTTP. Código limpo, API simples com streaming adequado. Útil para quem precisa automatizar Android programaticamente, mas público restrito.
README
A tradução para o português deste README ainda está na fila.
A lightweight HTTP server that exposes Termux Shell as a streaming API — built to pair with AI agents, Claude, or Postman.
📖 What is TermuxMCP?
TermuxMCP runs inside Termux and provides a simple HTTP interface so any AI agent can:
- 🖥️ Execute shell commands with real-time streaming output
- 📂 Navigate directories with persistent
cdstate - 📦 Install packages non-interactively (
pkg install,apt install) - 💓 Check server health via
/ping
AI / API Call ──► POST /run {"cmd": "ls -la"} ──► TermuxMCP ──► Termux Shell
│
◄── chunked streaming output ───┘
Quick Start
1 — Install in Termux
pkg update && pkg install python git -y;git clone https://github.com/termuxgpt/termux-mcp;cd termux-mcp;python -m termux_mcp
or Try below method (recommended)
curl -fSL https://termux-mcp.pages.dev/add-repo.sh | bash
pkg install termux-mcp
termux-mcp
2 — Test it
# Health check
curl http://localhost:8080/ping
# Run a command
curl -X POST http://localhost:8080/run \
-H "Content-Type: application/json" \
-d '{"cmd": "ls ~"}'
# Install a package (streaming output)
curl -X POST http://localhost:8080/run \
-H "Content-Type: application/json" \
-d '{"cmd": "pkg install python"}'
3 — Custom port
TERMUX_MCP_PORT=9090 python -m termux_mcp
API Reference
| Method | Path | Body | Response |
|---|---|---|---|
| GET | /ping | — | {"status":"ok","cwd":"..."} |
| POST | /run | {"cmd": "<shell>"} | Chunked plain-text stream |
Streaming Response Format
Output uses HTTP chunked transfer encoding (Transfer-Encoding: chunked).
Read it line by line — each line is real terminal output as it happens.
Configuration
All settings can be overridden via environment variables:
| Variable | Default | Description |
|---|---|---|
TERMUX_MCP_PORT | 8080 | HTTP listen port |
TERMUX_MCP_HOST | 0.0.0.0 | Bind address |
HOME | Termux home | Working directory base |