| Crates.io | mcp-android-ssh |
| lib.rs | mcp-android-ssh |
| version | 0.1.1 |
| created_at | 2025-10-16 14:08:42.918591+00 |
| updated_at | 2025-10-16 19:42:24.046297+00 |
| description | A high-performance MCP server for secure SSH access to Android devices via Termux |
| homepage | https://github.com/vaknin/mcp-android-ssh |
| repository | https://github.com/vaknin/mcp-android-ssh |
| max_upload_size | |
| id | 1886163 |
| size | 518,193 |
Control your Android device from AI assistants via SSH
A high-performance MCP server written in Rust that provides secure SSH access to Android devices through Termux.
Example: AI assistant listing files and exploring directories on Android
Turn your Android device into a programmable computer that AI can interact with naturally. Instead of manually SSH'ing into your phone every time you need to check something or run a command, just ask Claude:
# Install
cargo install mcp-android-ssh
claude mcp add --scope user --transport stdio mcp-android-ssh mcp-android-ssh
# Setup Termux (on Android)
pkg install openssh && sshd
# Copy your SSH key
ssh-copy-id -p 8022 -i ~/.ssh/id_ed25519.pub u0_a555@192.168.1.100
# Configure via Claude (recommended) - just ask:
"Set up Android at 192.168.1.100, user u0_a555, key ~/.ssh/id_ed25519"
# Then restart from /mcp menu
# Or manually edit: ~/.config/mcp-android-ssh/config.toml
Step 1: Install and add to Claude Code
cargo install mcp-android-ssh
claude mcp add --scope user --transport stdio mcp-android-ssh mcp-android-ssh
Step 2: Setup your Android device
In Termux on your Android device:
# Install and start SSH server
pkg update && pkg install openssh && sshd
# Find your username and IP address
whoami # Example: u0_a555
ifconfig wlan0 # Example: 192.168.1.100
Step 3: Setup SSH key authentication (recommended)
On your host machine:
# Generate SSH key (skip if you already have one)
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ""
# Copy key to Android (replace with your username and IP)
ssh-copy-id -p 8022 -i ~/.ssh/id_ed25519.pub u0_a555@192.168.1.100
Step 4: Configure the server
Option A: Let Claude configure it (easiest)
Just ask Claude to set it up:
"Set up my Android connection at 192.168.1.100, user u0_a555, use ~/.ssh/id_ed25519"
Then restart the MCP server from the /mcp menu in Claude Code.
Option B: Manual configuration
Edit ~/.config/mcp-android-ssh/config.toml:
host = "192.168.1.100" # Your Android device IP
port = 8022 # SSH port (default 8022 for Termux)
user = "u0_a555" # Your Termux username
key_path = "~/.ssh/id_ed25519" # Path to your SSH private key
# Optional: password authentication (not recommended)
# password = "your_password"
Option C: Use environment variables
Configure via environment variables (useful for testing):
export ANDROID_SSH_HOST=192.168.1.100
export ANDROID_SSH_USER=u0_a555
export ANDROID_SSH_KEY_PATH=~/.ssh/id_ed25519
That's it! Start asking your AI assistant to interact with your Android device.
File Management
Development & Monitoring
System Administration
Data Analysis
The server exposes three MCP tools that Claude can use:
execute_read - Safe Read-Only CommandsExecutes whitelisted read-only commands without user approval. Perfect for browsing files, checking system status, and gathering information.
81 Whitelisted Commands Include:
ls, cat, head, tail, grep, find, treeps, top, df, du, free, uptimeping, netstat, ss, ifconfigwc, sort, cut, jqParameters:
command (string, required) - The shell command to executetimeout (number, optional) - Timeout in seconds (default: 30, max: 300)Example: ls -lah /sdcard/Download
execute - Full Command AccessExecutes any command including write/modify/delete operations. Use this for installing packages, creating files, or modifying system state.
Parameters:
command (string, required) - The shell command to executetimeout (number, optional) - Timeout in seconds (default: 30, max: 300)Example: pkg install git
Note: Commands that aren't whitelisted in execute_read will automatically suggest using this tool instead.
setup - Interactive Configuration HelperConfigure your Android SSH connection directly through Claude. Supports partial updates and guides you through missing information.
Parameters (all optional):
host (string) - Android device IP addressport (number) - SSH port (default: 8022)user (string) - Termux usernamekey_path (string) - Path to SSH private keypassword (string) - SSH password (not recommended)Usage:
Complete setup in one go:
"Set up Android at 192.168.1.100, user u0_a555, key ~/.ssh/id_ed25519"
Or step-by-step - Claude will ask for missing info:
"Help me set up my Android connection"
Update just one field:
"Change the host to 192.168.1.101"
After setup completes, restart the MCP server from the /mcp menu.