Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

A standalone MCP server that provides TypeScript type inference and hover information using tsgo, enabling AI agents to get type details, diagnostics, references, and more without needing an editor.

README.md

TS Hover MCP

Maintenance moved to zachsents/zachs-tools. This repository is kept for history; open new issues and changes in the monorepo.

Give AI agents TypeScript type inference — no editor required.

A standalone MCP server that provides TypeScript type information using tsgo (the native Go-based TypeScript compiler). Works with any MCP client — Cursor, Claude Desktop, VS Code, Windsurf, or any other agent.

No running editor needed. It spawns and manages tsgo LSP instances directly, keeping them warm for fast subsequent queries.

Prerequisites

Install tsgo globally:

npm install -g @typescript/native-preview
# or
bun add -g @typescript/native-preview
# or
pnpm add -g @typescript/native-preview
# or
yarn global add @typescript/native-preview

Install

Cursor

![Install MCP Server](https://cursor.com/en/install-mcp?name=ts-hover&config=eyJjb21tYW5kIjoibnB4IC15IEB6YWNoc2VudHMvdHMtbWNwIn0%3D)

Or manually add to .cursor/mcp.json:

{
  "mcpServers": {
    "ts-hover": {
      "command": "npx",
      "args": ["-y", "@zachsents/ts-mcp"]
    }
  }
}

VS Code

Add to your User Settings (JSON):

{
  "mcp": {
    "servers": {
      "ts-hover": {
        "command": "npx",
        "args": ["-y", "@zachsents/ts-mcp"]
      }
    }
  }
}

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "ts-hover": {
      "command": "npx",
      "args": ["-y", "@zachsents/ts-mcp"]
    }
  }
}

Claude Code

claude mcp add-json ts-hover '{"command":"npx","args":["-y","@zachsents/ts-mcp"]}'

Windsurf

Add to your Windsurf MCP config:

{
  "mcpServers": {
    "ts-hover": {
      "command": "npx",
      "args": ["-y", "@zachsents/ts-mcp"]
    }
  }
}

How it works

  1. Agent calls a tool (e.g. hover with a file path and position)
  2. The MCP server finds the nearest tsconfig.json to determine the project root
  3. It spawns (or reuses) a tsgo LSP instance for that project
  4. Returns the type information
  5. The tsgo instance stays warm for 5 minutes, making follow-up queries near-instant

Multiple project roots are handled automatically — each gets its own tsgo instance.

Tools

hover

Get TypeScript type information at a position, plus where it's defined. Returns the same info you'd see hovering in an IDE — resolved types, inferred types, JSDoc — and the definition location.

| Parameter | Type | Description | | ----------- | -------- | ------------------------------------ | | file | string | Absolute path to the TypeScript file | | line | number | Line number (0-indexed) | | character | number | Character position (0-indexed) |

diagnostics

Get TypeScript errors and warnings for a file, along with available quick fixes and their exact text edits.

| Parameter | Type | Description | | --------- | -------- | ------------------------------------ | | file | string | Absolute path to the TypeScript file |

references

Find all references to a symbol across the project.

| Parameter | Type | Description | | ----------- | -------- | ------------------------------------ | | file | string | Absolute path to the TypeScript file | | line | number | Line number (0-indexed) | | character | number | Character position (0-indexed) |

outline

Get a structured outline of all symbols in a file — functions, classes, interfaces, types, variables — with line numbers and nesting.

| Parameter | Type | Description | | --------- | -------- | ------------------------------------ | | file | string | Absolute path to the TypeScript file |

rename

Rename a symbol across the project. Applies the edits directly to all affected files.

| Parameter | Type | Description | | ----------- | -------- | ------------------------------------ | | file | string | Absolute path to the TypeScript file | | line | number | Line number (0-indexed) | | character | number | Character position (0-indexed) | | newName | string | The new name for the symbol |

inlay_hints

Get inferred type annotations for a line range — variable types, parameter types, return types that TypeScript infers but aren't written in code.

| Parameter | Type | Description | | ----------- | -------- | ------------------------------------ | | file | string | Absolute path to the TypeScript file | | startLine | number | Start line (0-indexed, inclusive) | | endLine | number | End line (0-indexed, exclusive) |

Note: Requires tsgo inlay hint support, which is still in development. The tool will start returning results as tsgo fills in this capability.

Configuration

| Env var | Description | | ----------- | ------------------------------------ | | TSGO_PATH | Override the path to the tsgo binary |

License

MIT — Zach Sents

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use AI & ML servers.