Add mcp-servers dir

This commit is contained in:
Saoud Rizwan
2024-12-09 13:13:06 -08:00
parent 7056f6c689
commit 61311e3f41
4 changed files with 65 additions and 21 deletions

View File

@@ -55,6 +55,19 @@ export class McpHub {
this.initializeMcpServers()
}
getServers(): McpServer[] {
return this.connections.map((conn) => conn.server)
}
async getMcpServersPath(): Promise<string> {
const provider = this.providerRef.deref()
if (!provider) {
throw new Error("Provider not available")
}
const mcpServersPath = await provider.ensureMcpServersDirectoryExists()
return mcpServersPath
}
async getMcpSettingsFilePath(): Promise<string> {
const provider = this.providerRef.deref()
if (!provider) {