Skip to main content
Glama
mask.ts475 B
/** * Mask sensitive API key for display * * Obfuscates an API key by replacing all but the last 4 characters with asterisks. * Preserves a consistent masked format for security while providing a way to * distinguish between different keys. * * @param key - The API key to mask * @returns Masked key with only the last 4 characters visible */ export function maskApiKey(key: string): string { if (key.length <= 4) return '****'; return `****${key.slice(-4)}`; }

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/sdd330/feishu-mcp-server'

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