MCP Servers / development / TypeScript MCP Server

TypeScript MCP Server

JSON →
none2development

TypeScript MCP server for AI-powered refactoring. Rename symbols, extract functions, move declarations, inline variables, find references, and fix diagnostics — strictly via the native tsserver

Install
How to run this server
[ { "cmd": "npx ts-mcp-server", "imports": [] } ]
server path: typescript-mcp-server
Tools
What this server exposes
rename_symbols
Rename variables, functions, classes, types, properties, interfaces, enums — all references updated across every file
rename_move_files_folders
Rename or move files and folders — all import paths updated automatically
extract_function
Extract a code range into a new function with auto-detected parameters and return type
extract_constant
Extract an expression into a named constant with inferred type
extract_type
Extract an inline type annotation into a named type alias
infer_return_type
Add an explicit return type annotation to a function, inferred by TypeScript
move_symbol
Move top-level declarations to another file, all imports rewired automatically
inline_variable
Replace all references with the variable's initializer and delete the declaration
organize_imports
Sort, coalesce, and remove unused imports
format
Format a range of code according to TypeScript's formatting rules
get_code_fixes
Retrieve available auto-fixes for specific diagnostics (missing imports, type mismatches, etc.)
get_combined_code_fix
Apply a fix-all action for a specific error code across a file
get_diagnostics
Retrieve type errors, warnings, and suggestions for any file
find_all_references
Locate every usage of a symbol across the project
map_code
Map AI-generated code snippets into a file, replacing matching declarations by name or appending new ones
get_supported_code_fixes
List every error code that has an available automatic fix, optionally scoped to a project
quick_info
Full type information, documentation, and JSDoc tags for any symbol (hover info)
navigation_tree
Complete hierarchical structure of a file (all declarations and their nesting)
go_to_definition
Jump to where a symbol is declared
definition_and_bound_span
Like definition, but also returns the text span of the queried symbol
find_source_definition
Navigate to actual TypeScript source instead of .d.ts declaration files
go_to_type_definition
Jump to the type's definition, not the variable's declaration
go_to_implementation
Find concrete implementations of an interface or abstract class
navigate_to_symbol
Workspace-wide symbol search by name
file_references
Find every file that imports a given file (reverse dependency graph)
prepare_call_hierarchy
Get call hierarchy entry point for a function/method
incoming_calls
Find all callers of a function ('who calls this?')
outgoing_calls
Find all callees of a function ('what does this call?')
project_info
Get tsconfig.json path, file list, and language service status
completion_info
Autocomplete suggestions at a position
completion_entry_details
Full documentation and type signature for a completion item
signature_help
Function parameter info and overloads at a call site
document_highlights
All occurrences of a symbol within a file, with read/write distinction
get_applicable_refactors
Discover what refactorings are available at a position or selection
selection_range
Get semantically meaningful selection ranges for smart expand/shrink selection
move_to_refactoring_suggestions
Get suggested target files when moving a symbol
doc_comment_template
Generate JSDoc comment template for a function/method
outlining_spans
Get foldable regions in a file
inlay_hints
Get inlay hints (parameter names, inferred types) for a range
todo_comments
Find all TODO/FIXME/HACK comments in a file
Configuration
Environment & auth
authnone
Resources
TypeScript MCP Server — MCP Server · libregistry