Atlas / MCP servers / tritlo / Lsp

LspSAFE

mcp/tritlo/lsp

An MCP server that lets you interact with LSP servers

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
6 4r · 1w · 1d
Transport
stdio
License
MIT
Stars
126
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

An MCP (Model Context Protocol) server for interacting with LSP (Language Server Protocol) interface. This server acts as a bridge that allows LLMs to query LSP Hover and Completion providers.

Overview

The MCP Server works by:

  1. Starting an LSP client that connects to a LSP server
  2. Exposing MCP tools that send requests to the LSP server
  3. Returning the results in a format that LLMs can understand and use

This enables LLMs to utilize LSPs for more accurate code suggestions.

Configuration:

{
"mcpServers": {
"lsp-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"tritlo/lsp-mcp",
"",
"",
""
]
}
}
}

Features

MCP Tools

  • get_info_on_location: Get hover information at a specific location in a file
  • get_completions: Get completion suggestions at a specific location in a file
  • get_code_actions: Get code actions for a specific range in a file
  • open_document: Open a file in the LSP server for analysis
  • close_document: Close a file in the LSP server
  • get_diagnostics: Get diagnostic messages (errors, warnings) for open files
  • start_lsp: Start the LSP server with a specified root directory
  • restart_lsp_server: Restart the LSP server without restarting the MCP server
  • set_log_level: Change the server's logging verbosity level at runtime

MCP Resources

  • lsp-diagnostics:// resources for accessing diagnostic messages with real-time updates via subscriptions
  • lsp-hover:// resources for retrieving hover information at specific file locations
  • lsp-completions:// resources for getting code completion suggestions at specific positions

Additional Features

  • Comprehensive logging system with multiple severity levels
  • Colorized console output for better readability
  • Runtime-configurable log level
  • Detailed error handling and reporting
  • Simple command-line interface

Prerequisites

Read from source at commit 03d146c16c7cOBSERVED · 2026-10-07
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code
claude mcp add lsp-mcp-server -- npx -y [email protected]
claude-desktop
{
  "mcpServers": {
    "lsp-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ]
    }
  }
}
03

Exposed tools (6)

4 read · 1 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
close_documentreadClose a file in the LSP server. Use this tool when you
get_code_actionsreadGet code actions for a specific range in a file. Use this tool to obtain available refactorings, quick fixes, and other code modifications that can be applied to a selected code range. Examples include adding imports, fixing errors, or implementing interfaces. Requires the file to be opened first.
get_diagnosticsreadGet diagnostic messages (errors, warnings) for files. Use this tool to identify problems in code files such as syntax errors, type mismatches, or other issues detected by the language server. When used without a file_path, returns diagnostics for all open files. Requires files to be opened first.
restart_lsp_serverdestructiveRestart the LSP server process. Use this tool to reset the LSP server if it becomes unresponsive, has stale data, or when you need to apply configuration changes. Can optionally reinitialize with a new root directory. Useful for troubleshooting language server issues or when switching projects.
start_lspwriteStart the LSP server with a specified root directory. IMPORTANT: This tool must be called before using any other LSP functionality. The root directory should point to the project
typed-hole-usereadGuide on using typed-holes in Haskell to explore type information and function possibilities
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (1 observation(s))
Network
none-observed
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (2)

MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
restart_lsp_server
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@modelcontextprotocol/sdk, zod, zod-to-json-schema, @types/node, typescript, typescript-language-server
Why it matters. 6 dependency range(s) float
Fix. pin exact versions or ship a lockfile

Gates applied: no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha 03d146c16c7cfull audit observations/trust-audit/mcp-server/tritlo__lsp.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-0703d146c16c7cSAFEB89first audit
06

Questions

What is the Lsp MCP server?

An MCP server that lets you interact with LSP servers

What tools does Lsp expose?

6 in total: 4 read-only, 1 that write, and 1 that can delete or overwrite (restart_lsp_server). Every one is listed on this page with its risk.

Is Lsp safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does Lsp need?

No credential environment variables were found in its source, so it appears to need none.

How does Lsp run?

It speaks stdio, so it runs as a local process your client starts. It is published on npm as lsp-mcp-server at 0.2.0.

How current is this page?

The grade is for one exact copy of the source (03d146c16c7c), read on 2026-10-07. The repository is watched and re-audited when it changes.

Advertisement