set_proxy
Configure HTTP proxy settings on Android devices to debug network requests and analyze traffic during development.
Instructions
Set HTTP proxy for the device - useful for debugging network requests
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| port | Yes | ||
| device_serial | No |
Implementation Reference
- src/adb_mcp_server/server.py:855-862 (handler)The implementation of the 'set_proxy' tool. This function is the handler that executes the tool logic by setting the global HTTP proxy settings on the Android device via ADB. It is automatically registered as an MCP tool via the @mcp.tool() decorator, which also infers the input schema from type hints.@mcp.tool() def set_proxy(host: str, port: int, device_serial: str | None = None) -> str: """Set HTTP proxy for the device - useful for debugging network requests""" return run_adb([ "shell", "settings", "put", "global", "http_proxy", f"{host}:{port}" ], device_serial)