ts-language-mcp
Provides TypeScript code intelligence tools for AI coding agents, including navigation, type information, code structure, semantic search, diagnostics, and refactoring capabilities via direct TypeScript compiler API.
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-language-mcpget definition of UserService"
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-language-mcp
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.
Related MCP server: agent-workspace-mcp
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/projectMCP Client Configuration
Claude Code:
claude mcp add typescript -- npx ts-language-mcp /path/to/your/projectClaude 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 filestypescript://project/config- Current compiler optionstypescript://file/{path}- Read file content
Tools
Category | Tool | Description |
| Jump from usage to declaration | |
| Find all usages with read/write classification | |
| Find concrete implementations of interfaces | |
| Trace function callers / callees | |
| Navigate inheritance chains | |
Type Intelligence |
| Type info and JSDoc at a position |
| Function parameter help | |
Code Structure |
| Flat list of symbols in a file |
| Hierarchical file structure | |
| List all imports with details | |
Semantic Search |
| AST search by name pattern, kind, scope |
| Fast fuzzy symbol search | |
Diagnostics |
| Errors/warnings for a file |
| Project-wide diagnostics | |
| Context-aware completions | |
Refactoring |
| Preview rename impact |
| Execute rename across project | |
| Format with built-in formatter | |
Efficiency |
| Combined analysis in one call |
| 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 modeArchitecture
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 definitionsLicense
MIT
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/jgauffin/ts-language-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server