Skip to content
nofeb

nofeb with OpenAI Agents SDK

Agent framework · configuration checked against the vendor's documentation on 2026-10-01

Wrap nofeb in MCPServerStreamableHttp with params url and headers, open it with async with, and pass it to an Agent in mcp_servers. The agent lists nofeb's tools and calls them; nofeb enforces the inbox's sending policy on every call.

Checked against the engine on .

Where does the configuration go?

agents.mcp.MCPServerStreamableHttp, or a hosted MCP tool.

Install
pip install openai-agents

How do I connect OpenAI Agents SDK?

  1. pip install openai-agents.
  2. Open MCPServerStreamableHttp with the nofeb URL and Authorization header as below.
  3. Pass the server to Agent(mcp_servers=[…]) and run it with Runner.run.
OpenAI Agents SDK: Python
import os
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async with MCPServerStreamableHttp(
    name="nofeb",
    params={
        "url": "https://api.nofeb.com/mcp",
        "headers": {"Authorization": f"Bearer {os.environ['NOFEB_API_KEY']}"},
        "timeout": 10,
    },
    cache_tools_list=True,
    max_retry_attempts=3,
) as server:
    agent = Agent(
        name="Assistant",
        instructions="Use the nofeb tools to manage email.",
        mcp_servers=[server],
    )
    result = await Runner.run(agent, "Create an inbox called signup-bot")

# Hosted alternative (runs on OpenAI's side via the Responses API):
# from agents import HostedMCPTool
# HostedMCPTool(tool_config={
#     "type": "mcp",
#     "server_label": "nofeb",
#     "server_url": "https://api.nofeb.com/mcp",
#     "headers": {"Authorization": f"Bearer {os.environ['NOFEB_API_KEY']}"},
#     "require_approval": "never",
# })

Checked against OpenAI Agents SDK's documentation on . source: openai.github.io

What should I know about OpenAI Agents SDK's setup?

  • The class name is MCPServerStreamableHttp, with a lower-case ttp.
  • openai-agents already depends on the MCP client library, so nothing else needs installing.

What can I ask it to do?

"Create an inbox called signup-bot" as in the snippet, then ask the agent to wait for the welcome email and report its subject.

117 tools are available, including create_inbox, wait_for_email, reply_to_message, get_thread_context, set_thread_state and get_dns_setup. Whether a send goes out at once or waits for a person is decided by the inbox's autonomy tier on the server, not by OpenAI Agents SDK.

Frequently asked questions

Should I use the hosted MCP tool instead?

HostedMCPTool runs the calls from OpenAI's side through the Responses API; the headers key comes from that API's mcp tool schema. MCPServerStreamableHttp keeps the calls in your process.

Status of everything on this page

Every capability named above, with its status as reconciled against the engine.

CapabilityWhat it doesStatus
MCP server A remote MCP server over streamable HTTP whose tools are generated from the same operation table as the REST API and dispatched through the same router, so a tool cannot behave differently from its endpoint. Shipped
Scoped API keys Keys bound to the organization, one pod or one inbox, holding only the scopes they are given. A key cannot mint a key wider than itself. Shipped
Autonomy tiers enforced by the server Every inbox carries a sending policy, from read-only to autonomous, enforced on the server for every surface that sends, so switching from the API to MCP cannot bypass it. Shipped
Wait for an email Long-poll an inbox for up to a minute until a message matching sender, subject or has-a-code arrives. Shipped
TypeScript and Python SDKs Official clients generated from the OpenAPI document: @nofeb/sdk for Node, Deno, Bun and edge runtimes, and nofeb for Python with sync and asyncio clients. Both chain long polls for waitForEmail, retry idempotent requests, page through lists and verify webhook signatures. Shipped
MCP sign-in with OAuth MCP clients connect by signing in instead of pasting a key: OAuth 2.1 with discovery, dynamic client registration, client ID metadata documents, PKCE, tokens bound to the MCP server, refresh-token rotation and immediate revocation. A person approves the scopes, and optionally one inbox, in the console, and can disconnect the app at any time. API keys keep working beside it. Shipped