Microbial metabolism and function are regulated by ambient microenvironment, yet no functional microporous materials are known to regulate anticancer activity of complex bacterial systems. Here we show that a simple scaffold-mediated bacterial culture is useful for enhancing the anticancer therapeutic abilities of a microbial consortium designated as AUN and composed of intratumoural bacteria Proteus mirabilis (A-gyo) and purple photosynthetic bacteria Rhodopseudomonas palustris (UN-gyo). Our discovery of the mechanism by which porous scaffolds influence the bacterial activities of AUN will facilitate further designs of artificial scaffold material for effective treatment against drug-resistant, triple-negative breast cancer models. A polydimethylsiloxane composite artificial scaffold encapsulating light-activatable TiO2 particularly enhanced the therapeutic outcomes of AUN in syngeneic and orthotopic models. These strong anticancer efficacies were synergistically expressed in tumours because of the potent oncolytic ability of AUN with the help of various immune cells. AUN administration to canines showed well tolerability in an exploratory study.