expose server in API

using it for CLI building of resources