Build connect app for Jara Server

Would it be possible to build a Jira connect app (or follow the same concept where all development are host completely off the server) as a plugin for Jira server? Guidance is much appreciated.

Best,