Skip to main content
Give Google ADK agents real-time web data by connecting to the Nimble MCP server — no extra SDK wiring needed. Google ADK (Agent Development Kit) uses the Model Context Protocol to connect agents to external tools. Since Nimble provides a hosted MCP server, ADK agents can discover and use all Nimble tools automatically.

Prerequisites

pip install google-adk
Set environment variables:
export GOOGLE_API_KEY="your-google-api-key"
export NIMBLE_API_KEY="your-nimble-api-key"
Get a Nimble API key from the dashboard (free trial available).

Quick Start

Connect an ADK agent to the Nimble MCP server using McpToolset with StreamableHTTPConnectionParams. ADK auto-discovers all available Nimble tools — search, extract, crawl, map, and agents.
Python
import os
from google.adk.agents import LlmAgent
from google.adk.tools.mcp_tool import McpToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPConnectionParams

NIMBLE_API_KEY = os.environ["NIMBLE_API_KEY"]

root_agent = LlmAgent(
    model="gemini-2.5-flash",
    name="web_research_agent",
    instruction=(
        "You are a research assistant with access to real-time web data. "
        "Use the available tools to search the web, extract content from URLs, "
        "crawl sites, and discover URLs."
    ),
    tools=[
        McpToolset(
            connection_params=StreamableHTTPConnectionParams(
                url="https://mcp.nimbleway.com/mcp",
                headers={"Authorization": f"Bearer {NIMBLE_API_KEY}"}
            )
        )
    ],
)

Run the Agent

Python
import asyncio
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService

async def main():
    session_service = InMemorySessionService()
    session = await session_service.create_session(
        app_name="nimble_app", user_id="user"
    )

    runner = Runner(
        agent=root_agent,
        app_name="nimble_app",
        session_service=session_service,
    )

    from google.genai import types

    response = await runner.run_async(
        user_id="user",
        session_id=session.id,
        new_message=types.Content(
            role="user",
            parts=[types.Part(text="What are the latest trends in AI agents?")]
        ),
    )

    for event in response:
        if event.content and event.content.parts:
            for part in event.content.parts:
                if part.text:
                    print(part.text)

asyncio.run(main())

Filter Tools

By default, ADK discovers all Nimble MCP tools. Use tool_filter to expose only the tools the agent needs:
Python
McpToolset(
    connection_params=StreamableHTTPConnectionParams(
        url="https://mcp.nimbleway.com/mcp",
        headers={"Authorization": f"Bearer {NIMBLE_API_KEY}"}
    ),
    tool_filter=["search", "extract"]
)

Available Tools

ADK auto-discovers these tools from the Nimble MCP server:
ToolDescription
searchWeb search with configurable depth and focus modes
extractExtract content from any URL with rendering support
mapDiscover all URLs on a website via sitemaps and link crawling
crawlCrawl multiple pages with path filtering and progress tracking
agentsRun pre-built extraction agents for structured data
See the Nimble MCP Server docs for setup details and the full list of 18 available tools.

Next Steps

Nimble MCP Server

Full MCP server setup for Cursor, Claude Desktop, and other clients

Search

Web search with depth levels, filtering, and AI answers

OpenAI

Use Nimble with OpenAI function calling and the Agents SDK

Anthropic

Use Nimble with Claude’s tool-use API and Tool Runner