create_inbox
Create a temporary disposable email inbox and receive an email address. Use it to receive verification emails and extract OTP codes for AI agent sign-ups.
Instructions
Create a new disposable email inbox. Returns the inbox ID and email address.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | Custom address slug (e.g. 'mytest' for mytest@useblip.email) | |
| domain | No | Email domain (defaults to useblip.email) | |
| ttl_minutes | No | How long the inbox should live, in minutes (AGENT tier only, max 90 days). Defaults to 60 minutes if omitted. |
Implementation Reference
- mcp-server/src/index.ts:54-55 (registration)Registration of the 'create_inbox' tool via server.tool() with the tool name 'create_inbox'.
server.tool( "create_inbox", - mcp-server/src/index.ts:57-72 (schema)Input schema for create_inbox: defines optional slug (string), domain (string), and ttl_minutes (number) parameters using Zod validation.
{ slug: z .string() .optional() .describe("Custom address slug (e.g. 'mytest' for mytest@useblip.email)"), domain: z .string() .optional() .describe("Email domain (defaults to useblip.email)"), ttl_minutes: z .number() .optional() .describe( "How long the inbox should live, in minutes (AGENT tier only, max 90 days). Defaults to 60 minutes if omitted." ), }, - mcp-server/src/index.ts:73-86 (handler)Handler function for create_inbox: builds request body from optional params, calls POST /v1/inboxes via blipFetch, and returns the result as JSON text.
async ({ slug, domain, ttl_minutes }) => { const body: Record<string, unknown> = {}; if (slug) body.slug = slug; if (domain) body.domain = domain; if (ttl_minutes !== undefined) body.windowMinutes = ttl_minutes; const result = await blipFetch("/v1/inboxes", { method: "POST", body: JSON.stringify(body), }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } ); - mcp-server/src/index.ts:24-45 (helper)Helper function blipFetch used by the handler to make authenticated HTTP requests to the Blip API.
async function blipFetch( path: string, options: RequestInit = {} ): Promise<unknown> { const url = `${API_URL}${path}`; const res = await fetch(url, { ...options, headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json", ...options.headers, }, }); if (!res.ok) { const body = await res.text(); throw new Error(`Blip API error ${res.status} on ${options.method || "GET"} ${path}: ${body}`); } if (res.status === 204) return null; return res.json(); }