Termux API Tools

v1.0.0Developer Toolsstable

基于Termux-API的部分指令,用于MCP客户端操控Android设备的服务端

termux-api-toolsmcpai-integration
Share:
11
Stars
0
Downloads
0
Weekly
0/5

What is Termux API Tools?

Termux API Tools is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 基于termux-api的部分指令,用于mcp客户端操控android设备的服务端

基于Termux-API的部分指令,用于MCP客户端操控Android设备的服务端

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • 基于Termux-API的部分指令,用于MCP客户端操控Android设备的服务端

Use Cases

Control Android devices through MCP client commands.
Automate Android device operations via AI assistants.
hyhAsma

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMar 14, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx termux-api-tools

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Termux API Tools

Termux API Tools MCP Server is a Python-based MCP server that connects AI clients to Android devices via SSH through the Termux environment, enabling remote control of Android device features including call history access, SMS retrieval, phone dialing, and SMS sending. The server runs on the client machine (PC or Mac) and communicates with the Android device over a local network SSH connection into Termux.

Prerequisites

  • Android device with Termux installed from F-Droid (not Google Play)
  • Termux:API add-on installed on Android (from F-Droid)
  • OpenSSH server running inside Termux on the Android device (pkg install openssh)
  • Python environment on the MCP client machine (PC/Mac running the Claude client)
  • LAN connectivity between the client machine and the Android device
1

Set up Termux and SSH on Android

Install and configure Termux with SSH on your Android device so the MCP server can connect remotely.

# Run these commands inside Termux on your Android device
pkg update && pkg upgrade
pkg install openssh termux-api
# Set a password for SSH authentication
passwd
# Start the SSH daemon
sshd
# Find your device IP (connect to the same WiFi as your client machine)
ifconfig
2

Clone the MCP server repository

Clone the termux-api-tools-mcp-server repository to your client machine (not the Android device).

git clone https://github.com/hyhAsma/termux-api-tools-mcp-server.git
cd termux-api-tools-mcp-server
3

Install Python dependencies

Install the required Python packages on your client machine.

pip install -r requirements.txt
4

Configure SSH connection details

Set the four required SSH connection environment variables pointing to your Android device.

export TERMUX_SSH_HOST="192.168.1.x"   # Your Android device's local IP
export TERMUX_SSH_PORT="8022"            # Termux SSH default port
export TERMUX_SSH_USER="u0_a123"         # Your Termux username (run 'whoami' in Termux)
export TERMUX_SSH_PASSWORD="yourpassword"
5

Add to MCP client configuration

Register the server in your Claude Desktop or Cherry Studio MCP configuration.

{
  "mcpServers": {
    "termux-api-tools": {
      "command": "python",
      "args": ["/absolute/path/to/termux-api-tools-mcp-server/termux-api-tools-mcp-server.py"],
      "env": {
        "TERMUX_SSH_HOST": "192.168.1.x",
        "TERMUX_SSH_PORT": "8022",
        "TERMUX_SSH_USER": "u0_a123",
        "TERMUX_SSH_PASSWORD": "yourpassword"
      }
    }
  }
}

Termux API Tools Examples

Client configuration

claude_desktop_config.json entry for Termux API Tools MCP server with SSH credentials for the Android device.

{
  "mcpServers": {
    "termux-api-tools": {
      "command": "python",
      "args": ["/absolute/path/to/termux-api-tools-mcp-server/termux-api-tools-mcp-server.py"],
      "env": {
        "TERMUX_SSH_HOST": "192.168.1.100",
        "TERMUX_SSH_PORT": "8022",
        "TERMUX_SSH_USER": "u0_a123",
        "TERMUX_SSH_PASSWORD": "yourpassword"
      }
    }
  }
}

Prompts to try

Use these prompts after connecting to control your Android device through Claude.

- "Show me the last 10 calls on my Android phone"
- "Read my last 5 SMS messages and summarize them"
- "What phone information is available from my device?"
- "Send an SMS to +1234567890 saying: I'll be late by 10 minutes"

Troubleshooting Termux API Tools

SSH connection refused or timed out

Verify sshd is running in Termux by opening the Termux app and running 'sshd'. The default Termux SSH port is 8022, not 22. Confirm both devices are on the same WiFi network and the Android device IP has not changed (consider setting a static IP in your router's DHCP settings).

Termux API commands fail with permission errors

The Termux:API add-on must be installed from F-Droid and Android permissions must be granted. Open the Termux:API app on the device and ensure permissions for contacts, SMS, phone, and storage are granted in Android Settings → Apps → Termux:API → Permissions.

Phone call functionality fails or is unreliable

This is a known limitation documented by the project — phone call initiation can exhibit compatibility issues with certain Android versions. SMS and read operations are more reliable. Test SMS retrieval first to confirm the SSH connection and Termux API integration are working.

Frequently Asked Questions about Termux API Tools

What is Termux API Tools?

Termux API Tools is a Model Context Protocol (MCP) server that 基于termux-api的部分指令,用于mcp客户端操控android设备的服务端 It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Termux API Tools?

Follow the installation instructions on the Termux API Tools GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Termux API Tools?

Termux API Tools works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Termux API Tools free to use?

Yes, Termux API Tools is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "termux-api-tools": { "command": "npx", "args": ["-y", "termux-api-tools"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Termux API Tools?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides