OTPilot

Framework guide

Handle 2FA and OTP codes in OpenAI Agents SDK automatically

Attach OTPilot as a streamable-HTTP MCP server to any agent built with the OpenAI Agents SDK. OTPilot keeps the TOTP seed encrypted on its side; your OpenAI Agents SDK agent only ever receives the current code, its expiry and the next code.

OpenAI Agents SDK · python
# pip install openai-agents
import os
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async with MCPServerStreamableHttp(
    name="otpilot",
    params={
        "url": "https://otpilot.vibiz.app/mcp",
        "headers": {"Authorization": f"Bearer {os.environ['OTPILOT_KEY']}"},
    },
) as otpilot:
    agent = Agent(
        name="Ops agent",
        instructions="When a Shopify login asks for a 2FA code, call get_code(account='shopify').",
        mcp_servers=[otpilot],
    )
    await Runner.run(agent, "Log into Shopify and download last month's invoices")

Why not put the seed in your OpenAI Agents SDK code?

OpenAI Agents SDK 2FA guides by site

All 150 sites →

Try it with your own secret — no signup

Paste a TOTP secret on the home page and get a live code plus a working API call in seconds.