Skip to main content
Glama

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.sh

Related MCP server: autoglm-mcp-server

5단계 설치 가이드

1단계: Android에 Termux 및 Termux:API 설치

  1. TermuxTermux:API 앱을 다운로드합니다.

    • 중요: Google Play Store에서 설치하지 마세요 (그 버전은 오래되어 고장나 있습니다). F-Droid 또는 GitHub Releases에서 다운로드하세요.

  2. 두 앱을 휴대폰에 설치합니다.


2단계: Android 권한 허용

  1. Android 설정 -> -> Termux:API로 이동합니다.

  2. 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에 자동으로 로그인해야 합니다.

  1. 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)
  2. 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
  3. PC에서 비밀번호 없는 접속을 확인합니다:

    ssh -p 8022 u0_a123@192.168.1.50

    비밀번호를 묻지 않고 로그인되면 준비 완료입니다!


5단계: PC의 Claude Desktop 연결

PC의 Claude Desktop 설정 파일을 업데이트하여 Ubuntu 가상 환경 내부에서 서버가 실행되도록 합니다.

  1. Claude Desktop 설정 파일을 엽니다:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  2. 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"
          ]
        }
      }
    }
  3. Claude Desktop을 다시 시작합니다. 이제 AI가 휴대폰을 명령할 수 있습니다!


대안: HTTP / SSE로 연결 (원격 서버)

서버를 SSH stdio 방식 대신 독립 웹 애플리케이션으로 실행하려면:

  1. 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 8000
  2. PC에서, Claude Desktop 설정을 휴대폰 IP를 직접 가리키도록 구성합니다:

    {
      "mcpServers": {
        "termux-remote": {
          "url": "http://your_phone_ip:8000/sse"
        }
      }
    }
A
license - permissive license
Not graded
quality - not tested
B
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

View all related MCP servers

Related MCP Connectors

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

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

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/AbuZar-Ansarii/Termux-MCP-Server'

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