HI Gem,
We spent two weeks in Cape Cod two summers ago. Admittedly, we didnt have a sprog yet then, but:
We stayed in Hyannis, which was central for trips to Nantucket, Martha's Vineyard, Provincetown, and also New York and Boston.
I can recommend the Green Mountain Inn and also (down the road) the Sea Beach Inn. Both had really friendly Innkeepers who couldnt do enough for you. Your best bet as a family is to stay in an "efficiency" which is really a self catering room.
In Hyannis you are close to lovely beaches, and within walking distance of the ferry port etc. There are nice little shops and restaurants, and even an outlet mall if shopping is your thing. We were there for 4 July, which was fun to see in a small town environment.
We found staying in Boston really expensive, even for just the two of us, although we loved the city and there was heaps to see there. A definite must is the natural history museum at Harvard University...wow.
There really is so much to see and do - we decided that we would definitely go back to Cape Cod on a family holiday as it was such a friendly place. There are loads of resources on the net, and we booked everything on line too.
Best of Luck with your planning.
GG