TermuxAI
FreeNot checkedAI Agent Android App with MCP Server Integration for Termux - Powered by NVIDIA NIM
About
AI Agent Android App with MCP Server Integration for Termux - Powered by NVIDIA NIM
README
Autonomous AI Agent for Android with Termux MCP Server Integration
Build Status License React Native TypeScript
Features • Installation • Configuration • Usage • Development • Contributing
📋 Overview
TermuxAI is a production-ready React Native Android application that combines AI Agent capabilities with Termux through MCP (Model Context Protocol) server integration. It enables autonomous command execution, file management, system monitoring, and intelligent conversation with OpenRouter-powered language models.
🎯 Key Highlights
- 🤖 AI Agent via OpenRouter: Powered by hundreds of models via OpenRouter (GPT, Claude, Gemini, Llama)
- 🔌 MCP Protocol: Seamless communication with Termux environment
- 💬 Real-time Streaming: Live AI response streaming
- 📁 File Manager: Browse, edit, and manage Termux files
- 🖥️ System Monitor: Real-time system information and command history
- ⚙️ Configurable: Extensive settings for customization
- 🔒 Secure: Token-based authentication and sandboxed execution
✨ Features
🤖 AI Agent Chat
- Real-time conversation with AI using the OpenRouter API
- Streaming responses for immediate feedback
- Command suggestion and auto-execution (optional)
- Multi-model support (Llama 3.1 8B/70B/405B, Nemotron 4, Mixtral)
- Conversation history with message types (user/assistant/system)
- Smart command detection in AI responses
📂 File Manager
- Browse Termux file system (
/data/data/com.termux/files/home) - Read and edit files directly
- Create new files with content
- Delete files and directories
- Visual file type indicators
- File size and permissions display
🖥️ System Monitor
- Real-time system information (CPU, Memory, Storage, Battery)
- Command execution with output display
- Command history tracking with exit codes
- Network status monitoring
- System uptime and resource usage
⚙️ Settings & Configuration
- OpenRouter API: Secure API key storage
- Model Selection: Choose from 5+ AI models
- MCP Server: Configure server URL and auth token
- AI Parameters: Adjust temperature (0.0-1.0) and max tokens (512-4096)
- Behavior: Toggle streaming, auto-execute, dark mode
- Security: Password-protected fields with show/hide toggle
🚀 Installation
Prerequisites
- Android Device/Emulator: Android 8.0+ (API level 26+)
- Node.js: v18+ and npm
- React Native CLI: Latest version
- Android Studio: For Android SDK and build tools
- Termux: Installed on Android device with MCP server running
Quick Start
Clone the repository
git clone https://github.com/yourusername/TermuxAI.git cd TermuxAIInstall dependencies
npm installSetup Android environment
# Ensure ANDROID_HOME is set export ANDROID_HOME=$HOME/Android/Sdk export PATH=$PATH:$ANDROID_HOME/emulator export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/tools/bin export PATH=$PATH:$ANDROID_HOME/platform-toolsStart Metro bundler
npm startBuild and run on Android
# Development build npm run android # Production build cd android && ./gradlew assembleRelease
📦 Pre-built APK
Download the latest release APK from Releases page.
⚙️ Configuration
1. OpenRouter API Setup
- Visit https://openrouter.ai/ and create an account
- Create an account and generate an API key
- Open TermuxAI → Settings → OpenRouter API Key
- Paste your API key and save
- Select your preferred model
2. Termux MCP Server Setup
On your Android device (Termux):
# Install Node.js
pkg update && pkg upgrade
pkg install nodejs
# Clone and setup MCP server (use the one from our previous build)
cd ~
wget https://www.genspark.ai/api/files/s/Z8LvHmeD -O termux-mcp-server.tar.gz
tar -xzf termux-mcp-server.tar.gz
cd termux-mcp-server
# Install dependencies
npm install
# Start the server
npm start
# Server will run on http://127.0.0.1:8080
In TermuxAI app:
- Open Settings → MCP Server Configuration
- Enter server URL:
http://127.0.0.1:8080 - (Optional) Set auth token if configured on server
- Save configuration
3. Environment Variables (Development)
Create .env file in project root:
OpenRouter_API_KEY=your_openrouter_api_key_here
MCP_SERVER_URL=http://127.0.0.1:8080
MCP_AUTH_TOKEN=your_optional_token
📱 Usage
Chat with AI Agent
- Open Chat tab
- Type your message or question
- AI will respond with suggestions or answers
- If AI suggests a command, you can:
- Review the command
- Execute it with one tap
- View the output in real-time
Example Conversations:
User: List all files in my home directory
AI: I'll execute: ls -la ~
[Output displayed in system message]
User: What's my CPU usage?
AI: Let me check your system resources...
[Shows parsed system information]
User: Create a Python script to calculate fibonacci
AI: [Generates script and offers to save it]
File Management
- Open Files tab
- Navigate through directories
- Tap folder to open, file to view/edit/delete
- Use + button to create new files
- Edit and save directly in the app
System Monitoring
- Open System tab
- View real-time system metrics
- Execute commands in the terminal section
- Review command history
- Refresh to update information
Settings Customization
- Open Settings tab
- Configure:
- OpenRouter API: Set API key and model
- MCP Server: Server URL and auth
- AI Behavior: Streaming, auto-execute, temperature, max tokens
- Save changes (persisted across app restarts)
🛠️ Development
Project Structure
TermuxAI/
├── android/ # Android native code
├── ios/ # iOS native code (future)
├── src/
│ ├── screens/ # React Native screens
│ │ ├── ChatScreen.tsx
│ │ ├── FileManagerScreen.tsx
│ │ ├── SystemScreen.tsx
│ │ └── SettingsScreen.tsx
│ ├── services/ # Core services
│ │ ├── AIAgent.ts # OpenRouter API client
│ │ └── MCPClient.ts # MCP protocol client
│ ├── store/ # Redux state management
│ │ ├── index.ts
│ │ └── slices/
│ │ ├── chatSlice.ts
│ │ ├── settingsSlice.ts
│ │ └── systemSlice.ts
│ └── types/ # TypeScript type definitions
├── .github/ # GitHub Actions workflows
├── App.tsx # Root component
├── package.json
├── tsconfig.json
└── README.md
Tech Stack
- Framework: React Native 0.74
- Language: TypeScript 5.3
- State Management: Redux Toolkit
- Navigation: React Navigation
- HTTP Client: Axios
- Storage: AsyncStorage
- Icons: React Native Vector Icons
- AI API: OpenRouter (OpenAI SDK compatible)
Building from Source
# Install dependencies
npm install
# Run TypeScript check
npx tsc --noEmit
# Run linter
npx eslint . --ext .ts,.tsx --fix
# Run tests
npm test
# Build Android APK
cd android
./gradlew assembleRelease
# Output: android/app/build/outputs/apk/release/app-release.apk
Debugging
# Enable React Native debugger
npm start -- --reset-cache
# Android logs
adb logcat | grep ReactNative
# Redux DevTools (in development)
# Install Redux DevTools browser extension
🤝 Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Code Standards
- Follow TypeScript best practices
- Use ESLint and Prettier for code formatting
- Write meaningful commit messages
- Add tests for new features
- Update documentation
📄 License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
See LICENSE file for details.
🙏 Acknowledgments
- OpenRouter: For AI inference across hundreds of models
- Termux: For Android Linux environment
- MCP Protocol: For standardized agent communication
- React Native: For cross-platform mobile development
- TermuxGPT: Inspiration for MCP integration
📞 Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
🗺️ Roadmap
- iOS support
- Voice input/output
- Plugin system for custom commands
- Cloud sync for conversations
- Multi-language support
- Advanced file editing (syntax highlighting)
- Docker integration
- SSH remote server support
- Workflow automation builder
Made with ❤️ for the AI and Termux community
⭐ Star this repo if you find it useful!
Installing TermuxAI
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/daviekumi-glitch/TermuxAIFAQ
Is TermuxAI MCP free?
Yes, TermuxAI MCP is free — one-click install via Unyly at no cost.
Does TermuxAI need an API key?
No, TermuxAI runs without API keys or environment variables.
Is TermuxAI hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install TermuxAI in Claude Desktop, Claude Code or Cursor?
Open TermuxAI on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
Roblox Studio
Enables AI coding tools to control Roblox Studio for workspace exploration, instance manipulation, and script management. It provides tools for playtesting, sce
by paralovAWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzMCP-Agent
A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)
by lastmile-aiSpring AI MCP Client
Provides auto-configuration for MCP client functionality in Spring Boot applications.
mcp.natoma.ai
A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)
MCPHub
Website to list high quality MCP servers and reviews by real users. Also provide online chatbot for popular LLM models with MCP server support.
MCP Servers Rating and User Reviews
Website to rate MCP servers, write authentic user reviews, and [search engine for agent & mcp](http://www.deepnlp.org/search/agent)
Compare TermuxAI with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
