In recent years, middleware for mobile social network has attracted the attention of academia, causing the design and development of various approaches by researchers. This type of middleware facilitates and makes more efficient the development process of mobile social networking applications. Furthermore, middleware solutions also abstract the communication process with other applications, allowing the acquisition, persistence and reuse of social context information and location of users, besides providing API so that developers can access this information quickly and build new social applications. With a view to supporting this new trend of research, this paper presents a middleware for mobile social networking called My-Direct which makes use of Wi-Fi Direct technology together with the Bluetooth, aiming to provide flexible communication between the nodes of the mobile social network. Along with My-Direct also was created a mechanism for user privacy based on information available on his mobile device.