Since a few weeks we have our first TFS (2013) setup. The setup is rather small and there are only a handful (read: 10) developers that will have to work with it for the tim
You are allowed to install Visual Studio on the build server without an additional license.
Using Visual Studio on the Build Server
If you have one or more licensed users of Visual Studio Ultimate with MSDN, Visual Studio Premium with MSDN, or Visual Studio Professional with MSDN, then you may also install the Visual Studio software as part of Team Foundation Server 2013 Build Services. This way, you do not need to purchase a Visual Studio license to cover the running of Visual Studio on the build server for each person whose actions initiate a build.
Visual Studio and MSDN Licensing White Paper
On our team, we don't actually have VS installed on our build server and are able to compile code and run unit tests, but you'll probably find it pretty straightforward to just install the 'highest' version of VS that your team has a license to just to keep it simple and not waste any time tracking down any issues.
For some more details, a similar question was asked recently