We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/DiegoNogueiraDev/mcp-context-hub'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
tokens.ts•164 B
/**
* Rough token estimate: ~4 chars per token for English text.
*/
export function estimateTokens(text: string): number {
return Math.ceil(text.length / 4);
}