createServer static method

Server createServer(
  1. McpServerConfig config
)

Create a new MCP server with the specified configuration

Implementation

static Server createServer(McpServerConfig config) {
  if (config.enableDebugLogging) {
    Logger.root.level = Level.FINE;
  }

  return Server(
    name: config.name,
    version: config.version,
    capabilities: config.capabilities,
  );
}