Skip to main content

API Overview

email-connector exposes two types of interfaces: MCP tools (used by Claude) and HTTP endpoints (used during OAuth and monitoring).

Base URL

https://email-connector.fly.dev

MCP Tools

These are the tools Claude uses to interact with your email. You don’t call them directly — Claude invokes them based on your natural language requests.
ToolDescription
get_recent_emailsFetch recent emails from any folder
search_emailsSearch by sender, subject, date, or keyword
get_emailGet full content of a specific email
list_mailboxesList all folders/mailboxes
list_providersList supported email providers
draft_emailCompose a draft without sending
send_emailSend an email via SMTP
mark_as_readMark a message as read
move_emailMove a message to another folder

HTTP Endpoints

EndpointMethodAuthPurpose
/mcpPOSTBearerMCP Streamable HTTP transport
/mcpGETBearerSSE streaming for active sessions
/mcpDELETEBearerClose an MCP session
/oauth/authorizeGETNoneStart OAuth flow
/oauth/connectPOSTNoneSubmit email credentials
/oauth/tokenPOSTClientExchange code for token
/oauth/revokePOSTNoneRevoke an access token
/oauth/metaGETNoneRFC 8414 server metadata
/healthGETNoneHealth check

Authentication

All MCP endpoints require a Bearer token obtained through the OAuth flow:
Authorization: Bearer <access_token>
OAuth endpoints use client_id and client_secret for client authentication during token exchange.

Transport

email-connector uses Streamable HTTP — the current recommended MCP transport. The session lifecycle is:
  1. POST /mcp to initialize (returns Mcp-Session-Id header)
  2. GET /mcp with Mcp-Session-Id for SSE streaming
  3. POST /mcp with Mcp-Session-Id to send subsequent messages
  4. DELETE /mcp with Mcp-Session-Id to close
Sessions auto-expire after 30 minutes of inactivity.