autoglm-mcp-server
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., "@autoglm-mcp-serverOpen the camera app and take a photo"
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.
AutoGLM MCP Server
A Model Context Protocol (MCP) server for the AutoGLM-Phone API, enabling automated GUI interaction on mobile devices.
Overview
This MCP server provides tools for interacting with the AutoGLM-Phone API, which allows AI models to control mobile devices through a series of actions. The server supports Android (ADB).
Related MCP server: Android MCP Server
Quick Start
Using npx (Recommended)
# Run directly without installation
npx -y autoglm-mcp-server
# With options
npx -y autoglm-mcp-server --transport http --port 3000Global Installation
npm install -g autoglm-mcp-server
autoglm-mcp-serverLocal Installation
npm install autoglm-mcp-serverMCP Client Configuration
Claude Desktop / Cursor (stdio mode)
{
"mcpServers": {
"autoglm": {
"command": "npx",
"args": ["-y", "autoglm-mcp-server"],
"env": {
"AUTOGLM_API_KEY": "<YOUR_API_KEY>"
}
}
}
}StreamableHTTP Mode
First start the server:
npx -y autoglm-mcp-server --transport http --port 3000Then configure your MCP client:
{
"mcpServers": {
"autoglm": {
"url": "http://127.0.0.1:3000/mcp",
"headers": {
"Authorization": "<YOUR_API_KEY>"
}
}
}
}Configuration
Set the following environment variables:
export AUTOGLM_API_KEY="your-api-key-here"
export AUTOGLM_API_URL="https://open.bigmodel.cn/api/paas/v4" # optional
export AUTOGLM_MODEL="autoglm-phone" # optionalOr create a .env file based on .env.example.
Usage
Development
npm run devBuild
npm run buildProduction
# stdio mode (default)
npm start
# HTTP mode
node dist/index.js --transport http --port 3000
# SSE mode
node dist/index.js --transport sse --port 3000
# HTTP mode on all interfaces
node dist/index.js --transport http --host 0.0.0.0 --port 3000Command Line Options
Option | Alias | Description | Default |
|
| Transport type: |
|
|
| Port for HTTP/SSE transport |
|
|
| Host for HTTP/SSE transport |
|
| Show help message |
Available Tools
autoglm_list_adb_devices
List all Android devices connected via ADB (Android Debug Bridge).
Parameters:
response_format('markdown' | 'json', optional): Output format
Returns:
Device ID, status, connection type, model, Android version, screen dimensions
Example:
{}autoglm_task
Execute a task on a connected device using AutoGLM online model. The model will iteratively capture screenshots, analyze the screen, and execute actions until the task is complete.
Parameters:
prompt(string, required): Natural language task description (1-5000 characters)device_id(string, optional): Target ADB device IDmax_steps(number, optional): Maximum steps to execute (default: 100, range: 1-200)lang('cn' | 'en', optional): Language for responses (default: 'cn')
How it works:
Captures the current screen via ADB
Sends the screen image and task prompt to AutoGLM online model
The model analyzes the screen and decides on the next action
Executes the action via ADB
Repeats until the task is complete or max_steps is reached
Example:
{
"prompt": "Open WeChat and send a message to Mom saying hello",
"max_steps": 50,
"lang": "cn"
}Supported Actions
The AutoGLM model can execute the following actions:
Action | Description | Parameters |
Launch | Launch an application |
|
Tap | Tap at coordinates |
|
Type | Type text |
|
Type_Name | Type text by name |
|
Swipe | Swipe between coordinates |
|
Back | Go back | - |
Home | Go to home screen | - |
Double Tap | Double tap at coordinates |
|
Long Press | Long press at coordinates |
|
Wait | Wait for duration |
|
Take_over | Request human takeover |
|
Note | Add a note |
|
Call_API | Call an API endpoint |
|
Interact | Interact with UI element |
|
Coordinate System
All coordinates use a 0-1000 scale relative to screen size:
(0, 0) is top-left corner
(1000, 1000) is bottom-right corner
Project Structure
autoglm-mcp-server/
├── src/
│ ├── index.ts # Main server entry point
│ ├── constants.ts # Configuration constants
│ ├── types.ts # TypeScript type definitions
│ ├── tools/
│ │ └── autoglm-tools.ts # MCP tool implementations
│ ├── services/
│ │ ├── autoglm-api-client.ts # AutoGLM API client
│ │ ├── autoglm-client.ts # AutoGLM client wrapper
│ │ └── adb-service.ts # ADB device service
│ └── schemas/
│ └── index.ts # Zod validation schemas
├── dist/ # Compiled output
├── package.json
├── tsconfig.json
├── .env.example
└── README.mdHTTP/SSE Authentication
When using HTTP or SSE transport, you can pass the API key via the Authorization header:
# Bearer token format
curl -X POST http://localhost:3000/mcp \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"initialize",...}'References
License
MIT
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/DarkNoah/autoglm-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server