Termux MCP Server
Termux MCP Server (Ubuntu PRoot Distro) 📱🤖
이 문서는 Termux 위에서 Ubuntu (PRoot Distro) 내부에 실행되도록 설계된 Model Context Protocol(MCP) 서버입니다.
An Ubuntu 가상 환경을 사용하면 표준으로 사전 컴파일된 바이너리 패키지(wheels)를 그대로 사용할 수 있으므로, 긴 빌드 대기 시간이나 컴파일 오류 없이 (rpds-py 등 Rust 컴파일러 오류들) 완전한 Termux API 명령을 사용해 Android 기기를 제어할 수 있습니다.
한 줄 설치
휴대폰에서 Termux 앱을 열고 아래 한 줄 명령을 실행하면 리포지토리를 클론하고, Ubuntu를 설치하고, 가상 환경을 준비하고, 모든 것을 자동으로 설정합니다.
curl -sSL https://raw.githubusercontent.com/AbuZar-Ansarii/Termux-MCP-Server/main/setup.sh -o setup.sh && chmod +x setup.sh && ./setup.shRelated MCP server: autoglm-mcp-server
5단계 설치 가이드
1단계: Android에 Termux 및 Termux:API 설치
Termux 및 Termux:API 앱을 다운로드합니다.
중요: Google Play Store에서 설치하지 마세요 (그 버전은 오래되어 고장나 있습니다). F-Droid 또는 GitHub Releases에서 다운로드하세요.
두 앱을 휴대폰에 설치합니다.
2단계: Android 권한 허용
Android 설정 -> 앱 -> Termux:API로 이동합니다.
AI가 기기를 제어할 수 있도록 다음 권한을 허용합니다:
Camera (사진 촬영용)
Location (GPS 좌표용)
SMS (메시지용)
Notifications (알림용)
3단계: Termux 내부에서 자동 설치 프로그램 실행
Termux에서 한 줄 설치 명령을 실행합니다:
curl -sSL https://raw.githubusercontent.com/AbuZar-Ansarii/Termux-MCP-Server/main/setup.sh -o setup.sh && chmod +x setup.sh && ./setup.sh이 명령은 Termux를 자동 업데이트하고, proot-distro Ubuntu를 설치하고, Python 가상 환경(venv)을 만들고, 모든 의존성을 즉시 설치합니다.
4단계: 비밀번호 없는 SSH 접속 설정
AI 클라이언트는 PC에서 비대화형으로 실행되며 Termux에 자동으로 로그인해야 합니다.
Termux에서 비밀번호를 설정하고 SSH 서버를 시작합니다:
passwd sshd whoami # Check your username (e.g. u0_a123) ifconfig # Check your phone's IP address (e.g. 192.168.1.50)PC에서 SSH 공개 키를 휴대폰으로 복사합니다:
Windows PowerShell:
cat ~/.ssh/id_rsa.pub | ssh -p 8022 u0_a123@192.168.1.50 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys"macOS/Linux 터미널:
ssh-copy-id -p 8022 u0_a123@192.168.1.50
PC에서 비밀번호 없는 접속을 확인합니다:
ssh -p 8022 u0_a123@192.168.1.50비밀번호를 묻지 않고 로그인되면 준비 완료입니다!
5단계: PC의 Claude Desktop 연결
PC의 Claude Desktop 설정 파일을 업데이트하여 Ubuntu 가상 환경 내부에서 서버가 실행되도록 합니다.
Claude Desktop 설정 파일을 엽니다:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
mcpServers아래에 서버 설정을 추가합니다 (사용자 이름과 IP 주소를 자신의 것으로 바꾸세요):{ "mcpServers": { "termux": { "command": "ssh", "args": [ "-p", "8022", "-o", "StrictHostKeyChecking=accept-new", "u0_a123@192.168.1.50", "proot-distro login ubuntu -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/data/data/com.termux/files/usr/bin /root/venv/bin/python3 /root/termux_mcp.py" ] } } }Claude Desktop을 다시 시작합니다. 이제 AI가 휴대폰을 명령할 수 있습니다!
대안: HTTP / SSE로 연결 (원격 서버)
서버를 SSH stdio 방식 대신 독립 웹 애플리케이션으로 실행하려면:
Termux에서, Ubuntu 내부에서 SSE 모드로 서버를 실행합니다:
proot-distro login ubuntu -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/data/data/com.termux/files/usr/bin /root/venv/bin/python3 /root/termux_mcp.py sse --port 8000PC에서, Claude Desktop 설정을 휴대폰 IP를 직접 가리키도록 구성합니다:
{ "mcpServers": { "termux-remote": { "url": "http://your_phone_ip:8000/sse" } } }
Related MCP Connectors
Turns a phone into a camera+Bluetooth remote so AI assistants can see and control any PC.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Let AI agents control Android and iOS devices on Mobilerun Cloud: screen, input, apps, workflows.
Connect AI assistants to explicitly paired computers, servers, and VMs for permitted remote actions.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to directly control Android devices via Termux, providing 120+ tools for screen manipulation, file management, app control, and system operations with layered loading and security gating.4MIT
- AlicenseAqualityDmaintenanceEnables AI models to control Android devices via ADB through natural language commands, supporting screen analysis and automated actions.353 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to control Android devices securely via Shizuku and Termux:API, providing a universal shell tool for command execution and persistent sessions.9Apache 2.0
- AlicenseAqualityDmaintenanceGives PC AI agents real-world senses by connecting to an Android phone's camera, sensors, and files over local Wi-Fi without cloud relay or ADB.736 PyPI2MIT