Ts Language Mcp
БесплатноПоддерживаетсяTypeScript Language Server exposed via MCP for AI agents
Описание
TypeScript Language Server exposed via MCP for AI agents
README
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 | Ask for it by name, no coordinates needed |
| Grep for usage patterns | Get all references with read/write classification and their source lines |
| Guess at types from context | Get exact types with full generic resolution |
| Hope renames don't break things | Preview and execute renames across files |
| Hand-write the fix for a compiler error | Apply the compiler's own quick fix |
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.
Built for agents, not editors
- Address symbols by name. Every position-based tool accepts
symbol: "UserService.getUser"instead of a line and column. An ambiguous name returns the candidates rather than silently picking one, and an out-of-range coordinate is an error rather than a quiet answer about the wrong code. - Results carry their source line. References, definitions, implementations and hierarchy results include the code they point at, so there is no follow-up file read just to see what was found.
- Fixes come from the compiler.
get_code_fixesandorganize_importssurface TypeScript's own edits, including the correct import path, instead of leaving an agent to guess one. - Large results say they are large. Tools that can return unbounded lists report
total,returnedandtruncatedrather than quietly cutting off.
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, honours include/exclude, and re-checks changed files on each request (throttled; there is no filesystem watcher).
Resources
typescript://project/files- List all indexed project filestypescript://project/config- Current compiler optionstypescript://file/{path}- Read a single file's content
Tools
Tools marked by name accept symbol in place of line/column.
| Category | Tool | Description |
|---|---|---|
| Navigation | get_definition |
Jump from usage to declaration (by name, returns all declarations) |
get_type_definition |
Jump to a symbol's type rather than the symbol (by name) | |
get_references |
Find all usages with read/write classification (by name, paged) | |
get_implementations |
Find concrete implementations of interfaces (by name) | |
get_call_hierarchy |
Trace function callers / callees (by name) | |
get_type_hierarchy |
Navigate inheritance chains (by name) | |
| Type Intelligence | get_hover |
Type info and JSDoc (by name) |
get_signature |
Function parameter help (by name) | |
| Code Structure | get_symbols |
Flat list of symbols in a file (paged) |
get_outline |
Hierarchical file structure | |
get_imports |
List all imports with details | |
| Semantic Search | find |
AST search by name pattern, kind, scope (paged) |
get_workspace_symbols |
Fast fuzzy symbol search | |
| Diagnostics | get_diagnostics |
Errors/warnings for a file, TypeScript + ESLint |
get_all_diagnostics |
Project-wide diagnostics, including tsconfig errors | |
get_completions |
Context-aware completions | |
| Refactoring | get_code_fixes |
The compiler's own fixes for an error (by name) |
apply_code_fix |
Apply a fix and write it to disk (by name) | |
organize_imports |
Sort imports and drop unused ones | |
rename_preview |
Preview rename impact (by name) | |
rename_symbol |
Execute rename across project, written to disk (by name) | |
format_document |
Format with built-in formatter, written to disk | |
| Code Quality | calculate_metrics |
Cyclomatic complexity and LOC per function/file |
detect_duplication |
Structurally duplicated code blocks | |
find_indirection_hotspots |
Symbols reached through deep call chains | |
get_module_dependencies |
What a file imports and what imports it | |
quality_report |
Top offenders across all quality categories | |
| Efficiency | analyze_position |
Combined analysis in one call (by name) |
batch_analyze |
Analyze multiple positions at once (by name) |
Writes to disk
rename_symbol, format_document, apply_code_fix and organize_imports (with apply: true) modify files on disk. Everything else is read-only; rename_preview and organize_imports without apply show the edits without making them.
Development
npm test # Run tests once
npm run test:watch # Run tests in watch mode
npm run build # Build
npm run dev # Watch mode
License
MIT
Установить Ts Language Mcp в Claude Desktop, Claude Code, Cursor
unyly install ts-language-mcpСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add ts-language-mcp -- npx -y ts-language-mcpПошаговые гайды: как установить Ts Language Mcp
FAQ
Ts Language Mcp MCP бесплатный?
Да, Ts Language Mcp MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Ts Language Mcp?
Нет, Ts Language Mcp работает без API-ключей и переменных окружения.
Ts Language Mcp — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Ts Language Mcp в Claude Desktop, Claude Code или Cursor?
Открой Ts Language Mcp на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Изменения
Версии и запрашиваемые доступы со временем.
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Unyly Deploy
Deploy sites and MCP servers to Unyly straight from your AI agent
автор: UnylyTemplate MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectServer Sequential Thinking
MCP server for sequential thinking and problem solving
автор: GitHub ActionsAmap Maps Mcp Server
MCP server for using the AMap Maps API
автор: duxiaohuiPayMCP
Lightweight payments layer for MCP servers: turn tools into paid endpoints with a two-line decorator. [PyPI](https://pypi.org/project/paymcp/) · [npm](https://w
автор: blustAIdemo
demo — MCP server via Smithery
автор: yoojoohans-jpgServer For Power BI
Enables exploring Microsoft Fabric / Power BI workspaces and semantic models, and executing ad-hoc DAX queries.
автор: Mitsubishi-FusoCompare Ts Language Mcp with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
