TS Hover MCP
Provides TypeScript type information and code intelligence tools including hover, diagnostics, references, outline, rename, and inlay hints for TypeScript files, enabling AI agents to understand and manipulate TypeScript code.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TS Hover MCPShow type info forcalculateTotalin src/math.ts at line 42, char 20."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TS Hover MCP
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-previewRelated MCP server: MCP-Typescribe
Install
Cursor
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
Agent calls a tool (e.g.
hoverwith a file path and position)The MCP server finds the nearest
tsconfig.jsonto determine the project rootIt spawns (or reuses) a tsgo LSP instance for that project
Returns the type information
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 |
|
| Absolute path to the TypeScript file |
|
| Line number (0-indexed) |
|
| 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 |
|
| Absolute path to the TypeScript file |
references
Find all references to a symbol across the project.
Parameter | Type | Description |
|
| Absolute path to the TypeScript file |
|
| Line number (0-indexed) |
|
| 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 |
|
| Absolute path to the TypeScript file |
rename
Rename a symbol across the project. Applies the edits directly to all affected files.
Parameter | Type | Description |
|
| Absolute path to the TypeScript file |
|
| Line number (0-indexed) |
|
| Character position (0-indexed) |
|
| 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 |
|
| Absolute path to the TypeScript file |
|
| Start line (0-indexed, inclusive) |
|
| 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 |
| Override the path to the tsgo binary |
License
MIT — Zach Sents
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zachsents/ts-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server