termux-mcp-shell
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@termux-mcp-shelllist files in my home directory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
termux-mcp-shell
MCP server (Streamable HTTP) that gives an agent full shell access on Termux, plus pi-grade file read/write/edit tools.
Install
pkg install python
pip install -r requirements.txtDependencies (see requirements.txt): only the mcp SDK is required. It pulls
in uvicorn + starlette (the ASGI runner for the Streamable HTTP transport),
plus httpx, anyio, pydantic, etc. as transitive deps. Everything else the
server uses is from the Python standard library.
Related MCP server: TermPipe MCP
Run
python server.pyBinds 0.0.0.0:8088 by default. MCP endpoint: /mcp.
Local:
http://127.0.0.1:8088/mcpLAN/hotspot:
http://<device-ip>:8088/mcp
Find the device IP with ifconfig or ip addr.
Configuration (env)
Env | Default | Description |
|
| bind address |
|
| port |
|
| max stdout/stderr bytes per reply |
|
| output buffers kept in memory (FIFO) |
|
| max lines per |
|
| max bytes per |
Tools
run_command(command, timeout?, cwd?): run via/bin/sh -c. Output larger thanMCP_TRUNC_LIMITbytes is truncated; the full output is kept in a buffer, get thesession_idfrom the result to read the rest.read_output(session_id, stream?, offset?, length?): read a continued chunk from a command's output buffer (stream:stdout/stderr).read_file(path, offset?, limit?): read a text file with 1-indexed line numbers.offset= start line,limit= number of lines. Auto-truncates at 2000 lines / 50KB and returnsnext_offsetto continue.write_file(path, content): create or overwrite a file; parent dirs are created automatically.edit_file(path, edits): exact-text replacement, modeled after pi.editsis a list of{old_text, new_text}. Eachold_textmust match exactly and be unique, is matched against the original content, must not overlap, and all edits apply atomically (all-or-nothing). If an exact match fails, a fuzzy match is tried (trailing whitespace, smart quotes, unicode dashes/spaces). CRLF line endings and BOM are preserved. Returns a unified diff.
Security note
No auth. Anyone on the same network can execute commands. Use only on a trusted network (your own device / private hotspot).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nelvinzfx/termux-mcp-shell'
If you have feedback or need assistance with the MCP directory API, please join our Discord server