Oyster mushroom (Pleurotus ostreatus) has great potential in agricultural development with increasing global market demand. This research develops an intelligent cultivation system based on Mamdani fuzzy and IoT to control air temperature, air humidity, and soil moisture automatically and in real-time, using DHT22 sensor, resistive soil moisture sensor, and ESP32 as microcontroller. The test results show a high level of accuracy, with an average sensor error of 1% for air temperature, 3.8% for air humidity, and 9.3% for soil moisture. The validation of watering, humidification, and fan prediction times compared to MATLAB calculations is excellent, with MAPE values of 1.52%, 1.43%, and 1.43%, respectively. This system offers a more accurate and responsive automated solution compared to conventional cultivation management. Further testing on actual oyster mushroom farms is required to determine whether the system can adapt to varying environmental conditions. The system relies heavily on a stable internet connection to optimally perform the real-time Mamdani fuzzy calculation function.