feat: add 'login_customer_id' support to enable Manager Account access#10
Open
balikasg wants to merge 2 commits intogoogleads:mainfrom
Open
feat: add 'login_customer_id' support to enable Manager Account access#10balikasg wants to merge 2 commits intogoogleads:mainfrom
balikasg wants to merge 2 commits intogoogleads:mainfrom
Conversation
This commit enables the tool to accept an optional parameter. This is required when accessing client accounts via a Manager Account, as the Google Ads API demands the header in such cases. Changes: - Updated to dynamically create/retrieve a GoogleAdsClient with the specific if provided. - Updated to accept the argument and pass it to the service factory. - Added tool documentation hints.
balikasg
commented
Dec 5, 2025
| conditions: List[str] = None, | ||
| orderings: List[str] = None, | ||
| limit: int | str = None, | ||
| login_customer_id: str = None, |
Author
There was a problem hiding this comment.
The core of this PR. Add support and propagate properly in the project for this parameter.
balikasg
commented
Dec 5, 2025
| """Tests that output values are formatted correctly.""" | ||
|
|
||
| client = utils.get_googleads_client() | ||
| client = utils._get_googleads_client() |
Author
There was a problem hiding this comment.
This is a typo..
Once fixed the tests are green:
OK
nox > Session tests-3.13 was successful in 34 seconds.
nox > Ran 4 sessions in 2 minutes:
nox > * tests-3.10: success, took 35 seconds
nox > * tests-3.11: success, took 31 seconds
nox > * tests-3.12: success, took 34 seconds
nox > * tests-3.13: success, took 34 seconds
Author
|
@DeanLukies any chance you could take a look at this? |
|
Does anyone check this? |
Collaborator
|
Hi, thanks for looking into this! We are evaluating adding this feature in a future version of the MCP server, but we won't be doing so right now. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for the login_customer_id parameter in the search tool. This is critical for users accessing Client Accounts via a Manager Account, as the Google Ads API explicitly requires the login-customer-id header to be set for these requests.
Problem
Currently, attempting to query a client account (customer_id) while authenticated as a Manager Account results in a USER_PERMISSION_DENIED error with the message to pass a login_customer_id as part of the headers. This happens because the default client initialization uses the global configuration without the specific login-customer-id context required for hierarchy traversal. The MCPs do not currently support passing this information and this PR adds this functionality.