@hrefna well, kind of.
I mean, it's a RESTful API, so it really needs an HTTP server to function.
But mostly, AP is about actor-to-actor communications.
We have one optimization, the shared inbox, that groups users together, which is probably the only part of the spec that reifies something like a Mastodon instance.
I think the best implementations make the server an actor in its own right, which can do activities and can be followed.