Skip to main content
Glama

android_stop_scrcpy_stream

Stop screen mirroring from Android devices to computers using scrcpy. This tool terminates active streaming sessions for device management.

Instructions

Stop scrcpy streaming

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler function for the 'android_stop_scrcpy_stream' tool. It calls the ADBWrapper's stopScrcpyStream method and returns a success message or throws an error.
    export async function handleStopScrcpyStream(adb: ADBWrapper, args: StopScrcpyStreamArgs): Promise<{ content: Array<{ type: string; text: string }> }> { try { await adb.stopScrcpyStream(); return { content: [ { type: 'text', text: 'Scrcpy stream stopped successfully.', }, ], }; } catch (error) { throw new Error(`Failed to stop scrcpy stream: ${error instanceof Error ? error.message : String(error)}`); } }
  • Core implementation that terminates the scrcpy subprocess and cleans up the latest frame buffer and process reference.
    async stopScrcpyStream(): Promise<void> { if (this.scrcpyProcess) { this.scrcpyProcess.kill('SIGTERM'); this.scrcpyProcess = null; this.latestFrame = null; } }
  • Tool schema definition including name, description, and empty input schema in the ListTools response.
    name: 'android_stop_scrcpy_stream', description: 'Stop scrcpy streaming', inputSchema: { type: 'object', properties: {}, }, },
  • src/index.ts:496-497 (registration)
    Registration in the CallToolRequestSchema switch statement that dispatches to the handler function.
    case 'android_stop_scrcpy_stream': return await handleStopScrcpyStream(this.adb, args as any);

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