Skip to main content
Glama

TypeScript Definition Finder

by runninghare

TypeScript 定義ファインダー MCP サーバー

AIコードエディターがコードベース内のTypeScriptシンボル定義を見つけるのに役立つ、モデルコンテキストプロトコル(MCP)サーバーです。このツールは、TypeScriptプロジェクトでインポートされたシンボル、クラス、インターフェース、または関数の元の定義を見つける必要がある場合に特に便利です。

特徴

  • TypeScriptシンボルの元の定義を検索します
  • 外部パッケージからインポートされたシンボルで動作します
  • 定義場所とコードスニペットの両方を返します
  • AIコードエディタとのシームレスな統合のためのstdioインターフェースをサポート

前提条件

  • Bun v1.2.2以降
  • コンパイルされたサーバーを実行するためのNode.js

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の TypeScript Definition Finder を自動的にインストールするには:

npx -y @smithery/cli install @runninghare/ts-def-mcp --client claude

手動インストール

  1. 依存関係をインストールします:
bun install
  1. プロジェクトをビルドします。
bun run build

使用法

stdio サーバーを起動します。

node dist/run.js

ツールの説明

サーバーは、次の機能を備えたfind_typescript_definitionツールを提供します。

  • ツール名: find_typescript_definition
  • トリガー コマンド: /ts-def (参照されているシンボル定義を AI エディターで強制的に検索する場合にCursorで役立ちます)
  • 目的: コードベース内の TypeScript シンボルの元の定義を見つけます

入力パラメータ

このツールには 3 つのパラメータが必要です。

  1. file_path (文字列):
    • 現在のTypeScriptファイルへの絶対パス
    • 例: /path/to/your/project/src/index.ts
  2. line_content (文字列):
    • 定義を調べたい記号を含む行全体
    • ファイル内の正しい行を見つけるために使用します
    • ファイル内に表示されている行と完全に一致する必要があります
  3. column_number (数値):
    • シンボルが始まる1から始まる列番号
    • シンボルの最初の文字の正確な列位置である必要があります

  1. インポートされたシンボル定義の検索

次のインポート ステートメントがあるとします。

import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

列 10 から始まるStdioServerTransportの定義を見つけるには、次のようにします。

{ "file_path": "~/my-mcp-project/src/index.ts", "line_content": "import { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";", "column_number": 10 }

このツールの出力は次のようになります。

[ { "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" } ]
  1. ローカルシンボル定義の検索

ローカルクラスの使用法の場合:

class MyService { private transport: StdioServerTransport; }

列 20 から始まるStdioServerTransportの定義を見つけるには、次のコマンドを使用します。

{ "file_path": "/path/to/project/src/service.ts", "line_content": " private transport: StdioServerTransport;", "column_number": 20 }

応答フォーマット

ツールは次の内容を含む JSON 応答を返します。

  • 定義が見つかったファイルパス
  • 定義の行番号
  • 定義の実際のコードスニペット

クロードデスクトップの例

発達

このプロジェクトは、bun v1.2.2 のbun initを使用して作成されました。Bun高速なオールインワン JavaScript ランタイムです。

開発モードで実行

開発の場合、Bun を使用してサーバーを直接実行できます。

bun run index.ts

ライセンス

[ここにライセンス情報を追加してください]

貢献

[ここに投稿ガイドラインを追加]

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

AI コード エディターがコードベース内の TypeScript シンボル定義を見つけるのに役立つモデル コンテキスト プロトコル サーバー。インポートされたシンボルとクラスの元の定義を見つけるのに特に役立ちます。

  1. 特徴
    1. 前提条件
      1. インストール
        1. Smithery経由でインストール
        2. 手動インストール
      2. 使用法
        1. ツールの説明
        2. 入力パラメータ
        3. 応答フォーマット
        4. クロードデスクトップの例
      3. 発達
        1. 開発モードで実行
      4. ライセンス
        1. 貢献

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A TypeScript-based Model Context Protocol toolkit that enables AI to interact with code files, manage translations, build projects, and search for files and code content.
            Last updated -
            33
            20
            5
            TypeScript
            MIT License
          • A
            security
            F
            license
            A
            quality
            A comprehensive Model Context Protocol server for advanced code analysis that provides tools for syntax analysis, dependency visualization, and AI-assisted development workflow support.
            Last updated -
            28
            4
            Python
          • A
            security
            A
            license
            A
            quality
            A discovery and recommendation service that helps AI assistants find Model Context Protocol servers based on natural language queries.
            Last updated -
            445
            53
            TypeScript
            MIT License
            • Apple
            • Linux
          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that enables intelligent searching across documentation for 30+ programming libraries and frameworks, fetching relevant information from official sources.
            Last updated -
            18
            6
            Python
            MIT License
            • Apple

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/runninghare/ts-def-mcp'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server