# Anjal > Email infrastructure for AI agents and teams. Real two-way email > inboxes (REST API, MCP server, SMTP/IMAP, custom domains, WebSocket > events, webhooks, workspaces, a calendar per inbox), with inbound mail > screened for prompt injection before an agent reads it. Apps for Mac, > Windows and iPhone. This file is the canonical entry point for AI agents integrating with Anjal. Read [SKILL.md](https://anjal.app/skills/anjal/SKILL.md) first; it's the single source of truth for capabilities, auth, and recipes. The OpenAPI spec is the authoritative endpoint reference. For one-fetch full context, use [/llms-full.txt](https://anjal.app/llms-full.txt) — it inlines SKILL.md plus every reference doc into a single file. Base URL: `https://anjal.app/v1`. Auth: `Authorization: Bearer tk_...` (get yours at https://anjal.app/dashboard/api-keys). ## Quick start - [CLI install](https://www.npmjs.com/package/anjal-cli): `npm install -g anjal-cli && anjal login && anjal mcp install` — three commands, auto-detects every MCP host on the machine and wires it up. Token-economical for long agent sessions (Claude Code, CI, terminal-based agents). - [SDK install](https://www.npmjs.com/package/anjal): `npm install anjal` - [Remote MCP connector](https://anjal.app/kb/connect-claude-chatgpt): `https://mcp.anjal.app/mcp` (Claude, ChatGPT, Codex and any remote-MCP client; sign in to Anjal and click Allow, no key to copy) - [MCP server install](https://anjal.app/kb/integration-mcp): `npx -y anjal-mcp@latest` (local server with an API key for Cursor, Windsurf, Cline, any stdio MCP client) - [Hello world (curl)](https://anjal.app/skills/anjal/SKILL.md#quick-start-for-agents): provision an inbox, send mail, listen for replies in 6 lines. ## Authoritative specs - [SKILL.md](https://anjal.app/skills/anjal/SKILL.md): primary skill manifest. Auth, key types, capabilities, recipes. Read this first. - [OpenAPI](https://anjal.app/openapi.yaml): every endpoint, every request/response shape. Authoritative. - [LinkedIn skill reference](https://anjal.app/skills/anjal/references/linkedin.md): sessions, intent signals (keyword + engagement + watchlist), historical search, multi-session routing, end-to-end recipe. - [Webhooks reference](https://anjal.app/skills/anjal/references/webhooks.md): event types, HMAC-SHA256 verification, retry schedule, payload schemas for every event. - [WebSockets reference](https://anjal.app/skills/anjal/references/websockets.md): real-time inbox events, subscription model, reconnect semantics. ## Mail features agents rely on - Safe retries: send an `Idempotency-Key` header on any send (send, reply, reply-all, forward, draft send). A retry with the same key returns the original result (`Idempotent-Replayed: true`) and sends nothing. Keys last 24 hours. - Labels: `labels` on sends and drafts; `PATCH` a message or a whole thread with `labels` / `addLabels` / `removeLabels`; filter with `?labels=a,b`; `GET /v1/messages/labels` lists labels in use. - Scheduled send: `sendAt` (ISO 8601 with offset, up to 90 days ahead) on a draft. Anjal sends it then; `draft.send_failed` fires if it can't. - Open tracking: `trackOpens: true` on an HTML send fires `message.opened` on the first open (a hint, not proof). - Delivery: sent messages carry `deliveryStatus` and `deliveredAt`; webhooks `message.delivered`, `message.bounced`, `message.complained`, `message.rejected`. - Spam is stored but left out of lists unless `includeSpam=true`; it fires `message.received.spam`, not `message.received`. - Custom domain already on Google Workspace or Microsoft 365: register it with `sharedWith` to keep that provider and add Anjal mailboxes alongside (no MX change), or use a subdomain such as `agents.example.com`. ## Code packages - [anjal](https://www.npmjs.com/package/anjal) (npm): typed TypeScript SDK with full coverage of inboxes, messages, drafts, LinkedIn signals, sessions, searches. - [anjal-mcp](https://www.npmjs.com/package/anjal-mcp) (npm): Model Context Protocol server, also hosted as the remote connector `https://mcp.anjal.app/mcp` (MCP Registry: `com.myagentmail/myagentmail`). 47 tools for inboxes, mail, labels, drafts (including scheduled send), attachments and calendars. - [anjal-cli](https://www.npmjs.com/package/anjal-cli) (npm): command-line interface. `anjal login`, `anjal mcp install` (auto-wires Claude Desktop / Cursor / Windsurf / Claude Code), `anjal listen --inbox --forward ` for webhook tunneling, `anjal doctor` for a health-check matrix. Cheaper in agent-token cost than MCP for long sessions because the surface is discovered lazily through `--help`. ## Reference apps - [myagentmail-outreach-starter](https://github.com/kamskans/myagentmail-outreach-starter): open-source ~3,500 line Next.js app. AI-inferred ICP from a website URL → intent signals → unified leads queue → AI-drafted LinkedIn note + cold email → one-click send. Best example of an end-to-end agent built on Anjal. ## Tutorials - [Build an Intent-Based LinkedIn Outreach System in an Afternoon](https://anjal.app/blog/intent-based-outreach-tutorial): walks through the starter, end-to-end. Discovery → setup → leads → outreach. Covers all three signal kinds. - [Building a Cold Outreach Agent](https://anjal.app/blog/building-cold-outreach-agent): focused tutorial on the email + agent loop without LinkedIn signals. ## Optional These are useful background but skippable when context-budget-constrained. - [Why AI agents need email](https://anjal.app/blog/why-ai-agents-need-email): conceptual framing of why agents need a real email identity. - [Anjal vs Cloudflare Email for Agents](https://anjal.app/blog/anjal-vs-cloudflare-email-for-agents): comparison. - [Connect Anjal to Claude Code](https://anjal.app/integrations/claude-code): one command, `claude mcp add --transport http`. - [Connect Anjal to Devin](https://anjal.app/integrations/devin): org admin adds it, or `devin mcp add`. - [Connect Anjal to Lovable](https://anjal.app/integrations/lovable): a chat connector, OAuth by default. - [Connect Anjal to OpenClaw](https://anjal.app/integrations/openclaw): a TypeScript extension, not MCP. - [Connect Anjal to Replit](https://anjal.app/integrations/replit): two clicks on the Integrations page. - [Connect Anjal to Cursor](https://anjal.app/integrations/cursor): one entry in `.cursor/mcp.json`. - [Connect Anjal to Codex](https://anjal.app/integrations/codex): `codex mcp add` then `codex mcp login`. - [Anjal alternatives](https://anjal.app/blog/anjal-alternatives): honest list of what to use instead of us, and when. - [Anjal vs the Gmail API](https://anjal.app/blog/anjal-vs-gmail-api): a client onto a person's mailbox vs an inbox the agent owns. - [Anjal vs Amazon SES](https://anjal.app/blog/anjal-vs-amazon-ses): SES is the relay under Anjal; what you build yourself if you use it directly. - [Anjal vs Mailgun](https://anjal.app/blog/anjal-vs-mailgun): inbound routing vs a real mailbox. - [Anjal vs Nylas](https://anjal.app/blog/anjal-vs-nylas): borrowing a person's mailbox vs the agent owning one. - [WebSocket vs Webhooks for agent email](https://anjal.app/blog/websocket-vs-webhooks-agent-email): when to use which. - [Email deliverability for agents](https://anjal.app/blog/email-deliverability-for-agents): SPF/DKIM/DMARC and warmup. ## Conventions this site follows - Every documentation page is available as markdown (`.md`) at the same URL — append `.md` to any blog or skill URL to get the markdown. - The OpenAPI spec at `/openapi.yaml` is regenerated on every API release; pin to a tag if you need stability. - Webhook payloads are HMAC-SHA256 signed using the per-signal `whsec_...` secret returned at signal creation. Verify with `crypto.createHmac("sha256", secret).update(rawBody).digest("hex")` and compare to the `X-MyAgentMail-Signature: v1=` header. - All endpoints are versioned at `/v1/...`. Breaking changes ship as `/v2/...` — no silent breakage on `/v1`. ## Comparisons Prices and features read from each vendor's own site on 2026-10-17. Where a vendor does not list a feature the page says "Not listed", and each page says where the other product is the better choice. - [All comparisons](https://anjal.app/compare) - [Anjal vs AgentMail](https://anjal.app/compare/agentmail) - [Anjal vs Nylas](https://anjal.app/compare/nylas) - [Anjal vs Resend](https://anjal.app/compare/resend) - [Anjal vs SendGrid](https://anjal.app/compare/sendgrid) - [Anjal vs Mailgun](https://anjal.app/compare/mailgun) - [Anjal vs Postmark](https://anjal.app/compare/postmark) - [Anjal vs Instantly](https://anjal.app/compare/instantly) - [Anjal vs the Gmail API](https://anjal.app/blog/anjal-vs-gmail-api)