@synvo_ai/mcp-server
Version:
Enterprise-grade MCP server for Synvo AI - File management and AI query capabilities for Claude Desktop, VSCode, and Cursor
93 lines • 2.41 kB
TypeScript
/**
* License Management Module for Synvo MCP Server
* Handles license verification, quota management, and user authentication
*/
export interface License {
license_key: string;
tier: 'free' | 'pro' | 'team' | 'enterprise';
last_verified: string;
cached_quota: Quota;
user_email?: string;
expires_at?: string;
}
export interface Quota {
uploads_per_day: number;
queries_per_day: number;
max_file_size_mb: number;
}
export interface VerifyLicenseRequest {
license_key: string;
machine_id: string;
version: string;
}
export interface VerifyLicenseResponse {
valid: boolean;
tier: 'free' | 'pro' | 'team' | 'enterprise';
expires_at: string;
quota: Quota;
usage?: {
uploads_today: number;
queries_today: number;
};
error?: string;
}
export interface LicenseStatus {
tier: string;
quota: Quota;
usage?: {
uploads_today: number;
queries_today: number;
};
is_valid: boolean;
expires_at?: string;
}
/**
* Generate a unique machine identifier
* This is used to bind licenses to specific machines (optional)
*/
export declare function getMachineId(): string;
/**
* Load license from local file
*/
export declare function loadLicense(): License | null;
/**
* Save license to local file
*/
export declare function saveLicense(license: License): void;
/**
* Delete local license file
*/
export declare function deleteLicense(): void;
/**
* Verify license with remote server
*/
export declare function verifyLicense(licenseKey: string): Promise<VerifyLicenseResponse>;
/**
* Check if license needs revalidation
*/
export declare function needsRevalidation(license: License): boolean;
/**
* Check if license is expired
*/
export declare function isLicenseExpired(license: License): boolean;
/**
* Get current license status (with caching and fallback)
*/
export declare function getLicenseStatus(): Promise<LicenseStatus>;
/**
* Activate a license (CLI command)
*/
export declare function activateLicense(licenseKey: string): Promise<void>;
/**
* Deactivate license (CLI command)
*/
export declare function deactivateLicense(): void;
/**
* Format quota for display
*/
export declare function formatQuota(quota: Quota): string;
/**
* Get upgrade message for free tier users
*/
export declare function getUpgradeMessage(): string;
//# sourceMappingURL=license.d.ts.map