That's what a Dyson Sphere does; it encloses a star. This is a moderately interesting article about it.Well, yeah, but it's going to have to have a pretty big diameter!
Would building a Dyson sphere be worth it? We ran the numbers.
Here's the math behind making a star-encompassing megastructure.
arstechnica.com
What's amazing is that for a short time astronomers actually thought the Kepler Space Telescope might have detected one.
The Scientific Quest to Explain Kepler’s Most Enigmatic Find
Some 1,500 light years from Earth, a mystery of stellar proportions is playing out. The world has the chance to watch, as the scientific process and the mystery continue to unfold.
www.nasa.gov