Google Ads MCP server official setup and OAuth

How the official Google Ads MCP server authenticates users with OAuth, runs as a web service, and stores OAuth state and tokens, with the gaps to cover before rollout.

On this page

Does the official Google Ads MCP server support OAuth for enterprise setup?

The official googleads/google-ads-mcp server supports OAuth user authentication through FastMCP's OAuth proxy when it runs as a web service, but the repository documents no SSO, no admin approval workflow and no audit logging for the server. A team deciding how an agent signs in to Google Ads should treat those three enterprise controls as unconfirmed until they are verified in their own environment. The googleads/google-ads-mcp README is the only documented source the server's authentication behavior can be checked against in this review.

Switching the server to web service mode is what turns on the OAuth proxy. The README says that setting GOOGLE_ADS_MCP_OAUTH_CLIENT_ID and GOOGLE_ADS_MCP_OAUTH_CLIENT_SECRET for a Google Cloud OAuth 2.0 client moves the server from stdio to the streamable-http transport, with clients connecting to an endpoint such as ` Reviewers should confirm who owns that Google Cloud OAuth client, which consent screen and audience it uses, and whether the organization's Google Workspace or Cloud identity policies restrict which users can complete the sign-in. Those controls sit at the Google account and Cloud level, not in the MCP server, so they need their own evidence from the Google Workspace and Cloud administrators.

Before approving the setup, ask the engineering team to document three things: where OAuth state is kept (the README lists filetree, redis, firestore and memory backends), which encryption key protects stored OAuth tokens and who holds it, and how access is reviewed when someone leaves the team. Confirm any SSO, admin approval or audit logging requirement with Google directly, and in the organization's own logging stack, because the repository does not describe them. The Google Ads API developer documentation also lists the server in its developer toolkit, which is a useful place to confirm current behavior before go-live.

Which enterprise controls the official server documents

This table compares each control a reviewer may ask about with what the official Google Ads MCP server README documents, what it provides out of the box, what needs a separate component, and what the documentation does not cover. Read the last column first: SSO, admin approval and audit logging are not documented for this server, so they must come from your own identity, gateway or logging stack. Confirm these gaps with Google before approval.

ControlDocumented in READMEBuilt inNeeds outside component
OAuth user authentication through FastMCP OAuth proxyYes, for dynamic user authentication when the server runs as a web serviceYes, when the OAuth variables are setA Google Cloud OAuth 2.0 client with its ID and secret
Stdio transportYes, the default local transportYes, used when OAuth variables are not setNone, the client launches the server process
Streamable-http transportYes, used once OAuth variables are set, served at an endpoint such as Yes, switches automatically when OAuth is configuredA reverse proxy or TLS termination if exposed beyond localhost
OAuth state storage backendsYes, filetree, redis, firestore or memoryPartly, the backend must be chosen and configuredRedis or Firestore if you need shared or durable state
Token encryption keyYes, an encryption key variable protects stored OAuth tokensNo, the key must be suppliedYour own key management and rotation process
Rootless Podman hardeningYes, a tested rootless deployment with a read-only container, no new privileges and all capabilities droppedYes, documented configurationPodman or an equivalent runtime and your host hardening
Keeping server credentials out of MCP client configurationYes, advised in the READMENo, depends on how your team configures clientsA secrets manager or controlled deployment configuration
Single sign-on (SSO)Not documentedNot documentedYour identity provider for access to the hosting environment, to be confirmed with Google
Admin approval workflowNot documentedNot documentedA gateway or internal approval process, to be confirmed with Google
Audit loggingNot documentedNot documentedYour own logging and monitoring around the server, to be confirmed with Google

How the OAuth proxy, transport and token store fit together

The official Google Ads MCP server has four moving parts that a reviewer should map before approving a web deployment: the MCP client, the server process running FastMCP's OAuth proxy, a Google Cloud OAuth 2.0 client, and the Google Ads API that the server calls on the user's behalf. The README says the OAuth proxy supports dynamic user authentication and is useful when the server runs as a web service. Once the GOOGLE_ADS_MCP_OAUTH_CLIENT_ID and GOOGLE_ADS_MCP_OAUTH_CLIENT_SECRET variables are set, the server switches from stdio to the streamable-http transport, and clients connect to an HTTP endpoint such as ` That switch changes the trust boundary: the server is now a network listener, so who can reach that port becomes a deployment decision, not just a local one.

Two storage decisions sit beside the proxy. The README lists filetree, redis, firestore and memory as backends for OAuth state, and an encryption key variable protects stored OAuth tokens. Confirm which backend your team selects, where it runs, who can read it, and how the encryption key is provisioned and rotated, because whoever holds that key and the backend can reach the tokens the proxy keeps. The memory option keeps state only in the process, so restarts will end sessions. Keep the OAuth client secret and encryption key out of MCP client configuration, as the README advises.

Enforcement is split. The server process enforces what it will accept at its own endpoint and what it passes to the Google Ads API. Google's authorization server decides whether a user is granted consent and which OAuth scopes the token carries, and the Google Ads API decides what that account may do. The README does not document SSO, admin approval workflows or audit logging for the server, so a reviewer should not assume that identity provider sign-in, a central allowlist or per-request logs exist. Ask the team to confirm those controls in writing, and to test them in their own environment before rollout.

How a self-hosted deployment handles sign-in, tokens and API calls

The flow starts when an MCP client connects to the self-hosted server over the streamable-http endpoint. The server hands the user to Google for OAuth 2.0 consent using the Google Cloud client ID and secret you configure, then exchanges the returned code for tokens. Those tokens are stored in the OAuth state backend you select (filetree, redis, firestore or memory) and encrypted with your token encryption key. Check where each backend lives, who can read it, and where the encryption key is held, because those three points decide who can use the account after sign-in.

Illustrative flow of the documented OAuth proxy, token storage and API components.

Decisions to make before running it as a web service

Running the official Google Ads MCP server as a web service moves several decisions onto your team: who owns the OAuth client, where OAuth state lives, who holds the token encryption key, and who can reach the endpoint. Each choice changes how you recover from failure, how many people can safely connect, and what evidence a security reviewer can collect.

OAuth client and consent ownership

The server reads GOOGLE_ADS_MCP_OAUTH_CLIENT_ID and GOOGLE_ADS_MCP_OAUTH_CLIENT_SECRET for a Google Cloud OAuth 2.0 client. Decide whether your security team or the platform team creates that client, who can rotate its secret, and which consent screen users see. Record the client's configuration as review evidence, because the client defines which users can sign in and what they agree to.

README setup

Storage backend durability

OAuth state can live in filetree, redis, firestore or memory. Memory loses state on restart, so every user must sign in again after a deployment or crash. A filetree on a single host ties recovery to that host's disk. Redis or Firestore support shared state for several server instances, but you must confirm who operates the backend, how it is backed up, and who can read it.

Token encryption key custody

The README provides an encryption key variable for stored OAuth tokens. Whoever holds that key can decrypt every stored token, so store it in your organization's secrets manager rather than in a file beside the data it protects. Define a rotation procedure before go-live, and confirm what happens to existing tokens when the key changes. Losing the key means users must re-authorize.

Network exposure of the endpoint

With OAuth variables set, the server switches to the streamable-http transport and clients connect to an endpoint such as ` Decide whether that endpoint stays on a loopback address, sits behind an internal load balancer or is reachable more widely. Confirm that traffic is encrypted between clients and the server, because the example address uses plain HTTP. Restrict inbound access to approved client networks.

Credentials outside client configuration

The README advises keeping server credentials out of MCP client configuration. Client configuration files often sit on laptops, sync to repositories or get shared between developers. Keep the OAuth client secret and encryption key on the server side only, and check that each developer's client config contains the endpoint address and nothing secret. Review this in every onboarding.

Google Cloud project ownership

The Google Cloud project holds the Google Ads API enablement and the OAuth client. Decide which team owns that project, who holds billing and IAM roles, and how access is removed when people leave. A project owned by one individual becomes a recovery risk, and a project shared broadly makes the OAuth client harder to defend in a review.

How the setup differs by hosting and team size

On a laptop, the MCP client starts the server as a local process and talks to it over stdio. The README switches to the web transport only when the OAuth variables are set, so a laptop setup normally runs without the OAuth proxy. The main trust boundary is the developer's machine and the Google Cloud credentials configured on it.

  • Transport: stdio, started by the MCP client on the developer's machine, with no listening network port.
  • Token storage: Credentials and tokens stay in the developer's local environment. Confirm where the local credential files sit and who can read them.
  • Network boundary: The machine itself is the boundary, and API traffic to Google Ads leaves from that machine. Confirm which device policies apply to it.
  • Review evidence: A written rule for who may install the server, which Google account is used, and the version approved for use.

Before approving this model, check whether the Google account is personal or shared, because that choice decides who owns the access trail and who can revoke it.

Order of work to put OAuth in production

This sequence moves the official Google Ads MCP server from a test setup to a web service that a team can review, with clear ownership of the Google Cloud project, the OAuth client, the token storage and the credentials.

  1. Confirm project and API enablement ownership

    The security or platform owner and the Google Ads account owner agree in writing which Google Cloud project will hold the Google Ads API enablement and the OAuth client, and who can change its settings. Someone with administrative rights in that project enables the Google Ads API there, as the repository setup steps describe. Done means you can name the project, its owner and the people with editor or owner rights, and you have recorded that list in your change log.

  2. Create the OAuth client and set consent

    In the same Google Cloud project, create a Google Cloud OAuth 2.0 client for the server, then configure the OAuth consent screen with the audience, scopes and contact details your organization decides on. Record the client ID and client secret in your secret manager, not in a shared document. Done means the client exists, the consent configuration has been reviewed by the owner from step one, and you can show which Google Ads scopes the client requests.

  3. Choose and harden the storage backend

    The README lists four storage backends for OAuth state: filetree, redis, firestore and memory. Pick one based on your hosting model, confirm who can read it and whether it is encrypted at rest in your environment, and avoid memory for anything that must survive a restart. Restrict access so only the server's runtime identity can read or write it. Done means you have a written choice of backend, its access list and a test showing state persists after a restart.

  4. Set the token encryption key from a managed secret store

    Generate the encryption key used for stored OAuth tokens and load it at runtime from a managed secret store, rather than a file in the repository or a value in shell history. Limit read access to the service identity and record who can rotate the key. Confirm that rotating the key is handled as a planned change, because the server's stored tokens depend on it. Done means the key is retrieved from the secret store at startup, no copy exists in configuration files, and the rotation owner is named.

  5. Apply the documented rootless Podman hardening

    Run the server with the rootless Podman profile the README tests: a read-only container, no new privileges and all capabilities dropped. Switch the transport to streamable-http once the OAuth variables are set, and place the endpoint behind the network controls your team uses for internal services. Your security engineer should confirm the container cannot write outside the paths it needs for state. Done means a container inspection shows the read-only, no-new-privileges and dropped-capabilities settings, and the endpoint answers only from the networks you approved.

  6. Keep server credentials out of client configuration

    Configure each MCP client to reach the endpoint without holding the Google Cloud OAuth client secret, the encryption key or any Google Ads credential, as the README advises. Store any remaining client-side settings in files that developers cannot share outside the approved workstation setup. Done means a review of every client configuration file finds no secret values, and the server holds the credentials on its side only.

  7. Verify token revocation and state cleanup

    Test the full lifecycle with a non-production Google Ads account: sign in through the OAuth flow, confirm the tokens are stored encrypted in the chosen backend, revoke access from the Google account side, and check that the server rejects further calls. Then confirm that OAuth state entries are removed or expire as your backend allows, and document how an offboarded user's entries are deleted. Done means the revocation test fails cleanly, the stored state is cleared on the schedule you set, and the results are filed with the change record.

What a security reviewer asks to see for OAuth and token storage

This table pairs each thing a security reviewer will ask about the self-hosted Google Ads MCP server's OAuth setup with where the answer comes from in the README or in your own environment. Rows marked as reader-supplied need evidence from your cloud project, container runtime or logs, since the README documents the settings but not how your team configured them. Use it as a pre-approval checklist, and treat any blank answer as an open finding.

Review questionWhere the answer comes fromWhat the reader must produce
OAuth client configurationEnvironment variables GOOGLE_ADS_MCP_OAUTH_CLIENT_ID and GOOGLE_ADS_MCP_OAUTH_CLIENT_SECRET for a Google Cloud OAuth 2.0 clientClient ID, owning project, consent screen settings and who can edit the client secret
Storage backend and locationREADME lists OAuth state storage as filetree, redis, firestore or memoryThe backend chosen, its host or bucket location, access rules and whether memory-only state is acceptable for the deployment
Encryption key handlingREADME names an encryption key variable for stored OAuth tokensWhere the key is held, who can read it, rotation procedure and confirmation it is not stored beside the tokens
Container hardening settingsREADME's tested rootless Podman deployment: read-only container, no new privileges, all capabilities droppedRuntime configuration showing each setting applied, plus proof from a running container inspection
Transport and endpoint exposureREADME switches to streamable-http when OAuth variables are set, with an endpoint such as Network path to the endpoint, TLS termination point, firewall or ingress rules and who can reach it
Credential placement in client configurationREADME advises keeping server credentials out of MCP client configurationClient config files from a sample workstation showing no client secret, encryption key or token values
Google Cloud audit logsGoogle Cloud project logging and the Google Ads API account activity, not documented by the READMEConfirmed log sinks, retention period set by your policy, and who reviews OAuth and API events

Questions buyers ask before approving the OAuth setup

Does the official Google Ads MCP server support SSO with our company identity provider?

The README does not document SSO, admin approval workflows or audit logging for the server, so you should not assume your identity provider sign-in applies to it. The server's OAuth proxy authenticates users against a Google Cloud OAuth 2.0 client that you configure with GOOGLE_ADS_MCP_OAUTH_CLIENT_ID and GOOGLE_ADS_MCP_OAUTH_CLIENT_SECRET. Ask Google or your own platform team how the OAuth client is restricted to your organization, and whether any sign-in policy can be enforced in your Google Cloud and Google Ads accounts. Treat any SSO requirement as an open item to confirm in your environment before approval.

What would an in-house team have to build to run this server as a web service?

The team has to stand up the server, a Google Cloud project with the Google Ads API enabled, an OAuth 2.0 client, a token encryption key, and an OAuth state store. The README describes the OAuth proxy as useful when the server runs as a web service, and it switches the transport to streamable-http with an endpoint such as ` when OAuth variables are set. Around that, the team must add its own reverse proxy or network controls, secrets handling, container hardening and logging. The README includes a tested rootless Podman deployment with a read-only container, no new privileges and all capabilities dropped, which is a starting point for the build rather than a finished control set.

What drives the effort and cost of this setup?

The main drivers are the Google Cloud configuration, how much hardening the runtime needs, how much logging and review you require, and how many people use the server. Google Cloud setup is a one-time task, but credential rotation, client changes and token handling recur. Hardening and logging grow with the number of environments and the depth of your review. The README does not publish cost or duration figures for these steps, so ask for each cost component in a written quote, including who operates the server after go-live and which items recur.

Can our own team deploy this without outside help?

Yes, a team with Python, Google Cloud and container skills can follow the repository setup steps, which cover configuring Python, enabling the Google Ads API in a Google Cloud project, configuring credentials and configuring the MCP client. The harder part is the production controls around it: an OAuth state backend that suits your architecture, encryption of stored tokens, container isolation and evidence for reviewers. DeployOpen implements self-hosted platforms in the client's own infrastructure and runs security testing against AI agent setups, and most engagements are fixed-scope with the scope agreed in writing before work starts.

Which storage backend should we choose for OAuth state?

The README lists four storage backends for OAuth state: filetree, redis, firestore and memory. Choose based on whether the state must survive restarts, be shared across more than one server instance, and stay inside your own infrastructure. Memory is the simplest but does not persist, while filetree depends on the host's file permissions and storage controls. Redis and Firestore add an external service that needs its own access control, backup and network policy. Confirm with your platform team which backend your hosting model supports, and check how each one is secured, backed up and deleted.

Are the OAuth tokens encrypted at rest?

The README includes an encryption key variable for stored OAuth tokens, so the server is designed to encrypt tokens it stores. Ask your reviewers to confirm the algorithm, where the key is held, who can read it, and how it is rotated, because the key is only as protected as the place it lives. Keep the key out of MCP client configuration, which the README advises for server credentials. Also confirm what happens to the stored tokens when the storage backend is backed up, copied or deleted.

What evidence does an auditor or security reviewer need from this setup?

A reviewer will want a written description of the architecture, the OAuth client configuration and its restrictions, the storage backend and encryption settings, the container and network controls, and the list of people who can change them. The README does not document audit logging for the server, so logging must come from your own infrastructure, such as container, proxy and Google Cloud logs. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports or attestations, and independent auditors and certification bodies make those determinations.

What to confirm with Google and in your environment

Start with the questions the public sources do not answer. The repository and Google's developer guide describe how the server is set up, but they do not state which Google Workspace or Google Cloud edition, or which admin console control, governs use of the Google Ads API by a self-hosted MCP server. Ask Google, through your Google Ads account team or the support channel for the Google Ads API, whether any organization-level control can block or allowlist the OAuth client you create, and whether that control depends on your Google Ads manager account structure. Also ask whether Google provides audit logs for calls made through this server, and if so, which log surface records them (the Google Ads change history, Google Cloud audit logs for the project, or neither). Record the answer in writing, because the README does not document audit logging for the server at all.

Next, decide where OAuth state and tokens will live, then confirm retention in that backend. The README lists the storage options as filetree, redis, firestore or memory and an encryption key variable for stored tokens. Each backend has different retention behavior, backup behavior and access controls, and the documentation supplied here does not set out how long state or tokens persist, how they are purged after a user leaves, or who can read the backend. Verify these with your platform team by testing revocation and expiry in a non-production environment, and confirm where backups of the chosen store end up. Treat the encryption key as a secret with its own owner and rotation plan.

Finally, check how the usage header and data handling are covered before sign-off. The sibling page on Google Ads MCP server data privacy addresses the usage header Google adds to API calls, what data the connected agent sees, and how tokens are stored when you self-host, so this section does not repeat those points. Use that page as the reference for those questions, and send the open items it identifies to the same Google contact. Keep a single evidence file that holds Google's written answers, the storage backend you chose, the retention test results and the named owner for each item, so the security reviewer can trace every approval to a source.

How DeployOpen helps teams roll out the Google Ads MCP server safely

DeployOpen plans and deploys the official Google Ads MCP server inside your own infrastructure, with OAuth client settings, token encryption and OAuth state storage reviewed before any staff member connects an agent. Each step is scoped in writing, tested and handed over with documentation your security and IT teams can review.

How we scope

  • We confirm which Google Cloud project, OAuth 2.0 client and Google Ads accounts the server will reach before work starts.
  • We agree in writing whether the server runs over stdio for individual use or as a web service with the streamable-http transport.
  • We record which OAuth state backend (filetree, redis, firestore or memory) fits your hosting model and retention requirements.

How we build

  • We configure the OAuth proxy variables, including the client ID and secret, so credentials stay in server-side settings, not client files.
  • We set the token encryption key and confirm how stored OAuth tokens are protected at rest in your environment.
  • We deploy the container with a read-only filesystem, no new privileges and all capabilities dropped, following the tested rootless Podman pattern.

How we hand over

  • We deliver a written configuration record covering OAuth settings, storage backend, transport and container hardening choices.
  • We document the client connection steps and the rule that server credentials never appear in MCP client configuration.
  • We provide a findings report on access, token handling and logging gaps, with fixes and a retest before sign-off.

How we support

  • Engagements are fixed-scope, and the scope, deliverables and timeline are agreed in writing before work starts.
  • Upgrades to the official repository, OAuth configuration changes and periodic security retesting can be covered by a retainer.
  • We confirm with your team which controls Google documents and which, such as SSO, admin approval and audit logging, you must source elsewhere.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.