ts-def-mcp

ts-def-mcp

0

The TypeScript Definition Finder MCP Server is a specialized tool that aids AI code editors in discovering the definitions of TypeScript symbols. It integrates easily with code editors and provides detailed location and code snippets of the definitions.

TypeScript Definition Finder MCP Server

A Model Context Protocol (MCP) server designed to help AI code editors locate TypeScript symbol definitions in a codebase. It is particularly effective for finding original definitions of imported symbols, classes, interfaces, or functions in a TypeScript project.

Features

  • Finds original definitions of TypeScript symbols
  • Works with imported symbols from external packages
  • Returns both the definition location and code snippet
  • Supports stdio interface for seamless integration with AI code editors

Prerequisites

  • Bun v1.2.2 or later
  • Node.js for running the compiled server

Usage

The server offers a find_typescript_definition tool to locate the original definition of TypeScript symbols within your codebase.

Tool Description

  • Tool Name: find_typescript_definition
  • Trigger Command: /ts-def
  • Purpose: Locates the original definition of TypeScript symbols

Input Parameters

  1. file_path (string): The absolute path to the current TypeScript file.
  2. line_content (string): The entire line containing the symbol for definition search.
  3. column_number (number): The column position where the symbol starts.