We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/arihgoldstein/fastmode-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
credentials.d.ts•1.48 KiB
/**
* Stored credentials for the MCP server
*/
export interface StoredCredentials {
accessToken: string;
refreshToken: string;
expiresAt: string;
email: string;
name?: string;
}
/**
* Get the path to the credentials file
*/
export declare function getCredentialsPath(): string;
/**
* Load stored credentials from disk
*/
export declare function loadCredentials(): StoredCredentials | null;
/**
* Save credentials to disk
*/
export declare function saveCredentials(credentials: StoredCredentials): void;
/**
* Delete stored credentials
*/
export declare function deleteCredentials(): void;
/**
* Check if credentials exist
*/
export declare function hasCredentials(): boolean;
/**
* Check if the access token is expired or about to expire
*/
export declare function isTokenExpired(credentials: StoredCredentials, bufferMinutes?: number): boolean;
/**
* Get the API URL from environment or default
*/
export declare function getApiUrl(): string;
/**
* Refresh the access token using the refresh token
*/
export declare function refreshAccessToken(credentials: StoredCredentials): Promise<StoredCredentials | null>;
/**
* Get valid credentials, refreshing if needed
* Returns null if no credentials or refresh fails
*/
export declare function getValidCredentials(): Promise<StoredCredentials | null>;
/**
* Get the current auth token (access token) if available and valid
*/
export declare function getAuthToken(): Promise<string | null>;
//# sourceMappingURL=credentials.d.ts.map