logo
0
0
WeChat Login

myt-chat

AI-powered mobile device control chat interface. Connects to Android devices via MCP (Model Context Protocol) and uses LLM + VLM to understand and interact with screen content.

Features

  • Natural language control of Android devices (tap, swipe, type, etc.)
  • AI vision (VLM) for screen understanding when UI nodes aren't enough
  • Real-time SSE event streaming with web UI
  • OpenAI-compatible API backend support

Architecture

User Input → myt-chat (Go) → LLM API → Tool Calls → MCP Server → Android Device
                                  ↑                                  |
                                  └── VLM (screenshot analysis) ←────┘

Prerequisites

  • Go 1.23+
  • A running MCP server (e.g. myt-mcp)
  • An OpenAI-compatible LLM API endpoint
  • (Optional) A VLM API endpoint for screen recognition

Build

go build -o myt-chat .

Configuration

Create config.json in the same directory as the binary:

{
  "ai": {
    "api_url": "http://your-llm-api/v1/chat/completions",
    "api_key": "your-api-key",
    "api_model": "your-model-name"
  },
  "vlm": {
    "api_url": "http://your-vlm-api/v1/chat/completions",
    "api_key": "your-vlm-key",
    "api_model": "your-vlm-model"
  },
  "mcp": {
    "server_path": "./myt-mcp"
  },
  "server": {
    "port": 8080
  },
  "log": {
    "ai": true,
    "vlm": true,
    "mcp": true
  }
}

Usage

# With config file
./myt-chat

# With flags
./myt-chat -api http://your-api/v1/chat/completions -key your-key -model your-model -mcp ./myt-mcp

# With env vars
export AI_API_URL=http://your-api/v1/chat/completions
export AI_API_KEY=your-key
./myt-chat

Open http://localhost:8080 in your browser, enter device IP, click connect, then chat.

API Endpoints

EndpointMethodDescription
/api/chatPOSTSend a chat message
/api/abortPOSTAbort current operation
/api/eventsGETSSE stream of chat events
/api/toolsGETList available MCP tools
/api/connectPOSTConnect to a device

License

MIT

About

No description, topics, or website provided.
Language
Go100%