A. If the chimney and fireplace are solid masonry, the usual procedure to seal the joint is to bed a trim board in a good elastomeric caulk against the brick and the sheathing.
I do not know of any material that would provide a thermal break and that has the required fire resistance and bearing capacity to be included in a masonry fireplace. It is possible to insulate a brick fireplace by filling the cavity between the outer wythe of masonry and the flue with perlite or vermiculite (see illustration). A chimney-top...
to read the full article.