TT

termuxgpt/termux-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

44 stars 15 forks 품질 73 트렌드 27AGPL-3.0

Termux용 강력한 MCP 서버 - AI Agent가 실시간 Android 기기에서 쉘 명령을 실행할 수 있습니다.

개요

Android의 Termux 내부에서 실행되는 경량 HTTP 서버는 스트리밍 API로 쉘 실행 및 장치 기능을 폭발합니다. AI 에이전트, LLM 도구 호출 및 자동화 스크립트에 내장. 둘 다 pkg를 통해 함께 설치 termux-mcp를 설치하고 실행 - 시작 termux-native-mcp는 REST daemon의 포트, 상태 또는 행동을 결코 만지지 않습니다. 데스크탑 MCP 클라이언트 (ssh 이상) : { "command": "ssh", "args": ["android", "termux-native-mcp", "-stdio"]} 전체 가이드, env vars 및 도구 목록: . 두 서버는 동일한 핸들러 코드를 실행하기 때문에 동일한 안전 시스템 (리스크 게이트, 파일 스냅 샷, 쓰레기)을 공유합니다. 이것은 글로벌 termux-mcp 명령을 설치합니다. - 그것은 어떤 디렉토리에서 실행되며 pip install -U termux-mcp upgrades it. pip install . 전역 명령을 등록하므로 cd는 설치 자체에서만 필요합니다. 그것 없이, python -m termux mcp는 단지 clone 안쪽에서 작동합니다. TERMUX MCP AUTH TOKEN을 값 16+ 문자로 설정하여 모든 엔드포인트에 인증이 필요합니다.

개요(AI 번역)

Android의 Termux 내부에서 실행되는 경량 HTTP 서버는 스트리밍 API로 쉘 실행 및 장치 기능을 폭발합니다. AI 에이전트, LLM 도구 호출 및 자동화 스크립트에 내장.

두 개의 명령 - 실행하는 것은?

| 명령 | 그것은 무엇입니까 | |—||| | termux-mcp | REST API 데몬 :8080 (이 README의 엔드포인트) | | termux-native-mcp | Native MCP 서버 (모델 콘텍스트 프로토콜, 사양 2025-06-18) MCP 클라이언트: RikkaHub, 데스크탑 AI 앱(커스터, …) |

둘 다 pkg install termux-mcp를 통해 함께 설치하고 ** process** — start termux-native-mcp는 REST daemon의 동작을 하지 않습니다. 항구, 국가 또는 행동.

RikkaHub (좌 전화):

데스크탑 MCP 클라이언트 (ssh 이상): {"command": "ssh", "args": ["android", "termux-native-mcp", "--stdio"]}

두 서버는 동일한 안전 시스템을 공유합니다 (리스크 게이트, 파일 스냅 샷, trash) 같은 핸들러 코드를 실행하기 때문에.

설치

pip (추천)

이것은 전역을 설치 termux-mcp 명령 - 그것은 어떤 디렉토리에서 실행, 과 pip install -U termux-mcp 업그레이드.

# 클론에서

pip install . 전역의 명령을 등록, 그래서 cd은 단지 필요 설치 자체.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Termux-MCP

A lightweight HTTP server that runs inside Termux on Android, exposing shell execution and device capabilities as a streaming API. Built for AI agents, LLM tool-calling, and automation scripts.

AI Agent --> POST /run {"cmd": "ls -la"} --> Termux-MCP --> Termux Shell
                                                  |
                      <-- chunked streaming output -+

Two commands — which do I run?

Command What it is
termux-mcp REST API daemon on :8080 (this README’s endpoints)
termux-native-mcp Native MCP server (Model Context Protocol, spec 2025-06-18) for MCP clients: RikkaHub, desktop AI apps (Cursor, …)

Both install together via pkg install termux-mcp and run as separate processes — starting termux-native-mcp never touches the REST daemon’s port, state or behavior.

termux-mcp                  # REST API on 127.0.0.1:8080
termux-native-mcp           # native MCP, Streamable HTTP on 127.0.0.1:8081
termux-native-mcp --stdio   # native MCP over stdin/stdout (desktop clients)

RikkaHub (same phone):

{
  "type": "http",
  "url": "http://127.0.0.1:8081/mcp",
  "commonOptions": {
    "name": "Termux",
    "enable": true,
    "headers": [["Authorization", "Bearer "]]
  }
}

Desktop MCP client (over ssh): {"command": "ssh", "args": ["android", "termux-native-mcp", "--stdio"]}

Both servers share the same safety system (risk gates, file snapshots, trash) because they run the same handler code.

Installation

pkg update && pkg install python -y
pip install termux-mcp
termux-mcp

This installs a global termux-mcp command — it runs from any directory, and pip install -U termux-mcp upgrades it.

From a clone

pkg update && pkg install python git -y
git clone https://github.com/termuxgpt/termux-mcp
cd termux-mcp
pip install .
termux-mcp

pip install . registers the command globally, so the cd is only needed for the install itself. Without it, python -m termux_mcp only works from inside the clone.

Package repository

curl -fSL https://termux-mcp.pages.dev/add-repo.sh | bash
pkg install termux-mcp
termux-mcp

Quick Test

curl http://localhost:8080/ping
curl -X POST http://localhost:8080/run -H "Content-Type: application/json" -d '{"cmd": "ls ~"}'

Termux Tutorial Apps (AD)

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →