Compare commits

...

1 Commits

Author SHA1 Message Date
duwenxin
b482dbf8e0 docs: add temporary warning on ADC connection to Cloud Run issue 2026-01-09 17:41:46 -05:00
2 changed files with 6 additions and 0 deletions

View File

@@ -101,6 +101,9 @@ authentication token.
TOOLBOX_URL = "https://your-toolbox-service-xyz.a.run.app"
# Initialize the client with the Cloud Run URL and Auth headers
# WARNING: There is a known issue that may cause it to fail with a 401 error
# on local machines.
# See https://github.com/googleapis/mcp-toolbox-sdk-python/issues/496
client = ToolboxSyncClient(
TOOLBOX_URL,
client_headers={"Authorization": auth_methods.get_google_id_token(TOOLBOX_URL)}

View File

@@ -211,6 +211,9 @@ from toolbox_core import ToolboxClient, auth_methods
# Replace with the Cloud Run service URL generated in the previous step
URL = "https://cloud-run-url.app"
# WARNING: There is a known issue that may cause it to fail with a 401 error
# on local machines.
# See https://github.com/googleapis/mcp-toolbox-sdk-python/issues/496
auth_token_provider = auth_methods.aget_google_id_token(URL) # can also use sync method
async def main():