Skip to content

Search

MoMail performs vector semantic search over ingested mail using Workers AI embeddings and Vectorize. Use either:

  • REST: POST /v1/api/search with the same JSON body as the MCP tool input
  • MCP: search_emails on /v1/mcp
POST /v1/api/search
Authorization: Bearer mk_...
Content-Type: application/json
{
"query": "invoice from Acme last week",
"mailbox_id": "optional-uuid",
"limit": 10
}

Response: { "success": true, "results": [...], "total": number }

MCP server URL (StreamableHTTP):

https://momail.io/v1/mcp

Authentication: Authorization: Bearer <api-key> on MCP requests. Setup: Claude Desktop, MCP Overview.

Natural language and structured filters; results ranked by vector similarity.

ParameterTypeRequiredDescription
querystringYesNatural language search query
mailbox_idstringNoLimit to one mailbox
fromstringNoSender filter
tostringNoRecipient filter
subjectstringNoSubject contains
date_fromstringNoISO 8601 lower bound
date_tostringNoISO 8601 upper bound
limitnumberNo1–100 (default 10)
offsetnumberNoPagination offset (default 0)

Full schema and examples: MCP Tools — search_emails.

  1. list_mailboxes — discover mailbox ids
  2. search_emails — find relevant email_id / snippets
  3. get_email or get_email_thread — full content
  4. get_email_raw or GET /v1/api/emails/{messageId}/raw — original MIME if needed
QueryFinds emails about…
invoices from last monthRecent billing messages
meeting notes with the design teamMeeting summaries
urgent issues requiring attentionHigh-priority threads
project delays and timeline updatesSchedule changes

Result objects include a similarity score (higher = better match). Thresholds are approximate:

ScoreRelevance
0.90–1.00Highly relevant
0.70–0.89Very relevant
0.50–0.69Moderately relevant
Below 0.50Weak match

MCP calls share the same per-user rate limits as /v1/api/*. See Rate limits.

Search is MCP-only; downloading raw MIME is available via REST:

GET /v1/api/emails/{messageId}/raw

See Emails (raw MIME).