Skip to content
nofeb

nofeb with Vercel AI SDK

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

Create an MCP client with createMCPClient from @ai-sdk/mcp, using transport type "http" with the nofeb URL and an Authorization header, then pass await mcpClient.tools() to generateText or streamText. Close the client when the call finishes.

Checked against the engine on .

Where does the configuration go?

createMCPClient from @ai-sdk/mcp.

Install
npm install ai @ai-sdk/mcp

How do I connect Vercel AI SDK?

  1. npm install ai @ai-sdk/mcp.
  2. Create the client as below; the function moved from experimental_createMCPClient in ai to createMCPClient in @ai-sdk/mcp.
  3. Pass the tools to generateText or streamText, and close the client in finally (or in onFinish when streaming).
Vercel AI SDK: TypeScript
import { createMCPClient } from '@ai-sdk/mcp';

const mcpClient = await createMCPClient({
  transport: {
    type: 'http',
    url: 'https://api.nofeb.com/mcp',
    headers: { Authorization: `Bearer ${process.env.NOFEB_API_KEY}` },
  },
});

try {
  const tools = await mcpClient.tools();
  // pass `tools` to generateText / streamText
} finally {
  await mcpClient.close();
}

Checked against Vercel AI SDK's documentation on . source: ai-sdk.dev

What should I know about Vercel AI SDK's setup?

  • createMCPClient now lives in @ai-sdk/mcp; experimental_createMCPClient from ai is the older name.
  • Close the client when the request ends, or in onFinish when streaming.

What can I ask it to do?

A route handler where the model reads the latest support email with get_thread_context and writes a reply with reply_to_message on a send_with_approval inbox, so a person approves it.

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 Vercel AI SDK.

Frequently asked questions

Can I call nofeb without MCP in an AI SDK app?

Yes. @nofeb/sdk works in Node, edge runtimes, Deno and Bun; wrap a call such as nf.inboxes.waitForEmail in your own tool when you want a narrower surface than the full tool list.

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