Skip to main content
Glama
token-storages.ts750 B
import type { TokenStorage } from '../../src/auth/token-manager.js' export class MemoryKVStorage implements TokenStorage { private kv = new Map<string,string>() async set(key: string, value: string) { this.kv.set(key, value) } async get(key: string) { return this.kv.get(key) } async delete(key: string) { this.kv.delete(key) } async *entries() { for (const e of this.kv.entries()) yield e } } export class RedisLikeStorage implements TokenStorage { private map = new Map<string, string>() async set(key: string, value: string) { this.map.set(key, value) } async get(key: string) { return this.map.get(key) } async delete(key: string) { this.map.delete(key) } async *entries() { for (const e of this.map.entries()) yield e } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jakedismo/master-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server