
Nano Mcp Termux
io.github.Lmeng486Published by GitHub account Lmeng486v1.1.1Updated Oct 24, 2026
Zero-dependency single-file MCP server for Termux/Android, Raspberry Pi and Linux
Overview
A zero-dependency, single-file Python MCP server for Termux/Android, Raspberry Pi and Linux that reports device, runtime and path information to an AI…
- What you can do
- Inspect the device: battery, storage, architecture and memory via device_status
- Check server runtime health: process IDs, uptime, request counters, live children, memory use and Android process-killer risk
- Resolve Android/Termux paths: canonical form, mount point, noexec or read-only flags, case sensitivity and quoting warnings
- Read the environment profile: runtime class, home, prefix and temp directories, Android storage roots and noexec mounts
- When to use it
- Useful when running an AI client on Android/Termux, a Raspberry Pi or a small Linux box and you want the assistant to see device state, server health and filesystem quirks before running commands. It is a diagnostic sidecar, not a general command runner.
- Requirements
- Runs locally as a stdio process launched by the MCP client. Needs Python 3 (3.8+ source builds) or uvx/pip for the PyPI package; Docker is optional. No accounts, API keys or network access are declared. Optional environment variables NANO_IDLE_TIMEOUT and NANO_NO_WATCHDOG tune idle exit and the watchdog.
Installation
In SourceWeft
- Open Nano Mcp Termux in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
nano-mcp-termux
Zero-dependency, single-file MCP server for AI agents, natively running on Termux (Android), Raspberry Pi, and Linux.
[GitHub Repository] [License: MIT] [MCP Version] [Docker Ready] [Version] [Tests] [CI] [Zero Dependencies]
🚀 Quick Start
Local (Termux / Linux)
Docker
Health check (one-shot, no MCP handshake)
🔌 Connect to your MCP client
This server does not run standalone — it's a sidecar that your AI client connects to via the MCP protocol.
Below are the three most common ways to mount it.
Option 1 — Zero‑install (uvx), best for desktop AI clients
Then add this JSON to your AI client's mcpServers config (see client‑specific notes below):
Option 2 — Already pip installed, or you prefer a direct Python launch
Config snippet for your AI client:
Option 3 — Run the single file directly (e.g. inside Termux on Android)
Config snippet for your AI client:
How to use these snippets: client‑specific config files
Tip: after editing the config file, restart your AI client so the new server is detected. If the client supports hot‑reload, you may not need a restart.
Troubleshooting
🛠️ Features
- ✅ Zero-dependency: No external packages required
- ✅ Single-file: All logic in one Python script
- ✅ Cross-platform: Works in Termux (Android), on Raspberry Pi, Linux, and inside Docker
- ✅ Container-ready: Dockerfile at repo root for Glama introspection
- ✅ Standard stdio framing: Newline-delimited JSON-RPC (official MCP transport)
- ✅ Version negotiation: Echoes client
protocolVersion(2024-11-05 / 2025-06-18 / 2025-11-25), falls back to highest supported - ✅ Graceful degradation:
device_statusnever fails; unavailable inputs are marked, not crashed - ✅ [lifecycle] No orphaned processes: every command runs in its own process group; timeouts kill the whole tree (
SIGTERM→SIGKILL), never just the shell - ✅ [lifecycle] Self-terminating: parent-process watchdog + stdin-EOF detection + optional idle timeout, so a dead client never leaves a zombie server behind
- ✅ [lifecycle] Phantom Process Killer aware: reports Android 12+ child-count risk with concrete mitigations
- ✅ [paths] Android/Termux path adapter: resolves
/sdcard↔/storage/emulated/0↔$HOME/storage/shared, detectsnoexecmounts, case-insensitive filesystems, and shell-quoting hazards
🧩 Tools Overview
🔗 Protocol Surface
🔄 Why 1.1.0: the orphan-process bug
Version 1.0.0 ran commands with subprocess.run(..., timeout=...). On timeout,
Python terminates only the direct child — the sh -c wrapper. Anything the
shell had already spawned is reparented to init and survives forever. On
Android that is the exact leak class that trips the Phantom Process Killer
and can get the whole app group killed.
1.1.0 fixes this at the root: commands are spawned with start_new_session=True
and torn down with os.killpg(pgid, SIGTERM) → SIGKILL, so the entire process
tree dies together.
The repository ships a reproducible A/B regression test for it:
✅ Tests
verify_glama_build.sh answers one question: will Glama's builder be able to
install and introspect this repo? It replays the same toolchain Glama uses
(uv venv && uv pip install -e ., i.e. a newer setuptools than most dev
machines have), then asserts the console entry point exists and that the server
answers initialize + tools/list over stdio. Exit codes are deliberately
three-valued so the script never lies about whose fault a failure is:
The index is pinned to pypi.org on purpose — a local mirror inherited from
your shell profile can return 403 and make a healthy repo look broken. Override
with GLAMA_VERIFY_INDEX=https://your-mirror/simple only if you mean it.
Deprecation warnings about project.license are expected and non-fatal: the
SPDX form that silences them needs setuptools>=77, which requires Python 3.9+,
while this project still supports 3.8 source builds.
⚙️ Environment variables
🔗 Links
- Original repository: Lmeng486/nano-mcp-termux
- Verification report: awesome-termux-mcp
- Measured overhead report (this server as subject under test, all numbers from a real device): MCP on Mobile: Measured Overhead Report
- Dev.to article: Showdev: A zero-dependency MCP server that runs on Android Termux
- Glama score verification (TDQS 4.6 / grade A, with version-metadata forensics): docs/GLAMA-SCORE.md
This server is designed to pass Glama introspection checks and serve as a lightweight MCP implementation for mobile and edge devices.
Source: README.md at commit b37343f
Tools
0Version history
2- v1.1.1LatestOct 16, 2026
- v1.1.0Oct 12, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts