Gemini supports MCP servers natively through the
google-genai Python SDK — no FastMCP wrapper required. Google currently labels their MCP integration as experimental, so the exact API surface may evolve over time.mcp Python package’s streamable HTTP transport, then pass the resulting MCP session directly to Gemini as a tool.
Install dependencies
Connect via the google-genai SDK
Pass your Statista API key as the The
x-api-key header, then hand the MCP session directly to Gemini.ClientSession object is passed directly into the tools list — Gemini introspects the MCP session’s available tools and invokes them automatically as needed.Alternative: using FastMCP
If you’re already usingfastmcp elsewhere in your stack, you can pass its session to Gemini the same way. This is functionally equivalent to the native pattern above, just with FastMCP’s higher-level wrapper.