Google Gen AI
BLOCKgrade D · trust 63/100Google Gen AI Python SDK provides an interface for developers to integrate Google's generative models into their Python applications.
Overview
From the repository's own README, as read at the audited commit.
# Google Gen AI SDK[](https://pypi.org/project/google-genai/)[](https://pypistats.org/packages/google-genai)--------**Documentation:** https://googleapis.github.io/python-genai/-----Google Gen AI Python SDK provides an interface for developers to integrateGoogle's generative models into their Python applications. It supportsthe [Gemini Developer API](https://ai.google.dev/gemini-api/docs) and[Gemini Enterprise Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform)APIs.> [!WARNING]> **Updates to Automatic Function Calling (AFC) in upcoming SDK version:**> We are changing AFC behavior in the next major version.> Specifically, users will not be able to> invoke AFC from direct calls to `Models.generate_content` or its stream and> async variants. Instead, users should invoke AFC from `Chats` modules.>> | Methods/fields to be removed | migration guide |> | --- | --- |> | `Live.send` | Use `send_client_content`, `send_realtime_input`, or `send_tool_response` instead |> | `Live.start_stream` | Use `receive` and `send_realtime_input` instead |> | `LiveConnectConfig.generation_config` | Set fields on `LiveConnectConfig` directly |> | `prompt`/`text`/`image` arguments in `Models.generate_videos` (and async variants) | Use `source` argument instead |> | `GenerationConfigThinkingConfig` | Use `ThinkingConfig` instead |>> To avoid unexpected updates, pin the SDK version to `< 3.0.0`.## Agent SkillsLarge Language Models (LLMs) and generative AI coding assistants are often trained on static datasets. As a result, they may be unaware of recent updates and suggest outdated or legacy libraries.To ensure your AI coding helper (such as Antigravity, Claude Code, Cursor, or other IDE extensions) generates up-to-date code using the correct SDK syntax and best practices, w
Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add google-genai --env GEMINI_API_KEY=${GEMINI_API_KEY} --env GOOGLE_API_KEY=${GOOGLE_API_KEY} --env GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS} --env GOOGLE_GENAI_ACCESS_TOKEN=${GOOGLE_GENAI_ACCESS_TOKEN} -- uvx google-genai{
"mcpServers": {
"google-genai": {
"command": "uvx",
"args": [
"google-genai"
],
"env": {
"GEMINI_API_KEY": "${GEMINI_API_KEY}",
"GOOGLE_API_KEY": "${GOOGLE_API_KEY}",
"GOOGLE_APPLICATION_CREDENTIALS": "${GOOGLE_APPLICATION_CREDENTIALS}",
"GOOGLE_GENAI_ACCESS_TOKEN": "${GOOGLE_GENAI_ACCESS_TOKEN}"
}
}
}
}Exposed tools (9) 6 read · 3 write · 0 destructive
| Tool | Risk | Description |
|---|---|---|
add_numbers | write | Add two numbers together. |
create_endpoint | write | Creates an endpoint |
get_weather | read | Get the weather in a city. |
get_weather_2 | read | Different tool to get the weather. |
list_endpoints | read | Lists endpoints |
tool | read | tool-description |
tool1 | read | tool1-description |
tool2 | read | tool2-description |
update_endpoint | write | Updates a Vertex AI Endpoint resource. |
Details
- Source
- googleapis/python-genai
- PyPI
google-genai- Transports
- streamable-http
- Credentials it reads
GEMINI_API_KEYGOOGLE_API_KEYGOOGLE_APPLICATION_CREDENTIALSGOOGLE_GENAI_ACCESS_TOKENGOOGLE_GENAI_API_KEY- License
- Apache-2.0
- Stars
- 3,981 · pushed 0d ago
Trust audit
Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | FAIL |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- declared (9 observation(s))
- Shell
- declared (3 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (25)
* Support jailbreak in HarmCategory and BlockedReason ([011e218](https://github.com/googleapis/python-genai/commit/011e218b8d06444c848fbc8ba11c01608ff2d613))
module = importlib.import_module(f'.{name}', __name__)return importlib.import_module(modname, package=__package__)
return importlib.import_module(modname, package=__package__)
token="updated-bearer-token",
api_client_mock.api_key = 'auth_tokens/TEST_AUTH_TOKEN'
objects.inv
pixel.m4a
voice_sample.wav
.nojekyll
pickled_error = pickle.loads(pickle.dumps(errors.APIError(1, {})))Documentation.PLURAL_EXPR = new Function(
filename = hashlib.sha1(file_url.encode()).hexdigest()
'../../../../../google/cloud/aiplatform/sdk/genai/replays',
model='gemini-2.5-flash/../../upload/v1beta/files',
os.path.join(os.path.dirname(__file__), '../../data/google.png')
os.path.join(os.path.dirname(__file__), '../../data/checkerboard.png')
os.path.join(os.path.dirname(__file__), '../../data/google.png')
"base_url": f"http://127.0.0.1:{server.server_port}","base_url": f"http://127.0.0.1:{server.server_port}","base_url": f"http://127.0.0.1:{server.server_port}","base_url": f"http://127.0.0.1:{server.server_port}","base_url": f"http://127.0.0.1:{server.server_port}",data=base64.b64decode(blob_input.data),
assert base64.b64decode(_BASE64_NOT_URL_SAFE) == _RAW_BYTES
Gates applied: instruction_override, no_behavioural_pass.
Audited 2026-09-18 · audit v0.4.0 · source sha c9d168fc9f45 · full audit: observations/trust-audit/mcp-server/googleapis__google-gen-ai.json · Report an issue or request a re-scan
Audit history
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-09-18 | c9d168fc9f45 | BLOCK | D | 63 | first audit |
Also audited
Servers with a similar trust profile.
More from googleapis
Questions
What is the Google Gen AI MCP server?
Google Gen AI Python SDK provides an interface for developers to integrate Google's generative models into their Python applications.
What tools does Google Gen AI expose?
9 in total: 6 read-only, 3 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Google Gen AI safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (63/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on.
What credentials does Google Gen AI need?
It reads GEMINI_API_KEY, GOOGLE_API_KEY, GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_GENAI_ACCESS_TOKEN and GOOGLE_GENAI_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Google Gen AI run?
It speaks streamable-http, so it runs as a service you connect to over the network. It is published on PyPI as google-genai.
How current is this page?
The grade is for one exact copy of the source (c9d168fc9f45), read on 2026-09-18. The repository is watched and re-audited when it changes.
Provenance: OBSERVED · read 2026-09-18 · job trust-audit-2026-09-18