Skip to main content
Glama

Brave Search MCP Server

Official
utils.ts621 B
import { RATE_LIMIT } from './constants.js'; let requestCount = { second: 0, month: 0, lastReset: Date.now(), }; export function checkRateLimit() { const now = Date.now(); if (now - requestCount.lastReset > 1000) { requestCount.second = 0; requestCount.lastReset = now; } if (requestCount.second >= RATE_LIMIT.perSecond || requestCount.month >= RATE_LIMIT.perMonth) { throw new Error('Rate limit exceeded'); } requestCount.second++; requestCount.month++; } export function stringify(data: any, pretty = false) { return pretty ? JSON.stringify(data, null, 2) : JSON.stringify(data); }

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/brave/brave-search-mcp-server'

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