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?

A Model Context Protocol (MCP) server that enables AI code editors to find the original definitions of TypeScript symbols within a codebase. It supports finding definitions for both local and imported symbols.

How to use TypeScript Definition Finder MCP Server?

Install the server using Smithery or by running npx -y ts-def-mcp@latest in your TypeScript project. Configure your AI code editor (e.g., Claude Desktop, Cursor) to use the MCP server. The server provides a find_typescript_definition tool that requires the file path, symbol name, and line content as input.

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

  • Quickly locate the definition of a function or class in a large TypeScript project

  • Understand the implementation details of imported libraries

  • Improve code navigation and comprehension in AI-powered code editors

  • Facilitate code completion and suggestion features in AI tools

FAQ from TypeScript Definition Finder MCP Server

What is MCP?

Model Context Protocol, a protocol for communication between AI tools and code editors.

How do I install the server?

You can install it via Smithery or by running npx -y ts-def-mcp@latest in your project directory.

What AI code editors are supported?

Claude Desktop, Cursor, Windsurf, and Roo Cline Editor are supported.

What input parameters are required?

The tool requires file_path, symbol, and line_content as input parameters.

What does the server return?

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