mcp-orchestrator
Version:
MCP Orchestrator - Discover and install MCPs with automatic OAuth support. Uses Claude CLI for OAuth MCPs (Canva, Asana, etc). 34 trusted MCPs from Claude Partners.
92 lines (91 loc) • 2.06 kB
TypeScript
/**
* Vector-Based MCP Discovery - Working Prototype
* This is a real, implementable solution using local vectors
* No external dependencies needed for MVP!
*/
/**
* MCP Index Entry with pre-computed embeddings
*/
interface MCPIndexEntry {
id: string;
name: string;
description: string;
packageName: string;
embedding: number[];
keywords: string[];
metadata: {
stars?: number;
downloads?: number;
lastUpdated?: string;
author?: string;
runtime?: string;
category?: string[];
};
}
/**
* The Vector-Based Discovery Engine
*/
export declare class VectorDiscoveryEngine {
private index;
private embedder;
private indexPath;
constructor(indexPath?: string);
/**
* Initialize with crawled MCP data
*/
initialize(): Promise<void>;
/**
* Build/rebuild the index from multiple sources
*/
buildIndex(): Promise<void>;
/**
* Crawl NPM for MCP packages
*/
private crawlNPM;
/**
* Crawl GitHub for MCP repositories
*/
private crawlGitHub;
/**
* Get known good MCPs
*/
private getKnownMCPs;
/**
* Deduplicate MCPs by package name
*/
private deduplicateMCPs;
/**
* Save index to disk
*/
private saveIndex;
/**
* SEMANTIC SEARCH - The Magic!
*/
discover(query: string, limit?: number): Promise<{
mcp: MCPIndexEntry;
score: number;
reason: string;
}[]>;
/**
* Generate human-readable reason for match
*/
private generateReason;
/**
* Add a new MCP to the index dynamically
*/
addMCP(mcp: Omit<MCPIndexEntry, 'embedding'>): Promise<void>;
/**
* Update the index with fresh data
*/
updateIndex(): Promise<void>;
/**
* Get statistics about the index
*/
getStats(): {
totalMCPs: number;
byRuntime: Record<string, number>;
byCategory: Record<string, number>;
mostPopular: any[];
};
}
export {};