> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-docs-scavio-google-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Oxylabs

> Connect a Gemini agent to the Oxylabs MCP server to scrape a careers page for job titles.

```python oxylabs.py theme={null}
"""
Oxylabs
=============================

Demonstrates oxylabs.
"""

import asyncio
import os

from agno.agent import Agent
from agno.models.google import Gemini
from agno.tools.mcp import MCPTools

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------


async def run_agent_prompt():
    async with MCPTools(
        command="uvx oxylabs-mcp",
        env={
            "OXYLABS_USERNAME": os.getenv("OXYLABS_USERNAME"),
            "OXYLABS_PASSWORD": os.getenv("OXYLABS_PASSWORD"),
        },
    ) as server:
        agent = Agent(
            model=Gemini(api_key=os.getenv("GEMINI_API_KEY")),
            tools=[server],
            instructions=["Use MCP tools to fulfill the requests"],
            markdown=True,
        )
        await agent.aprint_response(
            "Go to oxylabs.io, look for career page, "
            "go to it and return all job titles in markdown format. "
            "Don't invent URLs, start from one provided."
        )


# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    asyncio.run(run_agent_prompt())
```

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U "agno[mcp]" google-genai
    ```
  </Step>

  <Step title="Prepare uvx">
    Install uv, then verify `uvx` is available:

    ```bash theme={null}
    uvx --version
    ```
  </Step>

  <Step title="Export environment variables">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export GEMINI_API_KEY="your_gemini_api_key_here"
      export OXYLABS_PASSWORD="your_oxylabs_password_here"
      export OXYLABS_USERNAME="your_oxylabs_username_here"
      ```

      ```bash Windows theme={null}
      $Env:GEMINI_API_KEY="your_gemini_api_key_here"
      $Env:OXYLABS_PASSWORD="your_oxylabs_password_here"
      $Env:OXYLABS_USERNAME="your_oxylabs_username_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Run the example">
    Save the code above as `oxylabs.py`, then run:

    ```bash theme={null}
    python oxylabs.py
    ```
  </Step>
</Steps>

Full source: [cookbook/91\_tools/mcp/oxylabs.py](https://github.com/agno-agi/agno/blob/main/cookbook/91_tools/mcp/oxylabs.py)
