Termux MCP Server

Termux MCP Server

Enables AI assistants to remotely control an Android device from a PC, using Termux API for camera, location, SMS, notifications, and shell commands over SSH or SSE.

Category
Visit Server

README

Termux MCP Server (Ubuntu PRoot Distro) 📱🤖

This is a Model Context Protocol (MCP) server designed to run inside Ubuntu (PRoot Distro) on Termux.

Using Ubuntu inside Termux allows you to use standard pre-compiled binary packages (wheels), meaning no long build wait times or compiling errors (like the rpds-py Rust compiler error) while still retaining full access to Termux API commands to control your Android device.


Quick One-Line Installation

Open the Termux app on your phone and run this single command to clone the repo, install Ubuntu, set up a virtual environment, and configure everything automatically:

curl -sSL https://raw.githubusercontent.com/AbuZar-Ansarii/Termux-MCP-Server/main/setup.sh -o setup.sh && chmod +x setup.sh && ./setup.sh

5-Step Setup Guide

Step 1: Install Termux & Termux:API on Android

  1. Download Termux and the Termux:API app.
    • Important: Do NOT install them from the Google Play Store (they are outdated and broken). Download them from F-Droid or GitHub Releases.
  2. Install both apps on your phone.

Step 2: Grant Android Permissions

  1. Go to your Android Settings -> Apps -> Termux:API.
  2. Grant the following permissions to let the AI control your device:
    • Camera (for photos)
    • Location (for GPS coordinates)
    • SMS (for messages)
    • Notifications (for popups)

Step 3: Run the Auto-Installer inside Termux

Run the one-line installer in Termux:

curl -sSL https://raw.githubusercontent.com/AbuZar-Ansarii/Termux-MCP-Server/main/setup.sh -o setup.sh && chmod +x setup.sh && ./setup.sh

This will automatically update Termux, install proot-distro Ubuntu, set up a python virtual environment (venv) inside it, and install all dependencies instantly.


Step 4: Configure Passwordless SSH Access

The AI client runs non-interactively on your PC and needs to log into Termux automatically.

  1. In Termux, set a password and start the SSH server:
    passwd
    sshd
    whoami     # Check your username (e.g. u0_a123)
    ifconfig   # Check your phone's IP address (e.g. 192.168.1.50)
    
  2. On your PC, copy your SSH public key over to your phone:
    • 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 Terminal:
      ssh-copy-id -p 8022 u0_a123@192.168.1.50
      
  3. Verify passwordless access from your PC:
    ssh -p 8022 u0_a123@192.168.1.50
    
    If it logs in without asking for a password, you are ready!

Step 5: Connect Claude Desktop on your PC

Update your PC's Claude Desktop config file to launch the server inside the Ubuntu virtual environment.

  1. Open your Claude Desktop config file:
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  2. Add the server configuration under mcpServers (replace the username and IP address with yours):
    {
      "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. Restart Claude Desktop. The AI can now command your phone!

Alternative: Connecting via HTTP / SSE (Remote Server)

If you want to run the server as a standalone web application instead of launching it over SSH stdio:

  1. In Termux, run the server inside Ubuntu in SSE mode:
    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. On your PC, configure your Claude Desktop config to point directly to your phone's IP:
    {
      "mcpServers": {
        "termux-remote": {
          "url": "http://your_phone_ip:8000/sse"
        }
      }
    }
    

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured