liveBook · Manning

Language server protocol

As explained in Vibe Engineering

Language Server Protocol is a JSON-RPC-based standard through which editors and development tools obtain language-aware services from language servers.

Language Server Protocol (LSP) is a JSON-RPC standard connecting editors or development tools with language servers. A language server exposes a compiler’s semantic model uniformly, enabling autocomplete, go-to-definition, type hovers, refactorings, semantic tokens, and code actions without binding those capabilities to one IDE. section 3.3.4

LSP provides compiler-level build-time truth, including:

  • Resolved types, such as the inferred type of a field. section 3.3.4
  • Dependency versions, transitive libraries, class paths, symbols, and source JAR information. section 3.3.4
  • A boundary between compiler knowledge and operational behavior: deployment JVMs, containers, and Kubernetes targets remain outside LSP’s view. section 3.3.4

MCP integration with Metals

An AI agent can query the Scala LSP server Metals through MCP, with Claude Desktop acting as the MCP client. Metals understands the build, indexes symbols and types, and exposes the project’s class path. section 3.3.4

Figure 3.4 MCP ↔ LSP (Metals) with Claude Desktop as MCP Client.

Shows the MCP-to-LSP arrangement connecting Claude Desktop with Metals. section 3.3.4

How Vibe Engineering covers it

How deep it goes
Explains JSON-RPC services and build-time inspection, while stopping short of runtime deployment behavior.
Examples
Uses Scala Metals, Claude Desktop, inferred types, class paths, dependency versions, and source JARs.
What it assumes
Assumes an editor or agent, a language server, and a project understood through its build system.
What you can do after
Evaluate build-time types and dependencies through an LSP server, without treating them as runtime configuration.
How it connects
Connects JSON-RPC, language servers, compilers, IDEs, MCP, build systems, 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.