Mcp constructor

const Mcp({
  1. McpTransport transport = McpTransport.stdio,
  2. bool generateJson = false,
  3. int port = 3000,
  4. String address = '127.0.0.1',
  5. String? toolPrefix,
  6. bool autoClassPrefix = false,
  7. bool generateOpenApi = false,
})

Creates an MCP configuration annotation.

transport determines the communication protocol (stdio or HTTP). generateJson controls whether to generate additional JSON metadata. port specifies the HTTP server port (default: 3000). address specifies the HTTP bind address (default: '127.0.0.1'). toolPrefix adds a prefix to all tool names in this scope. autoClassPrefix automatically prefixes tool names with class name. generateOpenApi controls whether to generate OpenAPI specification.

Implementation

const Mcp({
  this.transport = McpTransport.stdio,
  this.generateJson = false,
  this.port = 3000,
  this.address = '127.0.0.1',
  this.toolPrefix,
  this.autoClassPrefix = false,
  this.generateOpenApi = false,
});