Open Source·AI Agent Infrastructure

Give Your AI Agent Full Outbound Superpowers

Instantly.ai has 156 API endpoints. This CLI exposes every single one as a native AI tool call.

Your agent can now run campaigns, manage leads, handle replies, and monitor deliverability — completely autonomously. No dashboard needed.

Install from npm
156
Commands
31
API Groups
CLI
Native
OpenClaw
OpenClaw
CLI / MCP
Instantly.ai
Instantly.ai
156 commands · 31 API groups · Zero dashboard
The Problem

Your AI Agent Is Locked Out of Outbound

AI agents are incredible at reasoning, planning, and executing complex workflows. But when it comes to actually running your outbound — creating campaigns, importing leads, replying to prospects — they hit a wall.

Instantly.ai has a beautiful web dashboard. Great for humans. Completely invisible to agents. But there’s no true way for agent-native, fully-specced-out agents like OpenClaw to autonomously manage your entire outbound operation — where you sit back, manage the agent, and let it run.

“If your agent can’t access the tool, the tool doesn’t exist in the agent’s world.”

What This Unlocks

Every Instantly Capability, Agent-Ready

156 commands across 31 API groups. Every single thing you can do in the Instantly dashboard, your agent can now do from the terminal — or as a native MCP tool call.

Campaign Management

11 cmds

Create, activate, pause, duplicate, and monitor campaigns. Full lifecycle control from a single command.

Lead Operations

12 cmds

Bulk import up to 1,000 leads, move between campaigns, merge duplicates, assign, and update interest status.

Reply Handling

8 cmds

Read unified inbox, reply to threads, forward messages, mark as read. Your agent handles conversations autonomously.

Analytics & Reporting

6 cmds

Campaign stats, daily metrics, step-level performance, account-level data, and warmup analytics.

Infrastructure Health

12 cmds

Test DNS, SMTP, and IMAP vitals. Enable/disable warmup across accounts. Monitor deliverability in real time.

Deliverability Testing

13 cmds

Run inbox placement tests, analyze ESP results, track deliverability insights across providers.

Webhooks & Automation

12 cmds

Create, test, and manage webhooks. Event-driven workflows that trigger on opens, replies, bounces, and more.

Templates & Sequences

23 cmds

Manage email templates, custom prompt templates, subsequences, and sales flows programmatically.

Architecture

One Definition. Two Interfaces. Zero Duplication.

The secret sauce is the CommandDefinition pattern. Every API endpoint is defined once as a single TypeScript object. That single definition automatically generates both a CLI command and an MCP tool — with shared validation, shared descriptions, and shared error handling.

Write one file, get both interfaces:

campaigns/activate.ts — The Single Source of Truth
export const campaignsActivateCommand = {
  name: 'campaigns_activate',
  group: 'campaigns',
  subcommand: 'activate',
  description: 'Activate a campaign to start sending.',
  inputSchema: z.object({
    id: z.string().describe('Campaign ID to activate'),
  }),
  endpoint: { method: 'POST', path: '/campaigns/{id}/activate' },
  fieldMappings: { id: 'path' },
};
CLI Command
$ instantly campaigns activate abc123
MCP Tool Call
campaigns_activate({ id: "abc123" })

Adding a new API endpoint means creating one file. The CLI command, MCP tool, input validation, help text, and error handling all generate automatically.

Two MCP Paths

How This Differs from the Remote MCP Connector

We built both. The instantly-cli is a stdio-based MCP for developers and agents. The official Instantly MCP connector is a remote HTTP MCP for the platform. They’re complementary — here’s how.

instantly-cli

stdio MCP
Transport:stdio (stdin/stdout pipes)
Runs as:Local process spawned by AI client (Claude Desktop, Cursor, VS Code)
Auth:API key stored locally or in env var
For:Individual developers and agents on their own machine
Install:npm i -g instantly-cli
Also:A plain shell CLI tool (instantly campaigns list)

mcp.instantly.ai

Remote HTTP MCP
Transport:Streamable HTTP (SSE/WebSocket)
Runs as:Hosted server clients connect to over the network
Auth:OAuth/session-based, multi-tenant
For:Any connected client without local install
Install:Zero install — connect to URL
Bonus:MCP-UI visual interface layer on top

Side-by-Side Comparison

stdio MCP (this)Remote HTTP MCP
SetupUser installs locallyZero install, connect to URL
OfflineWorks offlineRequires network
Multi-tenantSingle userMany users
Distributionnpm registryHosted endpoint
Agent discoverynpm install → immediate useURL/registry discovery

They’re Complementary, Not Competing

The stdio MCP is the developer/agent-first path — an agent finds it on npm, installs it, and has 160+ tools immediately via stdio. The remote connector is the platform-first path — no install, centralized, with MCP-UI for visual interaction.

The CLI also doubles as a plain shell tool (instantly campaigns list) which the remote MCP doesn’t do. That’s the main bonus — it’s three interfaces from one codebase: CLI, stdio MCP, and the commands can be reused by your remote MCP if you wanted to share the definitions.

Agent Workflows

What Your Agent Can Actually Do

These aren’t theoretical. These are real multi-step workflows that an MCP-connected agent can execute autonomously, start to finish.

1

Launch a Campaign from Scratch

Your agent creates a full campaign end-to-end: builds the campaign, imports a lead list, writes sequences, activates sending, and monitors delivery — all in one autonomous run.

You

Launch a new cold email campaign targeting SaaS CTOs in the US. Import my lead list, set up weekday sending in EST, and activate it. Let me know when it's live.

Agent executing workflow
$instantly campaigns create --name "Q2 SaaS Outreach"
# Create the campaign shell
$instantly campaigns set-schedule $ID --timezone "America/New_York" --days "1,2,3,4,5"
# Set sending schedule (weekdays, EST)
$instantly leads bulk-add --campaign-id $ID --file leads.csv
# Import 1,000 leads from CSV
$instantly campaigns set-sequences $ID --sequences '[...]'
# Attach email sequences with A/B variants
$instantly campaigns activate $ID
# Go live — emails start sending
$instantly campaigns sending-status $ID
# Verify delivery is flowing
$instantly analytics campaign-summary --campaign-id $ID
# Pull open/reply rates after 24h
2

Handle Replies Automatically

Agent monitors the inbox, reads new replies, classifies intent (interested, not interested, out of office), responds contextually, and updates lead status — no human in the loop.

You

Check my Instantly inbox for any new replies. For interested prospects, send a follow-up and mark them as interested. For out-of-office replies, just mark them read.

Agent executing workflow
$instantly email unread-count
# Check if new replies exist
$instantly email list --campaign-id $ID --is-read false
# Pull all unread threads
$instantly email read $THREAD_ID
# Read the full conversation
$instantly email reply --reply-to-uuid $UUID --body-text "..."
# Send contextual response
$instantly email mark-read $THREAD_ID
# Mark handled
$instantly leads update-status --lead-email $EMAIL --interest-status "Interested"
# Update lead status in CRM
3

Morning Infrastructure Check

Daily autonomous health check: inventory all sending accounts, test SMTP/IMAP vitals, enable warmup on cold accounts, verify DNS records, and report deliverability insights.

You

Run a full health check on all my sending accounts. Test SMTP/IMAP, verify DNS records, enable warmup on any cold accounts, and give me a deliverability report.

Agent executing workflow
$instantly accounts list
# Inventory all sending accounts
$instantly accounts test-vitals $ACCOUNT_ID
# Test SMTP/IMAP for each account
$instantly accounts check-dns $ACCOUNT_ID
# Verify SPF/DKIM/DMARC records
$instantly accounts warmup-enable --account-ids "id1,id2"
# Enable warmup on cold accounts
$instantly analytics warmup --emails "sender@domain.com"
# Pull warmup progress & reputation data
$instantly inbox-placement test-create --email "test@domain.com"
# Run inbox placement test
4

Duplicate & Scale a Winning Campaign

Agent identifies the top-performing campaign, duplicates it with all settings intact, swaps the lead list, and launches — scaling what works without starting from zero.

You

My "Q1 Fintech" campaign has a 4.2% reply rate. Duplicate it, swap in my new lead list for Q2, and launch the copy. Keep the same sequences and schedule.

Agent executing workflow
$instantly analytics campaign-summary --campaign-id $ID
# Confirm performance metrics
$instantly campaigns duplicate $ID
# Clone the winning campaign
$instantly campaigns update $NEW_ID --name "Q2 Fintech Scale"
# Rename the duplicate
$instantly leads delete --campaign-id $NEW_ID --delete-all
# Clear the cloned lead list
$instantly leads bulk-add --campaign-id $NEW_ID --file q2-fintech-leads.csv
# Import fresh Q2 leads
$instantly campaigns activate $NEW_ID
# Launch the scaled campaign
5

End-of-Week Analytics Report

Agent pulls analytics across every active campaign, compiles open/reply/bounce rates, identifies top performers, and delivers a summary — your weekly outbound report, fully automated.

You

Every Friday at 4pm, pull a full analytics report for all active campaigns. I want open rates, reply rates, bounce rates, and top-performing subject lines. Summarize everything and send it to me.

Agent executing workflow
$instantly campaigns list --status active
# Get all active campaigns
$instantly analytics campaign-summary --campaign-id $ID1
# Pull stats for campaign 1
$instantly analytics campaign-summary --campaign-id $ID2
# Pull stats for campaign 2
$instantly analytics campaign-steps --campaign-id $ID1
# Get per-step performance (subject lines)
$instantly analytics campaign-steps --campaign-id $ID2
# Compare step performance across campaigns
$instantly analytics daily-stats --start-date 2026-02-24 --end-date 2026-03-03
# Pull daily sending trends for the week
6

Lead List Cleanup & Dedup

Agent scans the lead list for duplicates, merges them, removes hard bounces, and moves flagged leads to the blocklist — keeping your sender reputation clean.

You

I just imported 5,000 new leads into my main campaign. Find and merge any duplicates, remove bounced emails, and move any leads with a "Do Not Contact" tag to the blocklist.

Agent executing workflow
$instantly leads list --campaign-id $ID --limit 100
# Pull lead list in batches
$instantly leads search --email "duplicate@company.com"
# Find duplicate entries
$instantly leads merge --winner $LEAD_ID1 --loser $LEAD_ID2
# Merge duplicate into one record
$instantly leads list --campaign-id $ID --interest-status "Not Interested"
# Find bounced/uninterested leads
$instantly leads delete --lead-ids "$BOUNCED_IDS"
# Remove hard bounces
$instantly blocklist add --entries '[{"email":"dnc@company.com"}]'
# Add DNC leads to blocklist
7

Spin Up New Sending Accounts

Agent onboards new sending infrastructure: connects accounts, enables warmup, validates DNS records, and runs vitals checks to ensure everything is healthy before sending.

You

I just added 3 new sending accounts. Connect them, enable warmup on all of them, verify DNS is set up correctly, and let me know which ones pass the vitals test.

Agent executing workflow
$instantly accounts list
# Verify new accounts are connected
$instantly accounts test-vitals $ACCT_1
# Test SMTP/IMAP on account 1
$instantly accounts test-vitals $ACCT_2
# Test SMTP/IMAP on account 2
$instantly accounts test-vitals $ACCT_3
# Test SMTP/IMAP on account 3
$instantly accounts check-dns $ACCT_1
# Verify SPF/DKIM/DMARC
$instantly accounts warmup-enable --account-ids "$ACCT_1,$ACCT_2,$ACCT_3"
# Enable warmup on all 3
$instantly analytics warmup --emails "new1@domain.com,new2@domain.com"
# Monitor warmup progress
8

TAM Surveillance

Automated daily surveillance of your total addressable market: monitors campaign health, catches performance dips before they hurt deliverability, and gives you a bird's-eye view of your outbound coverage.

You

Every morning, check all my active campaigns for reply rate drops. If any campaign dips below 1% reply rate, pause it and notify me. Also pull a snapshot of my total addressable leads across all campaigns.

Agent executing workflow
$instantly campaigns list --status active
# Get all active campaigns
$instantly analytics campaign-summary --campaign-id $ID
# Pull reply rate for each campaign
$instantly campaigns pause $UNDERPERFORMING_ID
# Pause any campaign below 1% reply rate
$instantly leads count --campaign-id $ID1
# Count leads in campaign 1
$instantly leads count --campaign-id $ID2
# Count leads in campaign 2
$instantly analytics daily-stats --start-date $YESTERDAY
# Pull yesterday's sending volume
For AI Agent Builders

Why This Changes Everything for Outbound

1

Agents Become Full Outbound Operators

An agent connected via MCP can create a campaign, import 1,000 leads, write personalized sequences, activate sending, monitor replies, and respond to interested prospects — all without a human touching the Instantly dashboard.

2

JSON-First, Agent-Native Design

Every command returns structured JSON. No HTML parsing, no screen scraping, no brittle selectors. Agents get clean, typed data they can reason about and act on immediately.

3

Self-Correcting Error Messages

When an agent calls the wrong command, the CLI responds with available subcommands. The agent self-corrects in real time without human intervention. Structured errors with codes, not stack traces.

4

Works with Every MCP-Compatible Agent

Claude Desktop, Cursor, VS Code, Windsurf, Gemini — any agent that speaks MCP gets instant access to 156 Instantly tools. One npx command to connect.

Get Started

Up and Running in 60 Seconds

Install globally, set your API key, and start commanding Instantly from the terminal. Or connect as an MCP server and let your agent take over.

Install

npm (global)
npm install -g instantly-cli
or run without installing
npx instantly-cli campaigns list

Authenticate

Interactive login
instantly login
Or set environment variable (recommended for agents)
export INSTANTLY_API_KEY=your-api-key-here

Connect as MCP Server

Add this to your Claude Desktop, Cursor, or VS Code MCP config:

MCP Configuration (claude_desktop_config.json)
{
  "mcpServers": {
    "instantly": {
      "command": "npx",
      "args": ["instantly-cli", "mcp"],
      "env": {
        "INSTANTLY_API_KEY": "your-api-key"
      }
    }
  }
}

Verify It Works

instantly campaigns list --pretty

Ready to Supercharge Your Agent’s Outbound?

Clone the repo, connect via MCP, and let your agent run your entire cold email operation. Or let us build an agent-powered outbound system for you.