Metadata-Version: 2.4
Name: autoglm-mcp
Version: 0.1.2
Summary: AutoGLM MCP Server - Android screen analysis via MCP protocol
Project-URL: Homepage, https://github.com/xiangaoole/autoglm-mcp
Project-URL: Repository, https://github.com/xiangaoole/autoglm-mcp
Project-URL: Documentation, https://github.com/xiangaoole/autoglm-mcp#readme
Project-URL: Changelog, https://github.com/xiangaoole/autoglm-mcp/blob/main/CHANGELOG.md
Project-URL: Bug Tracker, https://github.com/xiangaoole/autoglm-mcp/issues
Author: Open-AutoGLM Team
Maintainer: Open-AutoGLM Team
License: MIT License
        
        Copyright (c) 2026 Harold Gao
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: ai,android,autoglm,automation,claude,llm,mcp,screen-analysis
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: mcp>=1.0.0
Requires-Dist: openai>=1.0.0
Provides-Extra: dev
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# AutoGLM MCP Server

Android screen analysis capabilities via MCP protocol.

## Installation

### Option 1: Using uvx (Recommended)

No manual installation required. Just add to AI agent MCP config:

```json
{
  "mcpServers": {
    "autoglm-mcp": {
      "command": "uvx",
      "args": ["autoglm-mcp"],
      "env": {
        "AUTOGLM_BASE_URL": "https://api.z.ai/api/paas/v4",
        "AUTOGLM_MODEL": "autoglm-phone-multilingual",
        "AUTOGLM_APIKEY": "your-api-key-here"
      }
    }
  }
}
```

### Option 2: pip install

```bash
pip install autoglm-mcp
```

Then configure AI agent MCP:

```json
{
  "mcpServers": {
    "autoglm-mcp": {
      "command": "autoglm-mcp",
      "env": {
        "AUTOGLM_BASE_URL": "https://api.z.ai/api/paas/v4",
        "AUTOGLM_MODEL": "autoglm-phone-multilingual",
        "AUTOGLM_APIKEY": "your-api-key-here"
      }
    }
  }
}
```

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `AUTOGLM_APIKEY` | API key (required) | - |
| `AUTOGLM_BASE_URL` | API endpoint | `https://api.z.ai/api/paas/v4` |
| `AUTOGLM_MODEL` | Model name | `autoglm-phone-multilingual` |

## Usage

Ensure your phone is connected via ADB, then use the `aiAsk` tool in AI agent:

- "What are the coordinates to click the search button?"
- "How do I open Settings?"

Returned coordinates are relative values (0-1000), convert to pixels:
```
x_pixel = int(x / 1000 * screen_width)
y_pixel = int(y / 1000 * screen_height)
```
