As the user's application makes item data API invocations on your client library (mc.get("some_key"), mc.delete("some_key"), your client library will hash the key ("some_key") into a vbucketId. Your client library must also encode a binary request message (following memcached binary protocol), but also also needs to include the vbucketId as part of that binary request message.
Python-aware readers might look at this implementation for an example.
Each membase server will double-check the vbucketId as it processes requests, and would return NOT_MY_VBUCKET error responses if your client library provided the wrong vbucketId to the wrong membase server. This mismatch is expected in the normal course of the lifetime of a cluster -- especially when the cluster is changing configuration, such as during a Rebalance.