# OpenAI Agents SDK + Dizo

> Give an OpenAI Agents SDK agent the Dizo MCP tools with MCPServerStreamableHttp in a few lines of Python.

Type: MCP client — server URL `https://mcp.dizo.ai/mcp`. No native app needed.

## Steps
1. `pip install openai-agents`
2. Create the MCP server object with your Dizo key.
3. Pass it to `Agent(mcp_servers=[...])` and run.

## agent.py
```
import asyncio, os
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async def main():
    async with MCPServerStreamableHttp(params={
        "url": "https://mcp.dizo.ai/mcp",
        "headers": {"Authorization": f"Bearer {os.environ['DIZO_API_KEY']}"},
    }) as dizo:
        agent = Agent(
            name="prospector",
            instructions="Quote with dizo_quote before any job over 100 credits.",
            mcp_servers=[dizo],
        )
        out = await Runner.run(agent, "Find 10 VPs of Sales at Series B fintechs with emails")
        print(out.final_output)

asyncio.run(main())
```

## Notes
- Put the spend rules in `instructions`: the agent sees tool costs but your rules decide when it asks first.

## Related API docs
- [/docs/search](https://dizo.ai/docs/search.md)
- [/docs/email-find](https://dizo.ai/docs/email-find.md)
- [/docs/billing](https://dizo.ai/docs/billing.md)
