Setup mqtt for covers esphome

Is there a chance someone is able to help me out setting up mqtt for my esphome covers.
the code so far:

esphome:
  name: screen-3

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "abdaacbbcd904e626f97dc760950e0d9"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Screen-3 Fallback Hotspot"
    password: "KvvRTfhxCvVS"

captive_portal:

#Webportal
web_server:
  port: 80

switch:
#Restart 
  - platform: restart
    name: "Somfy Screen-3 restart"
    
#Somfy Screen 3
  - platform: gpio
    pin: 
      number: D1
      mode: output
      inverted: true
    id: up
    name: "Somfy 3 remote Up"
    on_turn_on:
      - delay: 500ms
      - switch.turn_off: up

  - platform: gpio
    pin: 
      number: D2
      mode: output
      inverted: true
    id: stop
    name: "Somfy 3 remote Stop"
    on_turn_on:
      - delay: 500ms
      - switch.turn_off: stop

  - platform: gpio
    pin: 
      number: D3
      mode: output
      inverted: true
    id: down
    name: "Somfy 3 remote Down"
    on_turn_on:
      - delay: 500ms
      - switch.turn_off: down
      
cover:
  - platform: template
    device_class: shutter
    name: "Screen3"
    assumed_state: true
    optimistic: true
    open_action:
      - switch.turn_on: up
    stop_action:
      - switch.turn_on: stop
    close_action:
      - switch.turn_on: down


Thanks in advance!

Simply

mqtt:
    broker: mqtt.lan
    username: !secret mqtt_user
    password: !secret mqtt_pwd
    discovery_prefix: "ha_stream"

Or do you mean setting MQTT altogether?

yes please. the goal is to control my covers via MQTT instead of the ESPHome API.