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

ts-language-mcp

v1.2.0

Published

TypeScript Language Server exposed via MCP for AI agents

Readme

ts-language-mcp

npm version License: MIT GitHub issues GitHub stars

A TypeScript code intelligence server for AI coding agents via MCP (Model Context Protocol).

Why Use This?

AI coding agents working with TypeScript treat code as text — reading entire files, grepping for patterns, guessing at types. ts-language-mcp exposes TypeScript's own compiler intelligence through MCP tools:

| Raw File Access | ts-language-mcp | |-----------------|-----------------| | Read entire file to find a function | Jump directly to definition | | Grep for usage patterns | Get all references with read/write classification | | Guess at types from context | Get exact types with full generic resolution | | Hope renames don't break things | Preview and execute renames across files |

Unlike LSP-based alternatives, ts-language-mcp uses the TypeScript compiler API directly — zero config, deeper intelligence (AST search, batch analysis, executable renames, project-wide diagnostics), and no external LSP server required.

Quick Start

# Analyze current directory
npx ts-language-mcp

# Analyze specific project
npx ts-language-mcp /path/to/typescript/project

# Custom server name
npx ts-language-mcp --name my-ts-server /path/to/project

MCP Client Configuration

Claude Code:

claude mcp add typescript -- npx ts-language-mcp /path/to/your/project

Claude Desktop, Cline, etc.:

{
  "mcpServers": {
    "typescript": {
      "command": "npx",
      "args": ["ts-language-mcp", "/path/to/your/project"]
    }
  }
}

The target project needs a tsconfig.json and TypeScript source files. The server auto-loads compiler options and watches for file changes.

Resources

  • typescript://project/files - List all indexed project files
  • typescript://project/config - Current compiler options
  • typescript://file/{path} - Read file content

Tools

| Category | Tool | Description | |----------|------|-------------| | Navigation | get_definition | Jump from usage to declaration | | | get_references | Find all usages with read/write classification | | | get_implementations | Find concrete implementations of interfaces | | | get_call_hierarchy | Trace function callers / callees | | | get_type_hierarchy | Navigate inheritance chains | | Type Intelligence | get_hover | Type info and JSDoc at a position | | | get_signature | Function parameter help | | Code Structure | get_symbols | Flat list of symbols in a file | | | get_outline | Hierarchical file structure | | | get_imports | List all imports with details | | Semantic Search | find | AST search by name pattern, kind, scope | | | get_workspace_symbols | Fast fuzzy symbol search | | Diagnostics | get_diagnostics | Errors/warnings for a file | | | get_all_diagnostics | Project-wide diagnostics | | | get_completions | Context-aware completions | | Refactoring | rename_preview | Preview rename impact | | | rename_symbol | Execute rename across project | | | format_document | Format with built-in formatter | | Efficiency | analyze_position | Combined analysis in one call | | | batch_analyze | Analyze multiple positions at once |

Development

npm test          # Run tests (watch)
npm run test:run  # Run tests once
npm run build     # Build
npm run dev       # Watch mode

Architecture

src/
  index.ts              # CLI entry point
  server.ts             # MCP server setup
  language-service.ts   # TypeScript Language Service wrapper
  ast-finder.ts         # AST traversal for semantic search
  tools.ts              # MCP tool definitions and handlers
  resources.ts          # MCP resource definitions
  types.ts              # Shared type definitions

License

MIT