Background Community pharmacies play a key role in health-care systems, dispensing prescriptions and providing medicine-related services. Service provision varies across community pharmacy organisations and may depend on organisational characteristics, such as ownership, staffing and skill mix. Objectives To inform the commissioning of community pharmacy services by (1) exploring variation in clinical productivity (levels of service delivery and service quality) in pharmacies, (2) identifying the organisational factors associated with this variation and (3) developing a toolkit for commissioners. Design Mixed-methods study: community pharmacy survey, administrative data analysis, patient survey, stakeholder interviews and toolkit development. Setting Nine socioeconomically diverse geographical areas of England. Participants Stage 1: community pharmacies in nine study areas. Stage 2: in 39 pharmacies, two consecutive samples of approximately 30 patients each following receipt of (1) dispensing and (2) medicines use review (MUR) services. Pharmacy and commissioning representatives from across all types of pharmacy and study sites. Main outcome measures Stage 1: dispensing, MUR, new medicines service volume and safety climate. Stage 2: patient satisfaction, Satisfaction with Information about Medicines Scale (SIMS) and Medication Adherence Report Scale (MARS). Data sources Stage 1: (i) community pharmacy activity data; (ii) socioeconomic and health needs data; and (iii) community pharmacy questionnaire (ownership type, organisational culture, staffing and skill mix, working patterns, management structure, safety climate, pharmacy–general practice integration), all linked by pharmacy postcode and organisational ‘F’ code. Stage 2: (i) patient questionnaire (background, patient satisfaction, SIMS, MARS); (ii) semistructured stakeholder interviews (variation in quantity and quality of service provision, opportunities and barriers to clinical productivity, mechanisms by which different organisational characteristics may help or hinder clinical productivity). Quantitative data were analysed by fitting a series of fixed-effects linear, logistic and multilevel logistic regression models in Stata® (version 13; StataCorp LP, College Station, TX, USA). Qualitative data were analysed thematically using a framework approach in NVivo10 (QSR International, Warrington, UK). Results In stage 1, 285 out of 817 pharmacy questionnaires were returned [valid response rate 34.6% (277/800)]. In stage 2, 1008 out of 2124 patient questionnaires were returned [valid response rate 46.5% (971/2087)]. Thirty pharmacy and 10 commissioning representatives were interviewed face to face or by telephone. Following integration of stage 1 and 2 findings, clinical productivity was associated with pharmacy ownership type, organisational culture, staffing and skill mix, and pharmacy–general practice relationships. Extra-organisational associations included local area deprivation, age profile and health needs, pharmacy location, public perceptions and expectations, supply chain problems, commissioning structures/processes, levels of remuneration and legal/regulatory constraints. Existing arrangements for monitoring clinical productivity focused primarily on quantity. Limitations Non-random selection of study sites and non-participation by four major pharmacy chains limited generalisability. Investigation of the full scope of pharmacy service provision was prevented by a lack of available activity data for locally commissioned services. Quantitative exploration of service quality was limited by available validated measures. Conclusions These findings have important implications for community pharmacies and service commissioners, highlighting the importance of ownership type, organisational culture, staffing and skill mix for maximising the delivery of high-quality pharmacy services and informing the development of a commissioners’ toolkit. Future work Future studies should (1) develop tools to measure community pharmacy service quality; (2) describe and evaluate different models of skill mix; and (3) explore how services are commissioned locally from community pharmacies and the extent to which local needs are met. Funding The National Institute for Health Research Health Services and Delivery Research programme.