start method

Future<void> start({
  1. int port = 7930,
})

Bind the endpoint on 127.0.0.1:[port]/mcp and register the four tools. Idempotent-safe: a second call while already started is a no-op.

Implementation

Future<void> start({int port = 7930}) async {
  if (_boot != null) return;
  final boot = ServerBootstrap(
    name: 'appplayer-debug',
    version: '0.1.0',
    debugMode: true,
  );
  _registerTools(boot);
  await boot.startStreamableHttp(
    host: '127.0.0.1',
    port: port,
    endpoint: '/mcp',
  );
  _boot = boot;
}