Skip to main content
Glama

Google Ads MCP Server

by martechery
authAutoOffer.test.ts952 B
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; describe('auth auto-offer oauth_login', () => { const OLD_ENV = process.env; beforeEach(() => { vi.resetModules(); vi.restoreAllMocks(); process.env = { ...OLD_ENV }; delete process.env.GOOGLE_ADS_ACCESS_TOKEN; delete process.env.GOOGLE_APPLICATION_CREDENTIALS; process.env.GOOGLE_OAUTH_CLIENT_ID = 'id'; process.env.GOOGLE_OAUTH_CLIENT_SECRET = 'secret'; }); afterEach(() => { process.env = OLD_ENV; }); it('throws actionable hint when ADC missing and OAuth client env present', async () => { vi.mock('google-auth-library', () => ({ GoogleAuth: class { quotaProjectId = undefined; getClient() { return { getAccessToken: async () => ({ token: null }) }; } }, })); const mod = await import('../../src/auth.js'); await expect(mod.getAccessToken()).rejects.toThrow(/oauth_login/); }); });

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/martechery/mcp-google-ads-ts'

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