I think the only brewery technically on Cape's mainland is in Hyannis. It's called Cape Cod Beer. The other brewery close just before the bridge is in Buzzard Bay Brewery and I think they just went under a name change to Just Beer Brewing in the Westport New Bedford area. I did a search and here's their webpage. I think they're doing other small biz brews. http://www.justbeer.us/
Sounds interesting but I'd call them first before you take a side trip.
P.S. - If you're heading to Truro hit Wellfleet. It's not as congested being on the outer cape and there's a couple of good restaurants. Even an authentic French pastry place worth the stop: Pb Boulangerie Bistro http://pbboulangeriebistro.com/
The chef use to work at the Wynn out in LV. The best bar on the cape is a cooler and a sand dune.