[RECIPE PROPOSAL] Auditable evidence rows from remote MCP research tools

Author: ct-jarynCreated Sep 21, 2026Updated Sep 21, 2026

1- What is the intent/purpose of your new recipe? In what way will it help the ADK community?

Propose a small Python recipe at contrib/python/mcp-evidence-ledger that teaches how to turn third-party MCP research results into an inspectable evidence table, with deterministic checks on source references before composing an answer.

For example, a user asks: “Compare the documented support for a feature across these three public product pages.” The recipe would produce rows containing the requested field, extracted value, source URL, a short supporting excerpt, and a status such as source-matched, conflicting, or unresolved. An unavailable page or an unsupported value stays unresolved instead of acquiring an invented citation. The same exercise can use English or Chinese source pages; language support alone is not the proposed contribution.

The intended lessons are:

  • Expose only websearch_search, web_scrape, and web_extract from a remote MCP toolset, with a fixed service endpoint and a user-provided Bearer key. Explain that a client tool allowlist does not change the service account's permissions or billing.
  • Store tool observations separately from model-generated claims in ADK session state. Preserve the actual returned URL and retrieved text, and associate each observation with a stable source ID.
  • Validate proposed evidence rows against those observations: reject unknown source IDs, substituted URLs, and excerpts absent from the captured text. A valid reference proves that the cited excerpt was observed, not that the source is true or that the claim is logically entailed. Conflicts and semantic uncertainty remain visible for review.
  • Limit the number of tool calls and pages at the application boundary, propagate errors without treating them as evidence, and close the MCP connection. Retrieved page content remains untrusted input rather than authority to change tool policy.

I reviewed deep-search, including its grounding-source collection and citation replacement callbacks. It already teaches iterative research and cited report generation. This proposal focuses on a different boundary: remote MCP outputs that do not carry Gemini grounding metadata, an explicit observation-to-evidence contract, and reproducible negative cases for invalid references. It would not add another full research UI or replace deep-search. If maintainers prefer an extension to an existing recipe, I can adjust the scope before implementation.

2- What language is your recipe implemented in?

Python 3.11+, using ADK's MCP integration, uv, and the repository's Ruff/pytest conventions. This is a proposal; the recipe has not been implemented or validated yet.

3- Will this be a deployable recipe, either by having a Dockerfile, or by utilizing Vertex AI?

Initially, no. The proposed scope is a locally runnable recipe with ADK's standard runner. It would have no custom frontend, Docker deployment, or required cloud infrastructure. Deployment could be a separate follow-up if requested.

4- What GCP services or third-party APIs are required?

  • Gemini via the Google AI Studio API, with the model selected through an environment variable and documented using the currently supported model required by this repository. Model usage may be billed separately.
  • Baizhi Agent Toolkit, a commercial hosted MCP service at https://agent-toolkit.app.baizhi.cloud/mcp, using Streamable HTTP and a user-supplied API key. Tool calls can consume paid credits. Queries, requested URLs, and extraction instructions are sent to Baizhi.

The public integration repository contains client configuration and documentation; the hosted backend is not open source. No service key would be bundled, printed, or sent as part of this proposal. Automated tests would use local synthetic MCP responses and would require neither a Baizhi key nor a paid model call. Live validation, if performed later, would be separately identified.

5- Who (individual/team) will own and maintain this?

Proposed point of contact: @ct-jaryn, maintaining the Baizhi Agent Toolkit integrations. I would own the recipe, setup documentation, dependency updates, and responses to issues concerning this integration. This is a community contribution and does not imply Google endorsement.

6- Please include any additional information you'd like to share.

If the scope is accepted, I would submit the required manifest, README, .env.example, pyproject.toml, uv.lock, and runnability test, plus focused tests that exercise the real ADK runner/tool dispatch with a synthetic MCP transport and simulated model output. The cases would include a valid evidence row, missing content, an unknown source ID, a mismatched excerpt, conflicting observations, a non-allowlisted tool request, an exhausted call budget, and an MCP failure. The tests and documentation would distinguish these checks from live service/model validation.

Affiliation: I am submitting this as part of the Baizhi Agent Toolkit integration effort. AI assistance was used for research and drafting. I have not claimed that Google CLA checks or human testing have been completed; applicable contribution requirements would be completed before a code contribution is accepted.

Following the recipe checklist, I will wait for maintainer approval before adding the recipe or opening a code PR. Is this focused teaching scope appropriate for contrib/?