UNPKG

code-context-mcp

Version:

MCP server for semantic code search powered by MongoDB Atlas Vector Search and Voyage AI embeddings

74 lines 2.11 kB
import { Context } from "@zilliz/claude-context-core"; import { SnapshotManager } from "./snapshot.js"; export declare class ToolHandlers { private context; private snapshotManager; private indexingStats; private currentWorkspace; constructor(context: Context, snapshotManager: SnapshotManager); /** * Sync indexed codebases from Zilliz Cloud collections * This method fetches all collections from the vector database, * gets the first document from each collection to extract codebasePath from metadata, * and updates the snapshot with discovered codebases. * * Logic: Compare mcp-codebase-snapshot.json with zilliz cloud collections * - If local snapshot has extra directories (not in cloud), remove them * - If local snapshot is missing directories (exist in cloud), ignore them */ private syncIndexedCodebasesFromCloud; handleIndexCodebase(args: any): Promise<{ content: { type: string; text: any; }[]; isError: boolean; } | { content: { type: string; text: string; }[]; isError?: undefined; }>; private startBackgroundIndexing; handleSearchCode(args: any): Promise<{ content: { type: string; text: string; }[]; isError: boolean; } | { content: { type: string; text: any; }[]; isError?: undefined; }>; handleClearIndex(args: any): Promise<{ content: { type: string; text: string; }[]; isError: boolean; } | { content: { type: string; text: any; }[]; isError?: undefined; }>; handleGetIndexingStatus(args: any): Promise<{ content: { type: string; text: string; }[]; isError: boolean; } | { content: { type: string; text: string; }[]; isError?: undefined; }>; } //# sourceMappingURL=handlers.d.ts.map