Skip to main content
Glama

mcp-google-sheets

semaphore.ts675 B
export class ApSemaphore { private maxConcurrent: number private queue: (() => void)[] private currentConcurrent: number constructor(maxConcurrent: number) { this.maxConcurrent = maxConcurrent this.queue = [] this.currentConcurrent = 0 } async acquire() { if (this.currentConcurrent >= this.maxConcurrent) { await new Promise<void>((resolve) => this.queue.push(resolve)) } this.currentConcurrent++ } release() { this.currentConcurrent-- if (this.queue.length > 0) { const nextResolver = this.queue.shift() nextResolver?.() } } }

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/activepieces/activepieces'

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