VSCode LSPSAFE
Expose VS Code language intelligence to AI agents via MCP, with automatic routing across multiple windows
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
English | 中文
🔍 Overview
VSCode LSP MCP is a Visual Studio Code extension that exposes Language Server Protocol (LSP) features through the Model Context Protocol (MCP).
Extension ID: cjl.lsp-mcp — open Extensions (Ctrl+Shift+X / Cmd+Shift+X) and search for cjl.lsp-mcp to find this plugin precisely.
This allows AI assistants and external tools to utilize VSCode's powerful language intelligence capabilities without direct integration.
[!TIP] Using Neovim? See vv-mcp.nvim, the sibling implementation that exposes Neovim LSP clients and live editor context through MCP.
61416a27ccebOBSERVED · 2026-10-08Connect
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. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add lsp-mcp --env VSC_LSP_MCP_CORS_CREDENTIALS=${VSC_LSP_MCP_CORS_CREDENTIALS} -- npx -y [email protected]{
"mcpServers": {
"lsp-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"VSC_LSP_MCP_CORS_CREDENTIALS": "${VSC_LSP_MCP_CORS_CREDENTIALS}"
}
}
}
}Exposed tools (4)
2 read · 2 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
execute_lsp | write | |
health | read | |
list_instances | read | |
rename_resource | write |
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.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- declared (2 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (7)
import pkg from '../../package.json'
- 使用实际监听端口生成 `http://127.0.0.1:<port>/mcp`,兼容多窗口端口 fallback
"url": "http://127.0.0.1:9527/mcp"
"url": "http://127.0.0.1:9527/mcp",
"url": "http://127.0.0.1:9527/mcp"
"httpUrl": "http://127.0.0.1:9527/mcp"
@modelcontextprotocol/sdk, express, zod, @antfu/eslint-config, @types/express, @types/node, @vscode/vsce, eslint
Gates applied: no_behavioural_pass.
61416a27ccebfull audit observations/trust-audit/mcp-server/beixiyo__vscode-lsp.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 61416a27cceb | SAFE | B | 89 | first audit |
Questions
What is the VSCode LSP MCP server?
Expose VS Code language intelligence to AI agents via MCP, with automatic routing across multiple windows
What tools does VSCode LSP expose?
4 in total: 2 read-only, 2 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is VSCode 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.
What credentials does VSCode LSP need?
It reads VSC_LSP_MCP_CORS_CREDENTIALS from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does VSCode LSP run?
It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as lsp-mcp at 0.3.1.
How current is this page?
The grade is for one exact copy of the source (61416a27cceb), read on 2026-10-08. The repository is watched and re-audited when it changes.