Gemini CLI Core - Core functionality library for the open-source AI agent that brings the power of Gemini directly into your terminal.
Overall
score
87%
Evaluation — 87%
↑ 1.01xAgent success when using this tile
Build a simple OAuth token manager for Model Context Protocol (MCP) servers that handles token storage, validation, and refresh operations.
Create a token management system with the following features:
Your implementation should:
@generates
/**
* Token management for MCP OAuth servers
*/
export class MCPTokenManager {
constructor(validationBufferSeconds?: number);
/**
* Store a token for a server
*/
storeToken(serverName: string, token: TokenData): Promise<void>;
/**
* Get a token for a server
*/
getToken(serverName: string): Promise<TokenData | null>;
/**
* Get a valid token, refreshing if necessary
*/
getValidToken(serverName: string, refreshCallback: (refreshToken: string) => Promise<TokenData>): Promise<string | null>;
/**
* Check if a token is valid
*/
isTokenValid(token: TokenData): boolean;
/**
* List all servers with stored tokens
*/
listServers(): Promise<string[]>;
/**
* Delete a token for a server
*/
deleteToken(serverName: string): Promise<void>;
/**
* Clear all stored tokens
*/
clearAll(): Promise<void>;
}
export interface TokenData {
accessToken: string;
tokenType: string;
expiresAt?: number;
refreshToken?: string;
scope?: string;
}Provides MCP OAuth integration and token management capabilities.
Install with Tessl CLI
npx tessl i tessl/npm-google--gemini-cli-coredocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10