
termuxgpt/termux-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Termux 用の強力な MCP サーバー — AI エージェントがリアルタイムで Android デバイスでシェルコマンドを実行できるようにします.
概要
Android で Termux 内で実行される軽量な HTTP サーバで、シェルの実行とデバイス機能をストリーミング API として公開します。 AIエージェント、LLMツール・コール、自動化スクリプト向けに構築 両方ともpkg install termux-mcp で一緒にインストールし、 termux-native-mcp を起動すると、REST デーモンのポート、状態、動作に触れることはありません。 デスクトップMCPクライアント(ssh):{"command": "ssh", "args": ["android", "termux-native-mcp", "-stdio"}} 完全なガイド、 env vars とツールリスト: . どちらのサーバーも同じ安全システム(リスクゲート、ファイルスナップショット、ゴミ)を共有しています。 これは、グローバル termux-mcp コマンドをインストールします。それは任意のディレクトリから実行され、 pip install -U termux-mcp はそれをアップグレードします。 pip install . コマンドをグローバルに登録するので、インストール自体のcdのみが必要です。 python -m termux mcp はクローン内でのみ動作します。 TERMUX MCP AUTH TOKEN を 16 文字以上の値に設定し、すべてのエンドポイントで認証を要求します.
概要(AI 翻訳)
Android で Termux 内で実行される軽量な HTTP サーバで、シェルの実行とデバイス機能をストリーミング API として公開します。 AIエージェント、LLMツール・コール、自動化スクリプト向けに構築
##2つのコマンド — 実行する?
| コマンド | お問い合わせ |
お問い合わせ
| [termux-mcp | REST API デーモン(:8080) |
| 【[[T2]】 | MCP クライアント向け MCP ネイティブ MCP サーバー** (Model Context Protocol, spec 2025-06-18) : RikkaHub, デスクトップ AI アプリ (Cursor, …) |
[pkg install termux-mcp]を介して一緒にインストールし、separateとして実行
process — [termux-native-mcp を REST デーモンに触れない
ポート、状態または動作。
RikkaHub(携帯電話):
デスクトップ MCP クライアント (ssh 以上): {"command": "ssh", "args": ["android", "termux-native-mcp", "--stdio"]}
どちらのサーバーも同じ安全システムを共有します(リスクゲート、ファイルスナップショット、 同じハンドラコードを実行するので、ゴミ)。
インストール
ピップ(推奨)
これは、グローバル[termux-mcpコマンドをインストールします。それは任意のディレクトリから実行され、
[pip install -U termux-mcp] をアップグレードします。
###クローンから
[pip install . コマンドをグローバルに登録するので、[cd] は、
インストール自体.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Termux-MCP
A lightweight HTTP server that runs inside Termux on Android, exposing shell execution and device capabilities as a streaming API. Built for AI agents, LLM tool-calling, and automation scripts.
AI Agent --> POST /run {"cmd": "ls -la"} --> Termux-MCP --> Termux Shell
|
<-- chunked streaming output -+
Two commands — which do I run?
| Command | What it is |
|---|---|
termux-mcp |
REST API daemon on :8080 (this README’s endpoints) |
termux-native-mcp |
Native MCP server (Model Context Protocol, spec 2025-06-18) for MCP clients: RikkaHub, desktop AI apps (Cursor, …) |
Both install together via pkg install termux-mcp and run as separate
processes — starting termux-native-mcp never touches the REST daemon’s
port, state or behavior.
termux-mcp # REST API on 127.0.0.1:8080
termux-native-mcp # native MCP, Streamable HTTP on 127.0.0.1:8081
termux-native-mcp --stdio # native MCP over stdin/stdout (desktop clients)
RikkaHub (same phone):
{
"type": "http",
"url": "http://127.0.0.1:8081/mcp",
"commonOptions": {
"name": "Termux",
"enable": true,
"headers": [["Authorization", "Bearer "]]
}
}
Desktop MCP client (over ssh): {"command": "ssh", "args": ["android", "termux-native-mcp", "--stdio"]}
Both servers share the same safety system (risk gates, file snapshots, trash) because they run the same handler code.
Installation
pip (recommended)
pkg update && pkg install python -y
pip install termux-mcp
termux-mcp
This installs a global termux-mcp command — it runs from any directory, and
pip install -U termux-mcp upgrades it.
From a clone
pkg update && pkg install python git -y
git clone https://github.com/termuxgpt/termux-mcp
cd termux-mcp
pip install .
termux-mcp
pip install . registers the command globally, so the cd is only needed for
the install itself. Without it, python -m termux_mcp only works from inside
the clone.
Package repository
curl -fSL https://termux-mcp.pages.dev/add-repo.sh | bash
pkg install termux-mcp
termux-mcp
Quick Test
curl http://localhost:8080/ping
curl -X POST http://localhost:8080/run -H "Content-Type: application/json" -d '{"cmd": "ls ~"}'
Termux Tutorial Apps (AD)
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →