Skip to main content

MCP Server

The Temp Mail Model Context Protocol (MCP) server connects the Temp Mail API directly to your AI assistant. Ask it in plain language to create temporary email addresses and read incoming messages — right inside coding agents like Claude Code, Cursor, or VS Code Copilot.

Endpoint

This is a remote streamable HTTP server. Point your client at:

https://api.temp-mail.io/v1/mcp

Authentication

The server uses OAuth 2.0 — there's no API key to copy or paste. The first time a client connects, it registers itself and opens your browser to sign in to Temp Mail and approve access. The client stores the token and refreshes it automatically from then on.

You need an active premium account to authorize the server. If you don't have one yet, get it on the subscription page.

Setup

Claude Code

  1. Add the server:

    claude mcp add --transport http temp-mail https://api.temp-mail.io/v1/mcp
  2. Run /mcp inside Claude Code, select temp-mail, and choose Authenticate to sign in through your browser.

  3. Confirm it's connected:

    claude mcp list

Cursor

Click Add to Cursor, or add it manually:

  1. Press Cmd/Ctrl + Shift + J to open Cursor Settings.

  2. Go to Tools & Integrations → New MCP Server and paste:

    {
    "mcpServers": {
    "temp-mail": {
    "url": "https://api.temp-mail.io/v1/mcp"
    }
    }
    }
  3. When Cursor prompts you, sign in through your browser to authorize the server.

To use it from the cursor-agent CLI instead, run cursor-agent mcp login temp-mail.

VS Code

Click Install in VS Code or VS Code Insiders (requires GitHub Copilot), or add it manually:

  1. Press Cmd/Ctrl + Shift + P and run MCP: Add Server.

  2. Choose HTTP (HTTP or Server-Sent Events).

  3. Enter the server URL and press Enter:

    https://api.temp-mail.io/v1/mcp
  4. Name it temp-mail, press Enter, and complete the browser sign-in.

This adds the server to your mcp.json:

{
"servers": {
"temp-mail": {
"type": "http",
"url": "https://api.temp-mail.io/v1/mcp"
}
}
}

Codex

  1. Add the server from your terminal:

    codex mcp add temp-mail --url https://api.temp-mail.io/v1/mcp

    Or add it to ~/.codex/config.toml by hand:

    [mcp_servers.temp-mail]
    url = "https://api.temp-mail.io/v1/mcp"
  2. Start codex — it opens your browser to authorize the connection automatically.

Amp

  1. Open your Amp settings (amp.mcpServers in VS Code settings.json, or ~/.config/amp/settings.json for the CLI) and add:

    {
    "amp.mcpServers": {
    "temp-mail": {
    "url": "https://api.temp-mail.io/v1/mcp"
    }
    }
    }
  2. Reload Amp and sign in through your browser when prompted.

Gemini CLI

  1. Add the server to ~/.gemini/settings.json (global) or .gemini/settings.json (per-project), using the httpUrl field for streamable HTTP:

    {
    "mcpServers": {
    "temp-mail": {
    "httpUrl": "https://api.temp-mail.io/v1/mcp"
    }
    }
    }
  2. Run /mcp auth temp-mail inside Gemini CLI to complete the browser sign-in.

OpenCode

  1. Add the server to your opencode.json:

    {
    "$schema": "https://opencode.ai/config.json",
    "mcp": {
    "temp-mail": {
    "type": "remote",
    "url": "https://api.temp-mail.io/v1/mcp",
    "enabled": true
    }
    }
    }
  2. Restart OpenCode and authorize the server in your browser when prompted.

Warp

  1. Open Settings → AI → Manage MCP servers → + Add and choose JSON.

  2. Paste the configuration:

    {
    "temp-mail": {
    "url": "https://api.temp-mail.io/v1/mcp"
    }
    }
  3. Start the server — Warp opens your browser to authorize it on first use.

Windsurf

  1. Open ~/.codeium/windsurf/mcp_config.json and add the server, using the serverUrl field for remote servers:

    {
    "mcpServers": {
    "temp-mail": {
    "serverUrl": "https://api.temp-mail.io/v1/mcp"
    }
    }
    }
  2. Open Windsurf → Settings → Cascade → MCP servers, click Refresh, then Login to authorize.

Zed

  1. Press Cmd/Ctrl + , to open Zed settings and add the server under context_servers:

    {
    "context_servers": {
    "temp-mail": {
    "url": "https://api.temp-mail.io/v1/mcp",
    "settings": {}
    }
    }
    }
  2. Save the file — Zed opens your browser to authorize the connection.

Verifying the connection

Once the server is authorized, ask your assistant:

Create a temporary email address and tell me when a message arrives.

If everything is wired up, it will use the Temp Mail tools to create an address and check for incoming messages.