McpConfig extension type

MCP server configuration for spry.config.dart.

on

Constructors

McpConfig({bool enable = false, int? port})
Creates an MCP configuration.
factory
McpConfig.fromJson(Map<String, Object?> json)
Wraps decoded JSON.
factory

Properties

enable → bool
Whether the MCP server is enabled.
no setter
port → int?
Optional MCP HTTP port override. Defaults to the app port + 1.
no setter

Methods

effectivePort(int defaultPort) → int
Effective MCP port — port if set, otherwise defaultPort + 1.