npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-lsp-bridge

v0.1.1

Published

MCP server bridging Claude Code to TypeScript Language Server (tsserver)

Readme

mcp-lsp-bridge

It is like "Rename/go to reference" for Claude Code.

An MCP server that bridges AI coding assistants to TypeScript's Language Server (tsserver), enabling semantic code navigation, reference finding, and refactoring.

Unlike text-based search (ripgrep), this server provides semantically-aware results — no false positives from comments or strings, proper import resolution, and accurate type-aware symbol tracking.

Benchmark

Tested on a real TypeScript monorepo (423 files, 4 packages). Task: rename a type property referenced across 118 files with 1,000+ occurrences.

| Metric | Claude | MCP-LSP Bridge | Improvement | |--------|--------|----------------|-------------| | Time | 160 sec | 22 sec | 7x faster | | Tool calls | 41 | 4 | 10x fewer | | Tokens | ~6,300 | ~12 | 500x fewer | | Cost | ~$2.20 | ~$0.15 | 93% savings |

One MCP tool call replaces an entire chain of grep/read/edit steps — faster, cheaper, and more accurate.

How It Works

This project is a bridge, not a language server itself. It wraps TypeScript's own language server (tsserver) and exposes its capabilities as MCP tools. The bridge manages tsserver processes automatically — you don't need to start or configure anything yourself.

┌─────────────────────────────────────────────────────┐
│  VS Code                                            │
│  ┌───────────────┐    ┌────────────────────────────┐│
│  │  Editor       │    │  Claude Code (terminal)    ││
│  │               │    │                            ││
│  │  Built-in     │    │  Uses MCP tools instead of ││
│  │  IntelliSense │    │  grep/read for navigation  ││
│  └──────┬────────┘    └────────────┬───────────────┘│
│         │                          │                │
│         ▼                          ▼                │
│    VS Code's                 mcp-lsp-bridge         │
│    tsserver                  (this project)         │
│    (built-in)                      │                │
│                                    ▼                │
│                              Its own tsserver       │
│                              (spawned on demand)    │
└─────────────────────────────────────────────────────┘

VS Code already gives you IntelliSense through its built-in tsserver. This project gives Claude the same semantic understanding through its own tsserver instance, so it can navigate your code as precisely as your IDE does.

Example: VS Code + Claude Code

  1. You're editing a TypeScript monorepo in VS Code
  2. You open the integrated terminal and run Claude Code
  3. You ask Claude to rename a type property used across 118 files
  4. Without mcp-lsp-bridge: Claude uses grep to find the symbol, reads each file, edits them one by one — 41 tool calls, ~160 seconds, $2.20
  5. With mcp-lsp-bridge: Claude calls rename_symbol once and updates every reference instantly — 4 tool calls, ~22 seconds, $0.15

Tools

| Tool | Description | Modifies Files | |------|-------------|----------------| | find_references | Locate all references to a symbol | No | | go_to_definition | Navigate to symbol definition | No | | rename_symbol | Rename symbol across project | Yes | | get_diagnostics | Get compilation errors/warnings | No |

Installation

npm install -g mcp-lsp-bridge

Or use directly with npx:

npx mcp-lsp-bridge

Configuration

Claude Code

Add to your Claude Code MCP settings:

{
  "mcpServers": {
    "mcp-lsp-bridge": {
      "command": "npx",
      "args": ["mcp-lsp-bridge"]
    }
  }
}

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-lsp-bridge": {
      "command": "npx",
      "args": ["mcp-lsp-bridge"]
    }
  }
}

Usage

All tools accept a workspaceRoot (absolute path to your project) and file positions use 1-based line and column numbers.

find_references

Find all usages of a symbol across the project.

{
  "workspaceRoot": "/path/to/project",
  "filePath": "src/utils.ts",
  "line": 5,
  "column": 17
}

Returns references with file paths, positions, code snippets, and whether each is a declaration or usage.

go_to_definition

Jump to where a symbol is defined.

{
  "workspaceRoot": "/path/to/project",
  "filePath": "src/app.ts",
  "line": 10,
  "column": 3
}

Returns definition location(s), including external definitions in node_modules or .d.ts files.

rename_symbol

Rename a symbol and update all references across the project.

{
  "workspaceRoot": "/path/to/project",
  "filePath": "src/models.ts",
  "line": 8,
  "column": 14,
  "newName": "updatedName"
}

Modifies files on disk and returns a report of all changes made.

get_diagnostics

Get TypeScript compilation errors and warnings.

{
  "workspaceRoot": "/path/to/project",
  "filePath": "src/index.ts"
}

Omit filePath for project-wide diagnostics. Returns severity, diagnostic codes, and code snippets.

Supported Projects

  • TypeScript projects (tsconfig.json)
  • JavaScript projects (jsconfig.json)
  • Monorepos (Nx, Turborepo) with multiple tsconfig files
  • Mixed TypeScript/JavaScript codebases
  • All standard file extensions: .ts, .tsx, .js, .jsx, .mts, .cts, .mjs, .cjs, .d.ts

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Development mode (watch)
npm run dev

Architecture

AI Client  <-->  MCP Server  <-->  tsserver (stdin/stdout)
              (this project)     (TypeScript language server)

The server manages tsserver instances per workspace, caching them for subsequent requests.

License

MIT