Open PluginsSupported Agents

For Plugin Builders

For Agent Builders

LSP Servers

Language Server Protocol configurations for real-time code intelligence.

Plugins can provide Language Server Protocol (LSP) server configurations to give agents real-time code intelligence — diagnostics, go-to-definition, find references, and hover information.

Important: Binary Not Bundled

LSP plugins configure how the host tool connects to a language server. They do not bundle the language server binary itself. Users MUST install the required language server separately.

Configuration Format

LSP servers are configured in .lsp.json at the plugin root.

{
  "go": {
    "command": "gopls",
    "args": ["serve"],
    "extensionToLanguage": {
      ".go": "go"
    }
  },
  "python": {
    "command": "pyright-langserver",
    "args": ["--stdio"],
    "extensionToLanguage": {
      ".py": "python",
      ".pyi": "python"
    }
  }
}

Note: unlike MCP servers, the top-level object does not have a wrapping key. The keys are the server names directly.

Server Configuration Schema

Required Fields

FieldRequiredTypeDescription
commandYesstringThe LSP binary to execute. Must be on $PATH.
extensionToLanguageYesobjectMaps file extensions (with dot) to language identifiers.

Optional Fields

FieldTypeDefaultDescription
argsstring[][]Command-line arguments.
transport"stdio" | "socket""stdio"Communication transport.
envobject{}Environment variables.
initializationOptionsobject{}LSP initialization options.
settingsobject{}Settings via workspace/didChangeConfiguration.
restartOnCrashbooleanfalseAuto-restart on crash.
maxRestartsnumberMax restart attempts.

Capabilities

CapabilityLSP MethodDescription
DiagnosticstextDocument/publishDiagnosticsErrors and warnings after edits
Go to definitiontextDocument/definitionNavigate to symbol definitions
Find referencestextDocument/referencesFind all usages of a symbol
HovertextDocument/hoverType information and documentation

Lifecycle

  • LSP servers MUST start when the plugin is enabled and matching files are present.
  • LSP servers MUST stop when the plugin is disabled or the session ends.
  • If the binary is not found, the tool MUST log a clear error and continue.

Compatibility

This spec does not redefine the Language Server Protocol. Plugin LSP servers MUST communicate using the LSP specification.