# nano-mcp-termux [Health: Active]

**Category:** 🖥️ Command Line  
**Repository:** https://github.com/Lmeng486/nano-mcp-termux  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/nano-mcp-termux

## Description
Zero-dependency single-file MCP server for Termux/Android, Raspberry Pi and Linux.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "nano-mcp-termux": {
    "command": "uvx",
    "args": ["nano-mcp-termux"]
  }
}
```

## Documentation

## What nano-mcp-termux does

nano-mcp-termux provides an MCP interface for inspecting the environment where the server runs. Its focus is runtime and filesystem diagnostics rather than general command execution. The server is designed for Termux on Android, Raspberry Pi, Linux, and Docker-based environments, and is implemented as a single Python file with no external package dependencies.

The available tools cover four areas:

- `device_status` reports aggregate battery, storage, architecture, and memory information. Inputs that cannot be read are represented as unavailable fields instead of causing the tool to fail.
- `server_health` reports process identifiers, environment details, uptime, request counts, live children, reaping behavior, resident memory, and Android Phantom Process Killer risk.
- `resolve_path` examines an Android or Termux path, including its canonical form, mount point, execution and read-only status, case-sensitivity behavior, equivalent path spellings, and shell-quoting warnings.
- `path_adapter` describes the runtime profile, including `HOME`, `PREFIX`, and `TMPDIR`, Android storage roots, mount summaries, and mounts marked `noexec`.

## How it works

The server uses standard MCP stdio framing with newline-delimited JSON-RPC messages. An MCP client starts the process and communicates through its standard input and output; launching it without a connected client can cause the process to exit because it is stdio-bound. Supported protocol negotiation covers MCP versions `2024-11-05`, `2025-06-18`, and `2025-11-25`, with fallback to the highest supported version.

It implements initialization, initialized notifications, ping, tool listing, and tool calls. Unknown methods and tools receive JSON-RPC errors, while malformed JSON receives a parse error. Each command process runs in its own process group, allowing timeout cleanup to terminate the whole process tree. A parent watchdog, stdin-EOF detection, and optional idle timeout help prevent abandoned processes after a client disconnects.

## Setup and configuration

Run the script locally with Python 3:

```bash
python3 nano_mcp_termux.py
```

The package can also be launched with `uvx nano-mcp-termux` or installed with `pip install nano-mcp-termux`, after which the `nano-mcp-termux` command is available. Docker use is supported through the repository Dockerfile:

```bash
docker build -t nano-mcp-termux .
docker run -i --rm nano-mcp-termux
```

Configure the MCP client to start one of these commands, using an absolute script or executable path when it is not available in `PATH`. Restart the client after changing its MCP configuration unless it supports hot reload. A one-shot health check is available with `python3 nano_mcp_termux.py --health`; this does not perform an MCP handshake.

`NANO_IDLE_TIMEOUT` sets the number of inactive seconds before self-termination, with `0` disabling the feature. Set `NANO_NO_WATCHDOG=1` to disable the parent-process watchdog thread.

## Limitations and notes

The server is intended to be mounted as a sidecar by an MCP client, not operated as an independent interactive service. Android storage paths may have different spellings, mount permissions, execution restrictions, or quoting concerns; the path tools expose these conditions so an agent can account for them. Android 12 and later may impose child-process limits through the Phantom Process Killer, which is included in the health reporting and lifecycle diagnostics.

_Full upstream README: https://allmcps.com/mcp/nano-mcp-termux/readme_

