@toolprint/hypertool-mcp
Version:
HyperTool MCP proxy server for routing requests between clients and multiple underlying MCP servers
63 lines • 1.85 kB
TypeScript
/**
* Server synchronization module
* Reconciles configurations from multiple sources with the internal database
*/
import { ServerConfig } from "../types/config.js";
import { IDatabaseService, IConfigSource } from "../db/interfaces.js";
import { ServerConfigRecord } from "../db/interfaces.js";
export declare class ServerSyncManager {
private dbService;
constructor(dbService: IDatabaseService);
/**
* Calculate checksum for a server configuration
*/
private calculateChecksum;
/**
* Sync server configurations from a specific source with the database
*/
syncServersFromSource(mcpServers: Record<string, ServerConfig>, source: IConfigSource): Promise<{
added: number;
updated: number;
deleted: number;
}>;
/**
* Legacy sync method - creates/uses global source
*/
syncServers(mcpServers: Record<string, ServerConfig>): Promise<{
added: number;
updated: number;
deleted: number;
}>;
/**
* Remove a server from all groups that reference it
*/
private removeServerFromGroups;
/**
* Get server configurations for a specific group
*/
getServersForGroup(groupName: string): Promise<ServerConfigRecord[]>;
/**
* Get all server configurations from the database
*/
getAllServers(): Promise<ServerConfigRecord[]>;
/**
* Sync all configuration sources
*/
syncAllSources(): Promise<{
total: {
added: number;
updated: number;
deleted: number;
};
sources: Array<{
sourceId: string;
type: string;
stats: {
added: number;
updated: number;
deleted: number;
};
}>;
}>;
}
//# sourceMappingURL=serverSync.d.ts.map