# Send AgentMail MCP CLI to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "agentmail-mcp-cli",
    "name": "AgentMail MCP CLI",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/FloHiwg/agentmail-mcp-cli",
    "canonicalUrl": "https://clawhub.ai/FloHiwg/agentmail-mcp-cli",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/agentmail-mcp-cli",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=agentmail-mcp-cli",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "agentmail-mcp-cli",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-29T15:26:30.541Z",
      "expiresAt": "2026-05-06T15:26:30.541Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=agentmail-mcp-cli",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=agentmail-mcp-cli",
        "contentDisposition": "attachment; filename=\"agentmail-mcp-cli-1.0.3.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "agentmail-mcp-cli"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/agentmail-mcp-cli"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/agentmail-mcp-cli",
    "downloadUrl": "https://openagent3.xyz/downloads/agentmail-mcp-cli",
    "agentUrl": "https://openagent3.xyz/skills/agentmail-mcp-cli/agent",
    "manifestUrl": "https://openagent3.xyz/skills/agentmail-mcp-cli/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/agentmail-mcp-cli/agent.md"
  }
}
```
## Documentation

### AgentMail MCP CLI

Email management for AI agents via the AgentMail API.

Documentation: https://docs.agentmail.to
Get API Key: https://agentmail.to

### Prerequisites

Required:

Node.js >= 20.0.0
AgentMail API key from agentmail.to

Installation:

npm install -g openclaw-agentmail-cli

This installs the agentmail command globally.

### Authentication

Set your API key (get one from agentmail.to):

# Option 1: Environment variable (recommended)
export AGENTMAIL_API_KEY="your_api_key"
agentmail inboxes list

# Option 2: CLI parameter
agentmail --api-key "your_api_key" inboxes list

### Inbox Management

# List all inboxes
agentmail inboxes list

# List with limit
agentmail inboxes list --limit 5

# Create a new inbox
agentmail inboxes create --display-name "My Agent"

# Create with username and domain
agentmail inboxes create --username myagent --domain agentmail.to --display-name "My Agent"

# Get inbox details
agentmail inboxes get <inbox-id>

# Delete an inbox (destructive!)
agentmail inboxes delete <inbox-id>

### Thread Management

# List threads in inbox
agentmail threads list <inbox-id>

# List with options
agentmail threads list <inbox-id> --limit 10

# Filter by labels
agentmail threads list <inbox-id> --labels '["unread"]'

# Filter by date
agentmail threads list <inbox-id> --after "2024-01-01" --before "2024-12-31"

# Get thread details (includes all messages)
agentmail threads get <inbox-id> <thread-id>

### Send Messages

# Send a simple email
agentmail messages send <inbox-id> \\
  --to user@example.com \\
  --subject "Hello" \\
  --text "Email body here"

# Send to multiple recipients
agentmail messages send <inbox-id> \\
  --to user1@example.com \\
  --to user2@example.com \\
  --subject "Team Update" \\
  --text "Hello team..."

# Send with CC and BCC
agentmail messages send <inbox-id> \\
  --to primary@example.com \\
  --cc copy@example.com \\
  --bcc hidden@example.com \\
  --subject "Important" \\
  --text "Please review..."

# Send HTML email
agentmail messages send <inbox-id> \\
  --to user@example.com \\
  --subject "Newsletter" \\
  --html "<h1>Hello</h1><p>HTML content</p>"

# Send with labels
agentmail messages send <inbox-id> \\
  --to user@example.com \\
  --subject "Outreach" \\
  --text "Hello..." \\
  --labels '["campaign","outbound"]'

### Reply & Forward

# Reply to a message
agentmail messages reply <inbox-id> <message-id> \\
  --text "Thank you for your email."

# Reply with HTML
agentmail messages reply <inbox-id> <message-id> \\
  --html "<p>Thank you!</p>"

# Reply all
agentmail messages reply <inbox-id> <message-id> \\
  --text "Replying to everyone..." \\
  --reply-all

# Forward a message
agentmail messages forward <inbox-id> <message-id> \\
  --to forward-to@example.com \\
  --text "FYI - see below"

# Forward to multiple
agentmail messages forward <inbox-id> <message-id> \\
  --to team@example.com \\
  --cc manager@example.com \\
  --subject "Fwd: Customer Inquiry" \\
  --text "Please review"

### Labels & Organization

# Add labels to a message
agentmail messages update <inbox-id> <message-id> \\
  --add-labels '["important","needs-review"]'

# Remove labels
agentmail messages update <inbox-id> <message-id> \\
  --remove-labels '["unread"]'

# Add and remove simultaneously
agentmail messages update <inbox-id> <message-id> \\
  --add-labels '["processed"]' \\
  --remove-labels '["unread","pending"]'

### Attachments

# Get attachment details and download URL
agentmail attachments get <thread-id> <attachment-id>

### Available Commands

CommandDescriptioninboxes listList all inboxesinboxes get <id>Get inbox detailsinboxes createCreate new inboxinboxes delete <id>Delete inboxthreads list <inbox-id>List threadsthreads get <inbox-id> <thread-id>Get thread with messagesmessages send <inbox-id>Send new emailmessages reply <inbox-id> <msg-id>Reply to emailmessages forward <inbox-id> <msg-id>Forward emailmessages update <inbox-id> <msg-id>Update labelsattachments get <thread-id> <att-id>Get attachment

### inboxes list

-l, --limit <n> - Max items (default: 10)
--page-token <token> - Pagination token

### inboxes create

-u, --username <name> - Email username
-d, --domain <domain> - Email domain
-n, --display-name <name> - Display name

### threads list

-l, --limit <n> - Max items (default: 10)
--page-token <token> - Pagination token
--labels <json> - Filter by labels (JSON array)
--before <datetime> - Before date (ISO 8601)
--after <datetime> - After date (ISO 8601)

### messages send

--to <email> - Recipient (repeatable)
--cc <email> - CC recipient (repeatable)
--bcc <email> - BCC recipient (repeatable)
-s, --subject <text> - Subject line
-t, --text <body> - Plain text body
--html <body> - HTML body
--labels <json> - Labels (JSON array)

### messages reply

-t, --text <body> - Plain text body
--html <body> - HTML body
--reply-all - Reply to all recipients
--labels <json> - Labels (JSON array)

### messages forward

--to <email> - Recipient (repeatable)
--cc <email> - CC recipient (repeatable)
--bcc <email> - BCC recipient (repeatable)
-s, --subject <text> - Subject line
-t, --text <body> - Plain text body
--html <body> - HTML body
--labels <json> - Labels (JSON array)

### messages update

--add-labels <json> - Labels to add (JSON array)
--remove-labels <json> - Labels to remove (JSON array)

### Check for New Emails

# List unread threads
agentmail threads list <inbox-id> --labels '["unread"]' --limit 20

### Process and Archive Email

# 1. Get thread
agentmail threads get <inbox-id> <thread-id>

# 2. Process content (your logic)

# 3. Mark as processed
agentmail messages update <inbox-id> <message-id> \\
  --add-labels '["processed"]' \\
  --remove-labels '["unread"]'

### Auto-Reply Workflow

# 1. Check for emails needing reply
agentmail threads list <inbox-id> --labels '["needs-reply"]'

# 2. Get thread details
agentmail threads get <inbox-id> <thread-id>

# 3. Send reply
agentmail messages reply <inbox-id> <message-id> \\
  --text "Thank you for reaching out. We will respond within 24 hours."

# 4. Update labels
agentmail messages update <inbox-id> <message-id> \\
  --add-labels '["auto-replied"]' \\
  --remove-labels '["needs-reply","unread"]'

### Create Inbox and Send First Email

# 1. Create inbox
agentmail inboxes create --display-name "Sales Bot"
# Note the inboxId from response

# 2. Send email
agentmail messages send <new-inbox-id> \\
  --to prospect@example.com \\
  --subject "Introduction" \\
  --text "Hello! I wanted to reach out..."

### Error Handling

If commands fail, check:

API Key: Ensure AGENTMAIL_API_KEY is set
IDs: Verify inbox/thread/message IDs exist
JSON: Use proper JSON for array options: '["value"]'

### Alternative: MCPorter Syntax

If the MCP compatibility is restored, you can also use MCPorter:

# List inboxes
npx mcporter call agentmail.list_inboxes

# Send message
npx mcporter call agentmail.send_message \\
  inboxId:<inbox-id> \\
  to:'["user@example.com"]' \\
  subject:"Hello" \\
  text:"Body"

### Links

API Documentation: https://docs.agentmail.to
Get API Key: https://agentmail.to
MCP Server: https://github.com/agentmail-to/agentmail-mcp
Node SDK: https://github.com/agentmail-to/agentmail-node
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: FloHiwg
- Version: 1.0.3
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-29T15:26:30.541Z
- Expires at: 2026-05-06T15:26:30.541Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/agentmail-mcp-cli)
- [Send to Agent page](https://openagent3.xyz/skills/agentmail-mcp-cli/agent)
- [JSON manifest](https://openagent3.xyz/skills/agentmail-mcp-cli/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/agentmail-mcp-cli/agent.md)
- [Download page](https://openagent3.xyz/downloads/agentmail-mcp-cli)