Envloped CLI & MCP Server

Email from your terminal — and from your agents

One binary, two interfaces. Send emails, manage domains, and draft campaigns from the command line — then run envloped mcp and hand the same capabilities to Claude, Cursor, or any MCP client.

terminal
$ curl -fsSL https://envloped.com/install.sh | bash
$ envloped login
$ envloped send --from gleb@envloped.com \
--to gleb@envloped.com \
--subject "Hello!" --text "Sent from the CLI"
Email sent successfully
Model Context Protocol

A native MCP server, already installed

There is no separate package to download. If you have the CLI, you have the MCP server — twenty tools for sending email, debugging domain verification, building segments, and drafting campaigns.

1

Install and authenticate

$ curl -fsSL https://envloped.com/install.sh | bash
$ envloped login

Your key is stored in ~/.config/envloped/credentials.toml and read automatically. You never put an API key in an MCP config file.

2

Add it to your client

Claude Code

$ claude mcp add envloped -- envloped mcp

Hosted, no install (OAuth 2.1)

$ claude mcp add --transport http envloped \
https://mcp.envloped.com/mcp

Claude Desktop & claude.ai (no install)

  1. Open Settings → Connectors
  2. Click Add custom connector
  3. Paste https://mcp.envloped.com/mcp
  4. Click Add, then Connect and approve

Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "envloped": {
      "command": "envloped",
      "args": ["mcp"]
    }
  }
}
3

Ask for something

“Draft a campaign to everyone in Jakarta who opened something in the last 30 days, show me the audience size, and send me a test.”

The agent previews the segment before saving it, drafts the campaign, and delivers a test to you. The Launch button stays yours.

Transactional — 6 tools

send_email · email_list · email_get · domain_list · domain_add · domain_records

Marketing — 13 tools

contact_create · contact_list · contact_update · list_list · list_create · segment_create · segment_list · segment_preview · campaign_create · campaign_list · campaign_get · campaign_test · campaign_report

Plus your contact-field registry as an MCP resource at envloped://contact-fields, so the model reads your real schema instead of guessing at it.

What the agent deliberately cannot do

  • Send a bulk campaign. An agent drafts, targets, previews the audience and sends itself a test. One confidently wrong tool call reaches thousands of real inboxes, cannot be recalled, and damages sending reputation that takes months to rebuild.
  • Create API keys. A tool that mints credentials turns any prompt injection into persistent, full-access account access that outlives the session that created it.
  • Delete contacts, lists, or campaigns. A partially hallucinated id is a bad thing to hand a DELETE.
  • Double-send on a retry. Every send carries a derived idempotency key, so an agent retrying a timed-out call collapses to a single email.

Use Cases

From CI/CD pipelines to AI agents — the CLI fits every workflow.

CI/CD Pipelines

Send deployment notifications, build reports, and alerts from GitHub Actions, GitLab CI, or any pipeline without SDK integration.

Local Development

Test email sending directly from your terminal during development. Dry-run mode validates without sending.

Infrastructure Automation

Manage domains and API keys programmatically via shell scripts. JSON output pipes directly into jq and other tools.

AI Agents

AI coding assistants like Claude Code, Cursor, and Codex can install and use the CLI autonomously. JSON output, stdin piping, and non-interactive flags make it fully agent-compatible.

Why Envloped CLI

Designed for the agent economy — built to be automated.

Developer-first

Follows patterns from Stripe, Vercel, and Resend CLIs. If you know one, you know Envloped.

AI-native

--json output, --stdin input, --force flags, and structured errors make it fully automatable by AI agents.

Multi-platform

Single binary for Linux, macOS, and Windows. Supports amd64 and arm64 architectures.

Zero dependencies

Install with one curl command. No runtime, no package manager, no Docker required.

Shell completions

Tab completions for bash, zsh, fish, and PowerShell. Autocomplete commands, flags, and values.

Multiple profiles

Switch between staging and production with --profile. Each profile has its own API key and config.

MCP questions, answered

Setup, tools, and where the boundaries are.

How do I connect Envloped to Claude as an MCP server?

In Claude Desktop or on claude.ai, open Settings → Connectors, click "Add custom connector", paste https://mcp.envloped.com/mcp as the URL, then click Add and Connect — Envloped's consent screen opens in your browser and you pick the workspace to connect. Nothing to install. To run it locally instead, install the CLI with `curl -fsSL https://envloped.com/install.sh | bash`, authenticate with `envloped login`, then register it: `claude mcp add envloped -- envloped mcp` in Claude Code, or {"mcpServers": {"envloped": {"command": "envloped", "args": ["mcp"]}}} in .cursor/mcp.json for Cursor. There is no separate MCP package — the server is built into the CLI binary.

What tools does the Envloped MCP server expose?

Twenty. One diagnostic: whoami. Six transactional: send_email, email_list, email_get, domain_list, domain_add, domain_records. Thirteen marketing: contact_create, contact_list, contact_update, list_list, list_create, segment_create, segment_list, segment_preview, campaign_create, campaign_list, campaign_get, campaign_test, campaign_report. Call whoami first on a new connection — it reports which account and workspace the credential actually resolved to. It also exposes the tenant contact-field registry as an MCP resource at envloped://contact-fields.

Can an AI agent send a bulk marketing campaign through Envloped MCP?

No, and that is deliberate. An agent can draft a campaign, target it with a segment, preview the resolved audience, and send itself a test — but there is no bulk-send tool. One confidently wrong tool call reaches thousands of real inboxes, cannot be recalled, and damages sending reputation that takes months to rebuild. A human presses Launch, in the dashboard or with `envloped campaigns send`.

Does the Envloped MCP server work remotely, or only on my machine?

Both. Locally it speaks stdio and authenticates with the API key `envloped login` already stored. Remotely it runs at https://mcp.envloped.com/mcp over Streamable HTTP and authenticates with OAuth 2.1 through a browser consent screen, so no credential is pasted into a third-party client. The hosted server holds no credential of its own — every request executes with your own token.

How do I authenticate the Envloped MCP server?

Locally, run `envloped login` once; the MCP server reads the stored key from ~/.config/envloped/credentials.toml, so no key goes in the MCP config file. If your client cannot inherit your shell environment, set ENVLOPED_API_KEY in the server env block instead. Remotely, authentication is OAuth 2.1 — approve the consent screen once and revoke it any time from account settings.

Does the Envloped MCP server cost extra?

No. MCP is included with both products at no additional charge — tool calls draw on the same balance as any other send, and there is no separate MCP fee. A payment method is required to create an account. There is no card-free plan. Transactional starts at $10/month.

Built for the Agent Economy

AI coding assistants are becoming the primary way developers interact with tools. Envloped CLI is designed to be used by both humans and agents — every command supports --json output,--stdin input, and non-interactive flags like --force.

With the Envloped agent skills file, AI assistants like Claude Code, Cursor, and Codex can autonomously install the CLI, authenticate, and start sending emails — no human intervention required.