
TS-DEF-MCP
Un servidor de Protocolo de contexto de modelo (MCP) que ayuda a los editores de código AI a encontrar definiciones de símbolos de TypeScript en su base de código.
1
Github Watches
1
Github Forks
0
Github Stars
TypeScript Definition Finder MCP Server
A Model Context Protocol (MCP) server that helps AI code editors find TypeScript symbol definitions in your codebase. This tool is particularly useful when you need to locate the original definition 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
Installation
Installing via Smithery
To install TypeScript Definition Finder for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @runninghare/ts-def-mcp --client claude
Manual Installation
- Install dependencies:
bun install
- Build the project:
bun run build
Usage
Start the stdio server:
node dist/run.js
Tool Description
The server provides a find_typescript_definition
tool with the following capabilities:
-
Tool Name:
find_typescript_definition
-
Trigger Command:
/ts-def
(Useful inCursor
if you want to force AI editor to find the referenced symbol definition) - Purpose: Locates the original definition of TypeScript symbols in your codebase
Input Parameters
The tool requires three parameters:
-
file_path
(string):- The absolute path to the current TypeScript file
- Example:
/path/to/your/project/src/index.ts
-
line_content
(string):- The entire line containing the symbol you want to find the definition of
- Used to locate the correct line in the file
- Must match the line exactly as it appears in the file
-
column_number
(number):- The 1-based column number where the symbol starts
- Must be the exact column position of the symbol's first character
Examples
- Finding an Imported Symbol Definition
Given this import statement:
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
To find the definition of StdioServerTransport
, which starts at column 10, you would use:
{
"file_path": "~/my-mcp-project/src/index.ts",
"line_content": "import { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";",
"column_number": 10
}
The output of this tool will be:
[
{
"file": "~/my-mcp-project/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.d.ts",
"type": "Definition",
"location": "Line 9, Column 22",
"codeSnippet": " 8 */\n 9 > export declare class StdioServerTransport implements Transport {\n 10 + private _stdin;\n 11 + private _stdout;\n 12 + private _readBuffer;\n 13 + private _started;\n 14 + constructor(_stdin?: Readable, _stdout?: Writable);\n 15 + onclose?: () => void;\n 16 + onerror?: (error: Error) => void;\n 17 + onmessage?: (message: JSONRPCMessage) => void;\n 18 + _ondata: (chunk: Buffer) => void;\n 19 + _onerror: (error: Error) => void;\n 20 + /**\n 21 + * Starts listening for messages on stdin.\n 22 + */\n 23 + start(): Promise<void>;\n 24 + private processReadBuffer;\n 25 + close(): Promise<void>;\n 26 + send(message: JSONRPCMessage): Promise<void>;\n 27 }\n"
}
]
- Finding a Local Symbol Definition
For a local class usage:
class MyService {
private transport: StdioServerTransport;
}
To find the definition of StdioServerTransport
, which starts at column 20, use:
{
"file_path": "/path/to/project/src/service.ts",
"line_content": " private transport: StdioServerTransport;",
"column_number": 20
}
Response Format
The tool returns a JSON response containing:
- The file path where the definition was found
- The line number of the definition
- The actual code snippet of the definition
Claude Desktop Example
Development
This project was created using bun init
in bun v1.2.2. Bun is a fast all-in-one JavaScript runtime.
Running in Development Mode
For development, you can run the server directly using Bun:
bun run index.ts
License
[Add your license information here]
Contributing
[Add contribution guidelines here]
相关推荐
I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.
I find academic articles and books for research and literature reviews.
Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.
Confidential guide on numerology and astrology, based of GG33 Public information
Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.
Advanced software engineer GPT that excels through nailing the basics.
Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.
Converts Figma frames into front-end code for various mobile frameworks.
Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.
La aplicación AI de escritorio todo en uno y Docker con trapo incorporado, agentes de IA, creador de agentes sin código, compatibilidad de MCP y más.
Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx
Plataforma de automatización de flujo de trabajo de código justo con capacidades de IA nativas. Combine el edificio visual con código personalizado, auto-anfitrión o nube, más de 400 integraciones.
🧑🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.
Espejo dehttps: //github.com/agentience/practices_mcp_server
Una lista curada de servidores de protocolo de contexto del modelo (MCP)
Reviews

user_zxkA9mkW
As a dedicated user of the GitHub MCP application, I must say it has significantly streamlined my development process. StdioA has done a phenomenal job in integrating GitHub's powerful features seamlessly. With easy-to-navigate interfaces and efficient performance, it's a must-have tool for any developer. Highly recommend checking it out at https://mcp.so/server/github/StdioA!