Wraps Logo
DocsHome
MCP Reference

MCP Server

@wraps.dev/mcp gives AI agents access to your AWS SES sending history, delivery events, domain status, and suppression list — and, optionally, the ability to send email. It runs locally over stdio; your AWS credentials never leave your machine.

Prerequisites

Before you begin, make sure you have:

  • A Wraps email stack deployed (wraps email init)
  • AWS credentials configured in your environment — the same profile the Wraps CLI uses

Tools

The server exposes six tools. Only send_email writes anything, and it stays disabled until you opt in.

ToolDescriptionAccess
list_recent_sendsList recent sends from your email historyread
get_email_event_logFull delivery event log for a message (Send, Delivery, Bounce, Complaint, Open, Click)read
verify_domain_statusVerification and DKIM status of a sending domainread
list_suppressionsAddresses on your SES suppression list, filterable by BOUNCE or COMPLAINTread
send_emailSend a transactional email via your SES account (requires WRAPS_WRITE_ENABLED=true)write
check_send_statusPoll the outcome of a pending_approval send by approvalId (enforced mode only)read

Setup

Claude Code

Add to .mcp.json in your project root. Claude Code inherits your shell's AWS environment, so no extra env config is needed if your credentials are already set.

JSON.mcp.json
{  "mcpServers": {    "wraps": {      "command": "npx",      "args": ["-y", "@wraps.dev/mcp"]    }  }}

Claude Desktop, Cursor, Windsurf

GUI clients don't inherit your shell environment, so pass the region and profile explicitly. For Claude Desktop the file is ~/Library/Application Support/Claude/claude_desktop_config.json; for Cursor it's .cursor/mcp.json.

JSONclaude_desktop_config.json
{  "mcpServers": {    "wraps": {      "command": "npx",      "args": ["-y", "@wraps.dev/mcp"],      "env": {        "AWS_REGION": "us-east-1",        "AWS_PROFILE": "your-aws-profile"      }    }  }}

Configuration

All configuration is via environment variables.

VariableRequiredDefaultDescription
AWS_REGIONYesAWS region where your Wraps stack is deployed
WRAPS_HISTORY_TABLE_NAMENowraps-email-historyDynamoDB table name for email history
WRAPS_ACCOUNT_IDNoauto-detected via STSYour AWS account ID (skips the STS call if set)
WRAPS_WRITE_ENABLEDNofalseSet to true to enable send_email
WRAPS_FROM_EMAILNoDefault from address for send_email
WRAPS_CONFIGURATION_SETNoSES configuration set applied to sends (enables open/click tracking)

Write mode

send_email is disabled by default. Set WRAPS_WRITE_ENABLED=true to enable it. The from address must belong to a domain verified in your SES account.

JSON.mcp.json
{  "mcpServers": {    "wraps": {      "command": "npx",      "args": ["-y", "@wraps.dev/mcp"],      "env": {        "AWS_REGION": "us-east-1",        "WRAPS_WRITE_ENABLED": "true",        "WRAPS_FROM_EMAIL": "you@yourdomain.com",        "WRAPS_ALLOWED_RECIPIENT_DOMAINS": "yourcompany.com"      }    }  }}

No allowlist means no limits

Running with WRAPS_WRITE_ENABLED=true and no allowlist gives the agent unrestricted send capability to any address your SES account can reach. Set the guardrails below.

Send guardrails

When write mode is enabled, use these variables to restrict the agent's sending scope. A recipient is allowed if it matches either the address list or the domain list.

VariableDefaultDescription
WRAPS_ALLOWED_RECIPIENTS— (no restriction)Comma-separated exact addresses the agent may send to. If set, any address not in this list (or the domains list) is rejected.
WRAPS_ALLOWED_RECIPIENT_DOMAINS— (no restriction)Comma-separated domains the agent may send to. Matching is exact: example.com allows user@example.com but not subdomains — list each subdomain explicitly.
WRAPS_MAX_RECIPIENTS50Maximum number of recipients per send_email call.
WRAPS_ALLOW_FROM_OVERRIDEfalseSet to true to let the agent supply a from address that differs from WRAPS_FROM_EMAIL. When false, a mismatched from is rejected.

Enforced mode

For agents provisioned via wraps email agent create, the MCP server runs in enforced mode. The agent's AWS credential can only invoke an enforcer Lambda in your account — never SES directly. Kill-switch, recipient allowlist, and hourly/daily caps are decided by that Lambda, so the local guardrails above don't apply.

Enforced mode activates when both WRAPS_AGENT_ID and WRAPS_AGENT_ENFORCER_ARN are set. send_email then returns a structured disposition instead of an error for policy outcomes:

  • sent — delivered, with a messageId
  • pending_approval — an operator must approve; poll check_send_status with the returned approvalId
  • blocked — refused by policy (kill-switch, allowlist, or caps), with a reason

One recipient per send

Enforced mode accepts a single recipient per call. Pass one address (or a one-element array); larger arrays are rejected — send one email per recipient.

Next Steps

Agent Email Quickstart

Deploy SES and wire a typed send-email tool into your agent framework.

View Quickstart
Email SDK Reference

Every method, option, and response shape in @wraps.dev/email.

View SDK Docs

Need Help?

Open an issue or join the GitHub discussions — we read every one.

Get Help