Basically how to denote that class foo is from a different server than class bar ?
A class diagram only shows the relationships between classes, along with the methods and attributes of those classes. There's no inherent method to show what physical devices a class fits on, although you might be able to use notes attached to packages and classes.
If you are modeling a distributed system, consider using a deployment diagram to show the nodes in the network along with what modules exist on each node. At a much higher level, you might also consider using component diagrams to show the high level relationships between modules.
You can model more than one project at the same time. I mean to have a project with a class 1 and another project with a class 2. If you merge both models into a single big model then you can show relations between those two classes.
The merge is simple because you just need to drag and drop your class 2 coming from another project inside the class 1 diagram and the tool will immediately merge both project. It would also detect java dependencies between both projects if you work with Eclipse and select the Project > extends option.
A deployment diagram is also a good option but I prefer to model more than one project at the same time because in the real life this is what I do. I have currently more than 10 large projects which works together. Having a different model for each project would be difficult therefore a single model is better for me.