Antigravity Mobile Command MCP Server
# š Antigravity Mobile Command
**Transform your mobile device into a remote Mission Control for your coding environment.**
Antigravity Mobile Command is an "Agentic Bridge" that leverages Google Antigravity's native Model Context Protocol (MCP) and Artifact system to provide a bi-directional, real-time feedback loop via Telegram.

## ⨠Features
- **š± Prompt-to-Action Loop**: Send coding tasks from your phone, approve plans with inline buttons
- **šø Visual Verification**: Auto-receive screenshots and recordings of UI changes
- **ā
Interactive Governance**: Approve or reject code diffs via Telegram buttons
- **šØ Error Awareness**: Get notified of terminal crashes with full stack traces
- **š Live Status Ticker**: Real-time progress updates without message spam
## š ļø Quick Start
### Prerequisites
- Python 3.10+
- A Telegram Bot Token (from [@BotFather](https://t.me/BotFather))
- Your Telegram Chat ID (from [@userinfobot](https://t.me/userinfobot))
### Installation
```bash
# Clone the repository
git clone https://github.com/yourusername/antigravity-telegram.git
cd antigravity-telegram
# Install dependencies
pip install -e .
# Or with uv
uv pip install -e .
```
### Configuration
1. Copy the example environment file:
```bash
cp .env.example .env
```
2. Edit `.env` with your credentials:
```bash
TELEGRAM_BOT_TOKEN=your_bot_token_from_botfather
AUTHORIZED_CHAT_IDS=your_chat_id
ARTIFACTS_PATH=~/.gemini/antigravity/artifacts
```
### Running
**Run both Telegram bot and MCP server:**
```bash
python -m src.main
```
**Run only the Telegram bot:**
```bash
python -m src.main --mode bot
```
**Run only the MCP server (for Antigravity integration):**
```bash
python -m src.main --mode mcp
```
## š Antigravity MCP Integration
### 1. Add to MCP Config
Add the Telegram bridge to your Antigravity MCP configuration (`~/.gemini/mcp_config.json`):
```json
{
"mcpServers": {
"telegram-bridge": {
"command": "python",
"args": ["-m", "src.main", "--mode", "mcp"],
"cwd": "/path/to/antigravity-telegram",
"env": {
"TELEGRAM_BOT_TOKEN": "your_token",
"AUTHORIZED_CHAT_IDS": "your_chat_id",
"ARTIFACTS_PATH": "~/.gemini/antigravity/artifacts"
}
}
}
}
```
### 2. Copy the Workflow
Copy the workflow file to your Antigravity workflows:
```bash
cp workflows/mobile-command.md ~/.agent/workflows/
```
### 3. Use from Telegram
1. Start a chat with your bot on Telegram
2. Send `/start` to verify the connection
3. Send `/prompt "Your coding task here"`
4. Approve plans and review changes from your phone!
## š± Telegram Commands
| Command | Description |
|---------|-------------|
| `/start` | Show welcome message and verify connection |
| `/prompt <text>` | Send a coding task to Antigravity |
| `/status` | Check current execution status |
| `/cancel` | Cancel the current operation |
| `/help` | Show help message |
## š§ MCP Tools Available
The following tools are exposed to Antigravity for communication:
| Tool | Description |
|------|-------------|
| `send_telegram_message` | Send messages to the user |
| `request_plan_approval` | Request approval for implementation plans |
| `request_change_approval` | Request approval for code changes |
| `send_artifact` | Send screenshots/recordings to Telegram |
| `update_status` | Update the status ticker message |
| `notify_error` | Send critical error notifications |
| `await_user_response` | Wait for user input |
## šļø Architecture
```
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā š± Telegram āāāāāāŗā š Python āāāāāāŗā š Antigravity ā
ā App ā ā Bridge ā ā Agent ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāā
ā š Artifact ā
ā Watcher ā
āāāāāāāāāāāāāāāāāāāā
```
## š Project Structure
```
antigravity-telegram/
āāā src/
ā āāā main.py # Entry point
ā āāā config.py # Configuration management
ā āāā bot/
ā ā āāā handlers.py # Telegram command handlers
ā ā āāā keyboards.py # Inline keyboard builders
ā ā āāā message_queue.py # Async message queue
ā āāā mcp_server/
ā ā āāā server.py # MCP server implementation
ā ā āāā tools.py # MCP tool definitions
ā ā āāā state.py # Approval state management
ā āāā monitors/
ā ā āāā artifacts.py # Artifact directory watcher
ā ā āāā terminal.py # Terminal output monitor
ā āāā utils/
ā āāā formatting.py # Message formatting
āāā config/
ā āāā mcp_config.json # MCP config template
āāā workflows/
ā āāā mobile-command.md # Antigravity workflow
āāā .env.example
āāā pyproject.toml
āāā README.md
```
## š Security
- Only authorized chat IDs can interact with the bot
- Bot tokens are stored in environment variables
- Session files are gitignored
## š License
MIT License - see [LICENSE](LICENSE) for details.
## š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
---
Built with ā¤ļø for the Antigravity community
TDQS
Scored across 17 tools
Tools are largely distinct, with clear semantic purposes for each communication or file operation. Some overlap exists between messaging tools (send_telegram_message vs send_code_update) and between prompt-waiting tools (await_user_response vs wait_for_new_prompt), but descriptions clarify intended use cases.
All tool names follow a consistent verb_noun pattern in lower_snake_case, making the API predictable and easy to navigate.
At 17 tools, the set is slightly large, but each tool addresses a distinct need in the mobile command workflow, covering both communication and project operations. It feels heavy but not bloated.
The toolset covers the core lifecycle of receiving prompts, exploring modules, editing files, running commands, and sending updates/approvals. Minor gaps exist (e.g., no dedicated delete file) but can be worked around via terminal commands.