Skip to main content
Glama

android_start_scrcpy_stream

Start continuous fast frame capture from Android devices using scrcpy for screen streaming and control.

Instructions

Start scrcpy streaming for continuous fast frame capture (requires scrcpy installed)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceSerialNoSpecific device serial number to target (optional)

Implementation Reference

  • The core handler function for the 'android_start_scrcpy_stream' tool. It extracts arguments, calls adb.startScrcpyStream, and returns success or error response.
    export async function handleStartScrcpyStream(adb: ADBWrapper, args: StartScrcpyStreamArgs): Promise<{ content: Array<{ type: string; text: string }> }> { const { deviceSerial } = args; try { await adb.startScrcpyStream(deviceSerial); return { content: [ { type: 'text', text: 'Scrcpy streaming started successfully. Use getLatestFrame to retrieve frames.', }, ], }; } catch (error) { throw new Error(`Failed to start scrcpy stream: ${error instanceof Error ? error.message : String(error)}`); } }
  • The input schema definition for the tool, registered in the listTools handler.
    { name: 'android_start_scrcpy_stream', description: 'Start scrcpy streaming for continuous fast frame capture (requires scrcpy installed)', inputSchema: { type: 'object', properties: { deviceSerial: { type: 'string', description: 'Specific device serial number to target (optional)', }, }, }, },
  • src/index.ts:494-495 (registration)
    The switch case that registers and dispatches the tool call to the handler function.
    case 'android_start_scrcpy_stream': return await handleStartScrcpyStream(this.adb, args as any);
  • TypeScript interface defining the input arguments for the handler, matching the tool schema.
    interface StartScrcpyStreamArgs { deviceSerial?: string; }

Latest Blog Posts

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/jduartedj/android-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server