A language server exposes a compiler’s semantic model through the Language Server Protocol (LSP), a JSON-RPC-based standard between editors or IDEs and language-aware tooling. It enables autocomplete, go-to-definition, type hover, refactorings, semantic tokens, and code actions without tying those capabilities to one IDE. section 3.3.4
Its strongest contribution is build-time truth: resolved types, dependency versions, symbols, sources, and classpaths as the compiler understands them. That authority has a boundary: deployment configuration and runtime behavior belong to a different layer. section 3.3.4
Scala project analysis
Metals understands a Scala project through its build system, indexes symbols and types, tracks the full classpath, and can expose compiler-level access through MCP to an agent. An agent can inspect the inferred type of a field such as avatarUrl and resolve transitive dependency versions, but should not treat that information as production runtime truth. section 3.3.4
Figure 3.4 MCP ↔ LSP (Metals) with Claude Desktop as MCP Client.

Shows an MCP client connected to Metals as an LSP server for compiler-aware project access. section 3.3.4
