Skip to main content
Glama
instantly-mcp

instantly-mcp

by katekruger

Instantly MCP server

CI Python 3.11+ License: MIT MCP

An MCP server that puts your Instantly.ai cold-email workspace in front of an AI client. Ask Claude for last week's reply rate, load enriched leads into a campaign, triage the Unibox, pause a mailbox that's burning reputation — 40 tools over the Instantly v2 API.

The point of the project is the safety model. Every write is gated behind an explicit confirm, autonomy is a tiered policy with volume caps and a hard-block list, and all of it is enforced in code — not asked for in a prompt. An agent cannot talk its way past a cap, because the cap is an if statement.

You:    "Launch the Design Partners campaign."
Claude: → launch_campaign(campaign_id="camp-1")
        ← "Would LAUNCH (activate) campaign camp-1 — it will start sending.
           AUTONOMY_LEVEL=manual — every write needs confirm=true.
           Re-call with confirm=true to execute."
        This will start sending from your mailboxes. Confirm?
You:    "Yes."
Claude: → launch_campaign(campaign_id="camp-1", confirm=true)   ← now it runs

The preview costs zero HTTP calls, so nothing reaches Instantly until you say so.

  • Transport: local stdio by default — no hosting, no public URL, no token. One env var switches it to hosted HTTP/SSE (Hosting).

  • Auth: your Instantly v2 key, read from INSTANTLY_API_KEY, never hardcoded and never logged.

  • Verified: paths and payload shapes checked against the live v2 reference; every place the real API differs from the obvious guess is written down.

  • Tested: the suite is fully mocked and never touches the live API.


Quickstart

Requires Python 3.11+ and an Instantly account with v2 API access.

1. Install

git clone https://github.com/katekruger/instantly-mcp.git
cd instantly-mcp

# Option A — uv (preferred)
uv sync

# Option B — venv + pip
python3.12 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

2. Get an API key

In Instantly, go to Settings → Integrations → API and create a v2 key. Instantly supports scoped keys — start with a read-only key to try analytics safely, then widen the scopes once you trust it.

export INSTANTLY_API_KEY=your_key_here

3. Check it starts

# Fails cleanly if the key is unset:
unset INSTANTLY_API_KEY
instantly-mcp        # -> "ERROR: INSTANTLY_API_KEY is not set", exit 1

# Starts (stdio server waits on stdin) with any non-empty key:
INSTANTLY_API_KEY=dummy instantly-mcp

No HTTP call is made until a tool is actually invoked. Ctrl-C to stop.

4. Register it with your MCP client

Add this to your client config, adjusting the absolute path:

{
  "mcpServers": {
    "instantly": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/instantly-mcp", "run", "instantly-mcp"],
      "env": { "INSTANTLY_API_KEY": "your_key_here" }
    }
  }
}

If you installed with venv + pip instead of uv, point command at the venv's entry point and drop args:

{
  "mcpServers": {
    "instantly": {
      "command": "/absolute/path/to/instantly-mcp/.venv/bin/instantly-mcp",
      "env": { "INSTANTLY_API_KEY": "your_key_here" }
    }
  }
}

Where that config lives (macOS):

  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Claude Code: claude mcp add instantly -e INSTANTLY_API_KEY=your_key_here -- uv --directory /absolute/path/to/instantly-mcp run instantly-mcp

5. Try it

Restart the client, confirm the instantly tools appear, and start with a read: "list my Instantly campaigns". Then try a write — you'll get a preview first.


Related MCP server: Apollo.io MCP Server

What it can do

40 tools. Reads run freely; writes are tiered. Full signatures and tiers in the tool reference.

Area

Tools

Highest tier

Analytics

Campaign, account, and per-step/variant analytics with computed open/reply/click/bounce rates

READ

Leads

List, get, search by email, add (deduped), update, set interest status, move, delete

HIGH_WRITE

Lead lists

List, create

LOW_WRITE

Campaigns

List, get, preview a build with zero writes, create (starts paused), update, launch, pause

HIGH_WRITE

Emails / Unibox

List, get, count unread, mark thread read, reply, forward

HIGH_WRITE

Sender accounts

List, get, pause, resume, update

HIGH_WRITE

Blocklist

List, add, remove

HIGH_WRITE

Deliverability & workspace

Verify an email, read workspace, list/create/delete webhooks

HIGH_WRITE

Four of them are hard-blocked — delete_lead, delete_webhook, pause_account, remove_from_blocklist — and never run without confirm=true, at any autonomy level, no matter what the policy says.

The safety model

Level

LOW_WRITE (reversible)

HIGH_WRITE (irreversible / wide blast radius)

manual (default)

needs confirm=true

needs confirm=true

assisted

runs unattended, within caps

needs confirm=true

autonomous

runs within caps

runs within caps, except the hard-block list

On top of the tiers: per-call and rolling-24h volume caps (leads, emails, campaigns), optional campaign allow/deny lists, and an append-only audit.log of every executed write with secrets redacted. Exceeding a cap forces a preview even at autonomous. Details in Safety and autonomy.

Hosting

Local stdio needs no hosting and is the right default — there is no network exposure to defend. Host it only when the server must exist while your machine is off, chiefly to receive Instantly webhooks. Over HTTP, inbound auth is mandatory and the server fails closed: no token, a token under 32 chars, or a non-https public URL and it refuses to start. A Dockerfile and a Render blueprint are included. See Hosting.


Documentation

Page

What's in it

Tool reference

All 40 tools, grouped by area, with risk tiers

Safety and autonomy

The confirm gate, autonomy levels, caps, hard-blocks, audit log

Configuration

Every environment variable, its default, and what it does

Hosting

HTTP transports, the threat model, OAuth login flow, Docker/Render, webhooks

Implementation notes

Where the live Instantly v2 API differs from the obvious reading

Security policy

Reporting a vulnerability; what this server does and doesn't protect

Contributing

Running the tests and linter, and what a good change looks like

AGENTS.md

Conventions for AI coding agents working in this repo — commands, layout, and the autonomy-tier model as a non-negotiable

Changelog

What changed in each release

Code of Conduct

Community standards and how to report a violation

Repository layout

src/instantly_mcp/
  server.py      MCP server: the 40 tool definitions, login route, transport selection
  client.py      Instantly v2 API client (httpx) — all HTTP lives here
  models.py      Pydantic input models and normalizers
  policy.py      Risk tiers, autonomy levels, volume caps, audit log
  auth.py        Inbound bearer-token auth for HTTP transports; fails closed
  oauth.py       Single-user OAuth authorization server for MCP clients
  formatting.py  Compact, LLM-friendly summaries of raw API responses
tests/           Fully mocked — never hits the live API
docs/            The pages listed above
Dockerfile       Container image for hosted deployment (non-root, reads $PORT)
render.yaml      Render blueprint; secrets are prompted, never committed
.env.example     Annotated template for every supported variable

Development

pytest -q                 # all mocked, no network, no API key needed
ruff check src tests      # lint

CI runs both on every push and pull request against Python 3.11, 3.12 and 3.13.

See also

Every project here shares one idea: a GTM system should refuse to act on data it cannot verify.

campaign-preflight — read-only preflight for the campaigns this server sends. Catches suppression, personalization and schedule problems before a launch.

deliverability-guard — watches sender reputation while campaigns run and throttles before a domain burns.

segment-mcp — a read-first MCP server for Twilio Segment, built on the same read-only-by-default, risk-tiered safety model this project's policy.py pioneered.

License

MIT.

Available Tools

40 tools
add_leadsA

Add leads in bulk to a campaign OR a list (provide exactly one target).

leads is a list of objects: at least email (required for campaigns), plus optional first_name, last_name, company_name, job_title, phone, website, personalization, and custom_variables (a dict). Duplicate emails within the batch are deduped; skip_if_in_workspace avoids re-loading existing contacts (safe for scheduled re-runs). LOW_WRITE.

Inputs: leads (required), confirm, list_id, campaign_id, +1 more.

add_to_blocklistA

Add emails/domains to the blocklist (plain strings). LOW_WRITE.

NOTE: v2 POST /block-lists-entries/bulk-create with body {"bl_values": [...]}.

Inputs: entries (required), confirm.

count_unreadB

Count unread Unibox messages.

Inputs: no named parameters.

create_campaignA

Create a campaign. HIGH_WRITE. Created PAUSED — launch separately.

Convenience: pass name, subject, body and a sensible Mon-Fri business- hours schedule + single-step sequence are generated for you. For full control, pass schedule (a campaign_schedule object with a schedules array) and/or sequences (list of {steps:[{type,delay,variants:[{subject,body}]}]}).

Inputs: body (required), name (required), subject (required), confirm, +3 more.

create_lead_listC

Create a new lead list. LOW_WRITE.

Inputs: name (required), confirm.

create_webhookA

Create webhook(s) pointing at url for the given event types. HIGH_WRITE.

Receiving webhooks needs a publicly reachable URL (the hosted deployment, not local stdio) and an Instantly plan tier that includes webhooks.

NOTE: v2 POST /webhooks takes a SINGULAR event_type per webhook, so this

tool creates one webhook per requested event type and returns them all.

Inputs: url (required), event_types (required), name, confirm, +1 more.

delete_leadA

DESTRUCTIVE: permanently delete a lead. HIGH_WRITE + hard-blocked — always requires confirm=true, even in autonomous mode.

Inputs: lead_id (required), confirm.

delete_webhookA

Delete a webhook. HIGH_WRITE + hard-blocked — always requires confirm=true.

Inputs: webhook_id (required), confirm.

forward_emailB

Forward a Unibox email to to (comma-separated addresses). HIGH_WRITE.

If body is omitted the original message is included. eaccount/subject default from the original on execute.

NOTE: v2 POST /emails/forward requires reply_to_uuid, to_address_email_list,

eaccount, subject, and either a body or include_original_body=true.

Inputs: to (required), email_id (required), body, confirm, +2 more.

get_accountA

Get status/settings for one sending account (by email).

Inputs: email (required).

get_account_analyticsA

Workspace-level daily sending analytics, aggregated across accounts.

NOTE: backed by GET /accounts/analytics/daily (there is no single

"account analytics overview" endpoint in v2). Returns per-day rows plus

a computed totals+rates roll-up.

Inputs: end_date, start_date.

get_campaignA

Get one campaign's full configuration (schedule, sequences, status).

Inputs: campaign_id (required).

get_campaign_analyticsA

Analytics for ONE campaign over an optional date range (YYYY-MM-DD).

Returns sent/opens/replies/clicks/bounces/unsubscribes/opportunities counts plus computed open/reply/click/bounce rates.

Inputs: campaign_id (required), end_date, start_date.

get_campaign_steps_analyticsC

Per-sequence-step (and variant) analytics for one campaign.

Inputs: campaign_id (required).

get_emailA

Get one email's full subject/body/thread.

Inputs: email_id (required).

get_leadA

Get one lead by id.

Inputs: lead_id (required).

get_workspaceA

Current workspace info and plan ids (useful to see what the key can reach).

Inputs: no named parameters.

launch_campaignB

Activate/resume a campaign so it starts sending. HIGH_WRITE.

NOTE: v2 path is POST /campaigns/{id}/activate.

Inputs: campaign_id (required), confirm.

list_accountsC

List sender email accounts with status, warmup status, and daily limit.

Inputs: limit, search.

list_blocklistC

List blocked contacts/domains.

NOTE: v2 path is /block-lists-entries.

Inputs: limit.

list_campaignsA

List campaigns (id, name, status, created).

Optional status filter (int): 0=draft, 1=active, 2=paused, 3=completed, 4=running_subsequences, -1=accounts_unhealthy, -2=bounce_protect, -99=account_suspended.

Inputs: limit, status.

list_emailsA

List Unibox emails (sends, replies, manual). Filter by campaign, lead email, sending account, or unread. # NOTE: this endpoint is rate-limited to 20 req/min by Instantly.

Inputs: limit, eaccount, lead_email, campaign_id, +1 more.

list_lead_listsB

List lead lists (id, name).

Inputs: limit.

list_leadsA

List leads, optionally filtered by campaign, list, or search text.

NOTE: v2 lists leads via POST /leads/list (not GET); the campaign filter

field is campaign, not campaign_id.

Inputs: limit, search, list_id, campaign_id.

list_webhook_event_typesA

List the webhook event types this workspace supports (e.g. reply_received, lead_meeting_booked, email_sent/opened/clicked/replied/bounced/unsubscribed).

Inputs: no named parameters.

list_webhooksA

List configured webhooks.

Inputs: no named parameters.

mark_thread_readB

Mark all emails in a thread as read. LOW_WRITE (low risk).

Inputs: thread_id (required), confirm.

move_leadA

Move (or copy) one lead to another campaign or list. HIGH_WRITE.

NOTE: v2 POST /leads/move is asynchronous and returns a BackgroundJob;

it needs the SOURCE (from_campaign_id or from_list_id) as well as the

destination. Poll the returned job id if you need completion status.

Inputs: lead_id (required), copy, confirm, to_list_id, +3 more.

pause_accountA

Pause a sending account (stops it sending). HIGH_WRITE + hard-blocked — always requires confirm=true. Deliverability control.

Inputs: email (required), confirm.

pause_campaignC

Pause/stop a campaign. HIGH_WRITE.

Inputs: campaign_id (required), confirm.

preview_campaign_buildA

Preview campaign, variants, schedule, senders, tags, and lead-list mapping.

Makes ZERO HTTP calls.

Inputs: body (required), name (required), subject (required), tags, +5 more.

remove_from_blocklistA

Remove emails/domains from the blocklist. HIGH_WRITE + hard-blocked — always requires confirm=true.

NOTE: v2 POST /block-lists-entries/bulk-delete with {"bl_values": [...]}

(bulk-delete body shape not fully documented in the public reference —

verify against your workspace on first real call).

Inputs: entries (required), confirm.

reply_to_emailA

Reply to an inbound Unibox email. HIGH_WRITE (sends mail from your account).

If eaccount (the sending account) or subject are omitted, they're derived from the original email ("Re: ") on execute. Set html=true to send body as HTML instead of plain text.

NOTE: v2 POST /emails/reply requires reply_to_uuid, eaccount, subject, and

a body object ({html|text}).

Inputs: body (required), email_id (required), html, confirm, +2 more.

resume_accountB

Resume a paused sending account. HIGH_WRITE.

Inputs: email (required), confirm.

search_leads_by_emailA

Find leads matching an email (across campaigns/lists) — who is this and which campaign(s) are they in.

Inputs: email (required).

set_lead_interest_statusB

Set a lead's interest status.

status is a label — one of: interested, meeting_booked, meeting_completed, won, out_of_office, not_interested, wrong_person, lost, do_not_contact — or a raw int (-4..4). LOW_WRITE.

NOTE: v2 keys this endpoint (POST /leads/update-interest-status) by

lead_email, not lead id, so this tool takes the email.

Inputs: status (required), lead_email (required), confirm, campaign_id.

update_accountB

Update account settings, e.g. {"daily_limit": 40}, sending_gap, signature, or a nested "warmup" object. HIGH_WRITE (affects deliverability).

Inputs: email (required), fields (required), confirm.

update_campaignC

Patch campaign settings (name, campaign_schedule, sequences, ...). HIGH_WRITE.

Inputs: fields (required), campaign_id (required), confirm.

update_leadC

Update editable fields on a lead (first_name, last_name, company_name, job_title, phone, website, personalization, custom_variables, ...). LOW_WRITE.

Inputs: fields (required), lead_id (required), confirm.

verify_emailA

Verify a single email address (valid / invalid / catch-all).

NOTE: POST /email-verification consumes a verification credit. It returns

"pending" if it takes >10s — call again to poll the stored result.

Inputs: email (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 40 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action, and the analytics tools are clearly separated by campaign/account/step scope. Even at 40 tools, no two tools appear to do the same thing.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb-first pattern with clear object nouns, such as list_campaigns, create_lead_list, pause_account, and delete_webhook. The naming remains predictable across all resource domains.

    Tool Count3/5

    At 40 tools this is a heavy surface, but it maps cleanly onto Instantly's broad API scope and has little redundancy. The count exceeds the ideal compact size for an MCP server, though it is justifiable for a full platform wrapper.

    Completeness4/5

    Core workflows are well covered: campaign lifecycle, lead management, email reply/forward, account controls, blocklist CRUD, verification, and webhooks. Minor gaps exist, such as no campaign deletion, no lead-list deletion/removal, and only single-address email verification.

    Maintenance

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      F
      maintenance
      Enables interaction with Instantly.ai email outreach platform through 31 tools across accounts, campaigns, leads, emails, and analytics. Supports both local and remote deployment with multi-tenant authentication.
      27
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      FastMCP server exposing the full operational surface of the Apollo.io REST API to AI assistants. Provides 27 tools for outbound sales automation including campaign health, sequence management, mailbox warmup, CRM operations, and programmatic template/sequence editing with audit logging.
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables management of OpenAI Ads campaigns, ad groups, ads, and insights through MCP, with approval-gated live mutations for safe write operations.
      157 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server for Instantly.ai, allowing Claude to query campaign analytics, warmup health, and sending accounts, and to manage campaigns and replies with confirmation.
      356 npm
      MIT