[RECIPE PROPOSAL] gcp-mcp-finops-agent: FinOps agent on Google Cloud's hosted BigQuery MCP server (Python)
⚠️ Scope Notice
For contrib/ recipes only. core/ recipes follow a different process.
1- What is the intent/purpose of your new recipe? In what way will it help the ADK community?
A single-agent Python recipe, contrib/python/gcp-mcp-finops-agent, that answers cloud cost questions by querying the Cloud Billing export in BigQuery through Google Cloud's hosted BigQuery MCP server. There is nothing to install or run besides the agent: it connects to the remote MCP endpoint over Streamable HTTP and authenticates with Application Default Credentials.
I searched core/, contrib/ and skills/ and found no recipe that connects to a Google Cloud hosted MCP server (no use of StreamableHTTPConnectionParams and no googleapis.com/mcp endpoint). The ADK docs describe the integration (Integrations > Google Cloud MCP servers), but there is no runnable example to fork. This recipe would be that example.
What it teaches that the current recipes do not:
- Connecting
McpToolsetto a Google-hosted remote MCP server, including the IAM setup (roles/mcp.toolUserplus the BigQuery roles) that people usually get wrong the first time. - Per-request credentials with
header_provider. A token minted once at import expires after about an hour and the toolset silently stops working, which looks like a model problem until someone checks the clock. The recipe refreshes the token on every MCP request. - A read-only
tool_filterallowlist. The agent only ever sees the query and metadata tools, so write tools are never offered to the model. An allowlist is used on purpose: a blocklist misses a mutating tool with a harmless name. - Degrading instead of crashing. If the MCP server is unreachable or the role is missing, the agent still loads in
adk weband tells the user what is not configured, instead of failing at import. - A FinOps instruction grounded in how the billing export really behaves: the export belongs to a billing account and not to a project, so the agent queries the billing project and filters by the project being asked about; it checks the date range the data actually covers before answering anything time-relative; and every number it reports comes from a query it ran, never from an estimate.
The connection pattern is the main lesson and it carries over to the other Google Cloud MCP servers (Cloud Logging, Cloud Monitoring, Cloud Run). FinOps is the concrete problem that keeps the recipe focused and useful on its own.
2- What language is your recipe is implemented in (e.g. Python, Go, etc)?
Python (3.11+, uv, google-adk[mcp]).
3- Will this be a deployable recipe, either by having a Dockerfile, or by utilizing Vertex AI?
Not in the first version. It runs locally with adk web or adk run. I would rather land a small, focused recipe first and make it deployable in a follow-up PR using the make-python-recipe-deployable repo skill, if you think that is valuable.
4- What GCP services or third-party APIs (Salesforce, Jira, etc.) are required?
- Agent Platform (formerly Vertex AI) for Gemini (model name read from an env var, default
gemini-3.5-flash) - BigQuery, with the BigQuery remote MCP server (enabled together with the BigQuery API)
- A Cloud Billing export to BigQuery. The table name is an env var, so any dataset with the standard export schema works.
- IAM:
roles/mcp.toolUser, BigQuery Data Viewer and BigQuery Job User for the account the agent runs as
No third-party APIs. The runnability test and unit tests need no credentials and no network.
5- Who (individual/team) will own and maintain this?
Me, @vishal-bulbule (Vishal Bulbule, TechTrapture). I am a Google Developer Expert for Google Cloud and AI, I work with ADK, MCP and GCP FinOps daily, and I will be the ownership.poc in manifest.yaml. The Google CLA is already signed.
6- Please include any additional information you'd like to share.
- The recipe is small: one agent package, a config module, the MCP toolset module, the instruction,
.env.example,manifest.yaml, README and tests. Well under the 70 files / 2 MB limit. - It follows the recipe checklist:
pyproject.tomlanduv.lock,load_dotenv()in the package__init__.py, model name from an env var,tests/test_runnability.py, anduv run validatepassing before I open the PR. - The code is adapted from an agent I already run against a real billing export, so the prompt and the failure handling come from actual use and not from a demo.
- Happy to adjust scope. For example, I can add Cloud Logging as a second MCP server if you would like the recipe to show more than one server, or keep it to BigQuery only to stay minimal.
Source: google/adk-samples