Hello & welcome to the forum
Getting a med berth is easier said than done, much of it depends on the size of boat 10 - 12 metres are the most difficult to find. Now is the worst time of year as most of the marinas will be full & the majority will have 2 to 3 year waiting lists One way is to buy a boat over there that is already on a berth, another is to buy a berth outright or failing that try the bung. always works for me but must be done subtley otherwise offence will be taken.
Will send you a usefull web site in a little while...............Nat
you've asked specifically re berting on the Costa Brava - I can't comment on that area as we've been on the Blanca for the last 2 years. However you might find that this company could assist in locating a berth for you: http://www.mundo-maritimo.com/
Try Roses near Empruibrava (er... however you spell it!), quite good reasonable and last time I was there a few weeks ago there were quite a few empty berths.