Skip to content

Support the token-less developer experience (omit developer-token header) #68

@abddeen

Description

@abddeen

Feature request

Please add support for the token-less developer experience so that developers enrolled in that program can run this MCP
server without setting GOOGLE_ADS_DEVELOPER_TOKEN.

Under the token-less program, requests to the Google Ads API are authenticated entirely via OAuth and the developer-token header should be omitted (or the requirement waived) for approved Google Cloud projects.

Current behavior

GOOGLE_ADS_DEVELOPER_TOKEN is mandatory. In ads_mcp/utils.py:

  • _get_developer_token() raises ValueError("GOOGLE_ADS_DEVELOPER_TOKEN environment variable not set.") when the env var is missing.
  • _get_googleads_client() always passes developer_token into GoogleAdsClient(...).

There is no flag, env var, or config option to disable this, so token-less program participants cannot use the server as-is.

Proposed behavior

  • Treat GOOGLE_ADS_DEVELOPER_TOKEN as optional.
  • When unset (or when an explicit opt-in like GOOGLE_ADS_TOKENLESS=1 is provided), construct the client without the developer token and ensure the developer-token header is not attached to outgoing requests.
  • Document the token-less mode in the README alongside the existing auth options.

Notes / open questions

  • The underlying google-ads-python GoogleAdsClient currently requires developer_token as a constructor argument, so this likely needs either (a) a workaround that constructs the client with a placeholder and
    strips the header in an interceptor (similar to the existing MCPHeaderInterceptor), or (b) a direct REST/gRPC call path that bypasses GoogleAdsClient for token-less users. Guidance from maintainers on the
    preferred approach would be appreciated.

Use case

Participants in the token-less program are not expected to provision or manage a developer token, so the current hard requirement blocks them from using this official MCP server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions