@tjm mathstodon claims to have this technology https://mathstodon.xyz/about/more but i can't find their source code. i'll ask the admin, they're obligated to provide it under the terms of the AGPL. (probably won't deploy here, but it would be good if other instances could do so)