ts-mcp
Click on "Deploy 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-mcpwhat functions are exported in src/utils.ts?"
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-mcp
MCP server providing AI-invocable tools for semantic navigation of TypeScript and JavaScript source files. Addresses code by name (via the TypeScript compiler AST) rather than by line number or raw string, making it practical to locate and read specific declarations in large files without loading the entire file.
Tools
ts-symbols
List all named declarations in a file.
Parameters:
filename— absolute path to a.ts,.tsx,.js, or.jsxfileexported_only— (optional, defaultfalse) when true, omit unexported symbols
Returns: array of symbol objects with name, kind, className (for methods/properties), exported, startLine, endLine.
Kinds: function, class, interface, type, enum, const, let, method, property.
Use this first to orient in a file, then call ts-read with the name you need.
ts-read
Return the full source text of a named declaration including its leading JSDoc comment.
Parameters:
filename— absolute path to a.ts,.tsx,.js, or.jsxfilename— declaration name, orClassName.methodNamefor class methods
Returns: object with name, kind, source (full text), and overloaded (true when the function has multiple overload signatures — in that case source includes all signatures plus the implementation body).
ts-imports
Return all import declarations as structured data.
Parameters:
filename— absolute path to a.ts,.tsx,.js, or.jsxfile
Returns: array of import objects with moduleSpecifier, defaultImport, namedImports, namespaceImport, isTypeOnly, line.
ts-replace
Replace a named declaration with new source text. Writes atomically (temp file + rename).
Parameters:
filename— absolute path to a.ts,.tsx,.js, or.jsxfilename— declaration name, orClassName.methodNamefor class methodssource— complete replacement declaration text (include JSDoc if it should be preserved)allow_kind_change— (optional, defaultfalse) when true, allow replacing with a declaration of a different kind
Returns: object with message and linesChanged. Returns an error (file untouched) when the name is not found, the kind does not match, or an unexpected error occurs.
For overloaded functions, source must include all overload signatures plus the implementation body. The entire group is replaced atomically.
ts-diagnostics
Run TypeScript type-checking on a file and return structured diagnostics.
Parameters:
filename— absolute path to a.ts,.tsx,.js, or.jsxfile
Returns: object with diagnostics (array), tsconfig (path used or null if none found), and message.
Each diagnostic has file, line, column, code, category ("error", "warning", or "suggestion"), and message.
Walks up the directory tree from filename to find the nearest tsconfig.json. Falls back to permissive defaults if none is found. Always excludes errors from node_modules.
Related MCP server: @aiready/ast-mcp-server
Build
Requires Docker and Make.
make install # install npm dependencies
make compile # compile TypeScript
make test # run unit tests
make clean # remove build artifactsUsage
Run the server directly:
node dist/index.jsOr install globally via npm:
npm install -g .
ts-mcpThe server communicates over stdio using the MCP JSON-RPC protocol. Configure it in your MCP client (e.g., Claude Code's claude_desktop_config.json or .claude/mcp.json) as a stdio server.
Related MCP Connectors
Stateless TS/JS compiler facts for agents: references, imports, impact. No repo index or OAuth.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Coding agents in multi-service codebases routinely rebuild existing helpers, trust stale type definitions, and modify API contracts without knowing who consumes them. Carrick solves this by indexing your entire TypeScript ecosystem across service and repository boundaries. By integrating deeply with the TypeScript compiler, Carrick traces every route, type, and cross-service call while recording function behaviour so agents search by intent rather than name. Delivered via MCP for AI agents and LSP for IDEs, Carrick ensures models see existing endpoints and utilities before generating new code. The scanner is source-available and runs from your CLI or CI pipeline.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Related MCP Servers
- AlicenseBqualityDmaintenanceExposes TypeScript Language Server Protocol functionality to AI agents, enabling them to query types at specific positions, find definitions and references, get diagnostics, run type tests, and type-check inline code just like in an IDE.9205 npm3MIT
- AlicenseNot gradedqualityCmaintenanceAST-aware TypeScript/JavaScript codebase exploration for AI agents, providing high-precision symbol resolution, reference finding, and structural analysis via MCP tools.208 npmMIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to interact with TypeScript projects through compiler-level code intelligence, providing tools for navigation, type information, diagnostics, refactoring, and semantic search.29122 npm3Apache 2.0
- AlicenseNot gradedqualityAmaintenanceProvides symbol-level dependency analysis and LLM-ready migration prompts for TypeScript/JavaScript projects, enabling AI editors to scan projects, analyze packages, and generate refactoring prompts.190 npm19MIT