A recently developed nonlinear inviscid model of the equatorial undercurrent is coupled to wind-driven surface layer. Wind stress drives a poleward Ekman flow, causing equatorial divergence of surface layer transport. This divergence is balanced by upwelling of fluid supplied by zonal convergence of the undercurrent. In this manner, the imposed wind stress controls the zonal structure of the undercurrent transport. The meridional structure of the undercurrent is determined from the undercurrent transport, the thermocline structure outside the undercurrent, and conservation of potential vorticity and Bernoulli function by the inviscid undercurrent. Solutions are presented for two zonal profiles of zonal wind stress. For westward wind stress increasing linearly westward, eastward transport increases nearly linearly westward. For westward wind stress with a midbasin maximum, eastward transport has a maximum just west of the basin middle, and there is recirculation along the equator. Solutions are also presented for uncoupled models with several layers and with a deep constant potential vorticity layer.