The relevant points have already been made: (1) LSP is a JSON-RPC protocol, not a CLI app, and (2) Language Servers that implement LSP often utilize AST manipulation, even the resultant manipulations are exposed to the client via character ranges.
`ast-grep`, an AST-based search and transformation tool that may be closer in spirit to the cli functionality you describe, albeit more general-purpose:
https://github.com/ast-grep/ast-grep