TypeScript Definition Finder MCP Server logo

TypeScript Definition Finder MCP Server

by runninghare

A Model Context Protocol (MCP) server that helps AI code editors find TypeScript symbol definitions in your codebase. It's particularly useful for locating the original definition of imported symbols, classes, interfaces, or functions in a TypeScript project.

View on GitHub

Last updated: N/A

What is TypeScript Definition Finder MCP Server?

The TypeScript Definition Finder MCP Server is a tool designed to help AI code editors locate the original definitions of TypeScript symbols within a codebase. It provides a Model Context Protocol (MCP) server that can be integrated with AI code editors to facilitate code navigation and understanding.

How to use TypeScript Definition Finder MCP Server?

  1. Install the server using Smithery or manually via bun install and bun run build. 2. Start the server using node dist/run.js. 3. Use the find_typescript_definition tool with the required parameters: file_path, line_content, and column_number. 4. The server returns a JSON response containing the file path, line number, and code snippet of the definition.

Key features of TypeScript Definition Finder MCP Server

  • 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

Use cases of TypeScript Definition Finder MCP Server

  • Finding the definition of an imported symbol in a large project

  • Navigating to the source code of a class or interface used in your code

  • Quickly understanding the implementation details of a function or method

  • Assisting AI code editors in providing accurate code completion and suggestions

FAQ from TypeScript Definition Finder MCP Server

What is the purpose of this server?

The server helps AI code editors find the original definitions of TypeScript symbols in your codebase, improving code navigation and understanding.

What are the prerequisites for using this server?

You need Bun v1.2.2 or later and Node.js for running the compiled server.

How do I install the server?

You can install it via Smithery or manually by cloning the repository, installing dependencies with bun install, and building the project with bun run build.

How do I use the find_typescript_definition tool?

Provide the file_path, line_content, and column_number of the symbol you want to find the definition of.

What format does the server return?

The server returns a JSON response containing the file path, line number, and code snippet of the definition.