Termux MCP Server
Allows the AI agent to control an Android device through Termux API commands, including capabilities such as accessing the camera, location, SMS, and notifications.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Termux MCP ServerSend a text to John saying I'm on my way home now"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.shRelated MCP server: autoglm-mcp-server
5-Step Setup Guide
Step 1: Install Termux & Termux:API on Android
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.
Install both apps on your phone.
Step 2: Grant Android Permissions
Go to your Android Settings -> Apps -> Termux:API.
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.shThis 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.
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)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
Verify passwordless access from your PC:
ssh -p 8022 u0_a123@192.168.1.50If 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.
Open your Claude Desktop config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
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" ] } } }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:
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 8000On 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" } } }
This server cannot be installed
Maintenance
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
- AlicenseNot gradedqualityBmaintenanceEnables 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.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI models to control Android devices via ADB through natural language commands, supporting screen analysis and automated actions.26MIT
- 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.4Apache 2.0
- AlicenseAqualityBmaintenanceGives 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.72MIT
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…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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