LSP MCP

Bridges a language server so the agent can ask editor-grade questions: where is this defined, what is the type, who references it.

Community TypeScript stdio

What it does

Bridges a language server so the agent can ask editor-grade questions: where is this defined, what is the type, who references it. This is the difference between an agent that greps and one that understands structure. Setup is the cost — it needs a working LSP for each language you care about.

Install

Terminal
npx -y lsp-mcp-server

Client configuration

Paste this into your MCP client config (Claude Desktop, Cursor, or any client that reads mcpServers), then restart the client.

mcp.json
{
  "mcpServers": {
    "lsp": {
      "command": "npx",
      "args": [
        "-y",
        "lsp-mcp-server"
      ]
    }
  }
}

Use it for

Real go-to-definition and type information inside an agent loop

Skip it if

Languages without a working language server

When to use it

Reach for this when the task needs lsp inside the agent loop. Skip it if a plain shell command or a one-off script is enough — every server you add costs context and adds a failure mode.

Other TypeScript servers

  • Filesystem — Gives an agent scoped read, write, and search access to directories you explicitly allow
  • Memory — A persistent knowledge graph stored in a local JSON file, exposed through entities, relations, and observations
  • Sequential Thinking — Gives the model a scratchpad for structured, revisable reasoning: numbered thoughts that can branch, revise, and conclude