drio
Open app

TypeScript Definition Finder MCP Server

Source

A Model Context Protocol (MCP) server that helps AI code editors find TypeScript symbol definitions in your codebase.

Catalog onlyCatalog onlySTDIO

Overview

TypeScript Definition Finder MCP Server is a Model Context Protocol (MCP) server designed to assist AI code editors in locating TypeScript symbol definitions within a codebase.

To use the server, install the necessary dependencies, build the project, and start the stdio server. You can then use the find_typescript_definition tool by providing the required parameters to locate symbol definitions.

  • Locates 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.
  1. Finding definitions of imported symbols in TypeScript projects.
  2. Assisting developers in understanding code by locating class and function definitions.
  3. Enhancing AI code editor capabilities by providing accurate symbol definitions.

Add to your AI client

Use these steps to connect TypeScript Definition Finder MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "ts-def-mcp-runninghare": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-ts-def-mcp-runninghare"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "ts-def-mcp-runninghare": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-ts-def-mcp-runninghare"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "ts-def-mcp-runninghare": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-ts-def-mcp-runninghare"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "ts-def-mcp-runninghare": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-ts-def-mcp-runninghare"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "ts-def-mcp-runninghare": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-ts-def-mcp-runninghare"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "ts-def-mcp-runninghare": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-ts-def-mcp-runninghare"
      ]
    }
  }
}

FAQ

What prerequisites are needed to run the server?

You need Bun v1.2.2 or later and Node.js to run the compiled server.

How do I find a symbol definition?

Use the `/ts-def` command with the required parameters: file path, line content, and column number.

Can this server work with external packages?

Yes, it can find definitions for symbols imported from external packages.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2981,"uuid":"c9492dc6-9ef6-4ac9-94d6-a0dc4ee0dc02","name":"ts-def-mcp","title":"TypeScript Definition Finder MCP Server","description":"A Model Context Protocol (MCP) server that helps AI code editors find TypeScript symbol definitions in your codebase.","avatar_url":"https://avatars.githubusercontent.com/u/6138907?v=4","created_at":"2025-03-16T11:42:35.829Z","updated_at":"2025-03-16T12:44:20.219Z","status":"created","author_name":"runninghare","author_avatar_url":"https://avatars.githubusercontent.com/u/6138907?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/runninghare/ts-def-mcp","target":"_self","content":"$29","summary":"$2a","img_url":"https://camo.githubusercontent.com/268a1c7fd20251e9cd3205f327c56993103905e3aeebddef4a69865261c414f1/68747470733a2f2f736d6974686572792e61692f62616467652f4072756e6e696e67686172652f74732d6465662d6d6370","type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-23 16:48:24\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]