No. It's not a cost that would be considered a capital improvement. Capital improvements are attached to the structure or land such as a paved driveway or a shed or extend the life of the home.
This is not part of the home and the payment for membership is optional. Everyone in the community has the opportunity to use it by paying for a membership or community members do not have to pay or use the dock.
One more question. The membership gets transferred with the home, does that make a difference?
No. As DianneW777 stated in her answer, a membership such as this would not be considered a capital improvement (unlike adding a dock, for example) when calculating your cost basis.
For more information: IRS Pub. 523 Selling Your Home (pgs. 9-10)