dsapi-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., "@dsapi-mcp-serverWhat's on the screen right now?"
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.
dsapi-mcp-server
一个面向 Android 自动化的 MCP Server:通过 DirectScreenAPI 拉取屏幕帧,并提供点击、滑动、缩放、系统按键等能力。
特性
屏幕截图:返回 JPEG 图片和结构化元信息(分辨率、缩放比、frame_seq)。
手势控制:
tap、long_press、swipe、drag_and_drop、zoom。系统按键:
system_nav、volume_up、volume_down。坐标换算:自动把模型坐标映射回物理屏幕坐标,减少点位偏差。
Related MCP server: @wilsonbeam/openclaw-adb-mcp
项目结构
.
├── server.py # MCP 工具注册与运行时编排
├── dsapi_client.py # DirectScreenAPI 协议客户端(取帧/触控)
├── image_pipeline.py # 图像处理(刻度绘制、缩放、JPEG 编码)
├── config.yaml # 运行配置
└── requirements.txt # Python 依赖环境要求
Python 3.10+
Android 端已启动 DirectScreenAPI
本机可访问 UDS 文件(默认:
DirectScreenAPI/artifacts/run/*.sock)
快速开始
安装依赖:
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt检查 Socket 文件(按需修改
config.yaml):
ls -l DirectScreenAPI/artifacts/run/dsapi*.sock启动服务:
python server.py配置说明
默认读取同目录下 config.yaml,也可通过环境变量覆盖:
export DSAPI_MCP_CONFIG=/path/to/config.yaml常用配置项:
uds.data_socket:数据通道 socket 路径。timeouts.frame_wait_timeout_ms:单帧等待超时。image.max_long_edge:图片最长边,值越大越清晰(带宽/体积更高)。image.jpeg_quality:JPEG 质量(推荐 85~92)。image.jpeg_subsampling:色度子采样(0清晰度最高)。image.enable_sharpen:是否启用锐化增强。image.axis_font_size:坐标字体大小(0表示自动)。image.enable_axis:是否绘制边框刻度。system_control.use_su:是否通过su -c input ...发送系统按键。
路径解析规则:
config.yaml里的uds.*socket支持相对路径,服务会自动按config.yaml所在目录解析为绝对路径,避免受启动 cwd 影响。
客户端接入示例
Claude Desktop
在 Claude Desktop 的 MCP 配置文件中加入:
{
"mcpServers": {
"dsapi-mcp-server": {
"command": "/path/to/dsapi-mcp-server/.venv/bin/python",
"args": [
"/path/to/dsapi-mcp-server/server.py"
],
"env": {
"DSAPI_MCP_CONFIG": "/path/to/dsapi-mcp-server/config.yaml"
}
}
}
}通用 stdio MCP 客户端
若客户端支持以命令启动 MCP Server,可使用:
/path/to/dsapi-mcp-server/.venv/bin/python /path/to/dsapi-mcp-server/server.py并设置环境变量:
DSAPI_MCP_CONFIG=/path/to/dsapi-mcp-server/config.yaml接入后验证
在 MCP 客户端中刷新工具列表,确认出现
get_annotated_screen。调用
get_annotated_screen(),应返回一张图片和status: ok的结构化结果。再调用
tap(x, y)做一次点击验证触控链路。
MCP 工具清单
get_annotated_screen():获取带坐标刻度的屏幕截图和元信息。tap(x, y):单击。long_press(x, y, duration_ms=1000):长按。swipe(start_x, start_y, end_x, end_y, duration_ms=300):滑动。drag_and_drop(start_x, start_y, end_x, end_y, hold_ms=500, duration_ms=500):拖拽。zoom(center_x, center_y, direction, distance=400, duration_ms=300):双指缩放,direction取in/out。system_nav(action, repeat=1, interval_ms=80):系统导航键,action支持back/home/recents。volume_up(steps=1, interval_ms=80):音量增加。volume_down(steps=1, interval_ms=80):音量减少。
常见问题
touch_stream_handshake_*:通常是uds.data_socket路径不对,先确认 DirectScreenAPI 已启动。Permission denied(系统按键):设备未授权su或不支持 root,改为system_control.use_su: false后重试。截图超时:增大
timeouts.frame_wait_timeout_ms,并检查设备端是否持续产出帧。
许可证
本项目采用 MIT License。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityCmaintenanceA lightweight MCP server for Android operating system automation. This server provides tools to interact directly with Android devices and app interaction with control3
- FlicenseBqualityDmaintenanceMCP server for Android device automation via ADB, enabling screen control, phone functions, app management, and device control.301
- Alicense-qualityCmaintenanceMCP server for controlling Android devices over ADB, using direct commands and semantic accessibility selectors with a Kotlin helper APK.128MIT
- AlicenseBqualityAmaintenanceMCP server for Android emulator automation via ADB.179794MIT
Related MCP Connectors
MCP server for Appcircle mobile CI/CD platform.
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/ccc007ccc/dsapi-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server