liveBook · Manning

Metals

As explained in Vibe Engineering

Metals is a Language Server Protocol implementation for Scala that provides compiler-aware code analysis and development tooling.

Metals is a Scala Language Server Protocol implementation that exposes compiler-aware project information to editors, IDEs, and MCP-connected agents. It understands the build, indexes symbols and types, and resolves the project ClassPath, including dependency versions, sources, and transitive libraries. section 3.3.4

Its value is authoritative build-time truth rather than runtime truth. Metals can reveal inferred types and resolved dependencies, but deployment details such as the production JVM, containers, and Kubernetes environment remain outside LSP's view. section 3.3.4

Connected through LSP and MCP, Metals enables agents to:

  • Inspect definitions, inferred types, dependency versions, and source JARs. section 3.3.4
  • Support autocomplete, go-to-definition, type-hover, refactorings, semantic tokens, and code actions independently of a specific IDE. section 3.3.4
Figure 3.4 MCP ↔ LSP (Metals) with Claude Desktop as MCP Client.

Shows Claude Desktop acting as the MCP client while Metals provides compiler-level access to a Scala project. section 3.3.4

How Vibe Engineering covers it

How deep it goes
Explains project indexing, ClassPath resolution, inferred types, and the boundary between build-time and runtime truth.
Examples
Uses inferred avatarUrl types, resolved transitive dependencies, source JARs, and a Claude Desktop-Metals setup.
What it assumes
Assumes a Scala project understood through its build system and an editor, IDE, or MCP client connecting through LSP.
What you can do after
Evaluate Scala code and dependencies against compiler-resolved project truth while separating it from deployment behavior.
How it connects
Connects Language Server Protocol, MCP, Scala, JSON-RPC, build systems, compilers, and dependency resolution.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vibe Engineering. The section links point to the parts of the book it draws on.