UNPKG

ts-project-indexer-mcp

Version:

A powerful MCP (Model Context Protocol) server that indexes and analyzes TypeScript/JavaScript projects, providing intelligent code exploration, dependency tracking, method discovery, and project structure analysis for AI assistants and development tools.

65 lines 2.21 kB
import type { CacheManager } from '../cache/cache-manager.js'; import type { FileInfo, MethodInfo, PathInfo, Dependency, AnalysisOptions, SearchResult } from './types.js'; export declare class ProjectIndexer { private cache; private parser; private pathResolver; private indexData; constructor(cache: CacheManager); initialize(): Promise<void>; analyzeProject(options: AnalysisOptions): Promise<{ totalFiles: number; totalMethods: number; totalPaths: number; totalDependencies: number; duration: number; }>; searchMethods(query: string, type?: 'method' | 'function' | 'class' | 'interface' | 'type' | 'all', includeUsages?: boolean): Promise<SearchResult<MethodInfo & { usages?: string[]; }>>; findDependencies(entityName: string, direction?: 'incoming' | 'outgoing' | 'both', depth?: number): Promise<{ entity: string; incoming: Dependency[]; outgoing: Dependency[]; graph: Map<string, string[]>; }>; getFileInfo(filePath: string): FileInfo | null; getMethodsInFile(filePath: string): MethodInfo[]; getPathsInFile(filePath: string): PathInfo[]; getAllFiles(): FileInfo[]; getAllMethods(): MethodInfo[]; getAllPaths(): PathInfo[]; getAllDependencies(): Dependency[]; findUsages(options: { filePath?: string; methodName?: string; className?: string; searchType: 'imports' | 'usages' | 'both'; includeDetails?: boolean; }): Promise<Array<{ file: string; line: number; type: 'import' | 'usage'; context: string; from?: string; to?: string; resolvedTo?: string; }>>; getProjectStats(): { totalFiles: number; totalMethods: number; totalPaths: number; totalDependencies: number; lastIndexed: Date; }; private findFiles; private matchesPattern; private processFile; private findMethodUsages; private findDependenciesRecursive; private clearIndexData; private getStats; private serializeIndexData; private deserializeIndexData; } //# sourceMappingURL=indexer.d.ts.map