Skip to main content
Glama

Google Search MCP Server

index.ts1.12 kB
#!/usr/bin/env node import { spawn } from 'child_process'; import path from 'path'; import { fileURLToPath } from 'url'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { server } from './server.js'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); // Check for setup argument if (process.argv.includes('setup')) { // Run setup script const setupScript = path.join(__dirname, '..', 'setup.js'); const setupProcess = spawn('node', [setupScript], { stdio: 'inherit', shell: true }); setupProcess.on('exit', (code: number) => { process.exit(code || 0); }); } else { // Run MCP server const transport = new StdioServerTransport(); server.connect(transport); console.error('[INFO] Google Search MCP Server with API Key Rotation started'); console.error('[INFO] Tips:'); console.error('[INFO] - Each API key gives you 100 free searches per day'); console.error('[INFO] - Server automatically rotates between available keys'); console.error('[INFO] - Quotas reset at midnight UTC'); }

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/Fabien-desablens/google-search-mcp'

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