Possibly dumb question: what is a language server in this context and what’s it used for outside of the AST package?

Look at https://microsoft.github.io/language-server-protocol/ for more info. It's a standard interface IDEs can use for things such as autocomplete rather than every IDE having to reinvent the wheel.

Interesting, I wonder if Vim is able to use this protocol as well.