Purpose – In the last decade, web services have become a major technology to implement loosely coupled business processes and perform application integration. Through the use of context, a new generation of web services, namely contextaware web services (CASs), is currently emerging as an important technology for building innovative contextaware applications. Unfortunately, CASs are still difficult to build. Issues like lack of context provisioning management approach and lack of generic approach for formalizing the development process need to be solved in the first place for easy and effective development of CASs. The purpose of this paper is to investigate the techniques on developing CASs. Design/methodology/approach – The paper focuses on introducing a modeldriven platform, called ContextServ, and showcasing how to use this platform to rapidly develop a contextaware web application, Smart Adelaide Guide. ContextServ adopts a modeldriven development (MDD) approach where a Unified Modeling Language (UML)based modeling language – ContextUML – is used to model web services and its contextawareness features. Findings – The paper presents novel techniques for efficient and effective development of CASs using a MDD approach. The ContextServ platform is the only one that provides a comprehensive software toolset that supports graphical modeling and automatic model transformation of CASs. Practical implications – The proposed approach has been validated in practice by developing various CASs. The experimental study demonstrates the efficiency and effectiveness of the approach. Originality/value – The paper presents a novel platform called ContextServ, which offers a set of visual editing and automation tools for easy and fast generating and deploying CASs.