Instantly MCP server
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.
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
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file instantly_mcp-0.1.0.tar.gz.
File metadata
- Download URL: instantly_mcp-0.1.0.tar.gz
- Upload date:
- Size: 68.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7fde7b7f414c3927656b2abaf66199531070a79d0b584d79b3168f55edf7beb
|
|
| MD5 |
139db4a97867d9d1a644e63699ec7e4f
|
|
| BLAKE2b-256 |
33d978d39b721e09bbdfa11ee5d37fe878df9827bc7720c5651817a694b02476
|
Provenance
The following attestation bundles were made for instantly_mcp-0.1.0.tar.gz:
Publisher:
release.yml on katekruger/instantly-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
instantly_mcp-0.1.0.tar.gz -
Subject digest:
c7fde7b7f414c3927656b2abaf66199531070a79d0b584d79b3168f55edf7beb - Sigstore transparency entry: 2666109664
- Sigstore integration time:
-
Permalink:
katekruger/instantly-mcp@56ce2a67953b1437ce7d82dbee03f6fe8c2af603 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/katekruger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@56ce2a67953b1437ce7d82dbee03f6fe8c2af603 -
Trigger Event:
push
-
Statement type:
File details
Details for the file instantly_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: instantly_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 34.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db790322f10e83976387056e1b6712c49b83a4925c320d379ced10a6de97ab7a
|
|
| MD5 |
74577741d23e7b6e64bc650c4d52a3a5
|
|
| BLAKE2b-256 |
536171a056943220b237b1ccc7cff80731a80e0860fa29dfd9e999ceb453143d
|
Provenance
The following attestation bundles were made for instantly_mcp-0.1.0-py3-none-any.whl:
Publisher:
release.yml on katekruger/instantly-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
instantly_mcp-0.1.0-py3-none-any.whl -
Subject digest:
db790322f10e83976387056e1b6712c49b83a4925c320d379ced10a6de97ab7a - Sigstore transparency entry: 2666109747
- Sigstore integration time:
-
Permalink:
katekruger/instantly-mcp@56ce2a67953b1437ce7d82dbee03f6fe8c2af603 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/katekruger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@56ce2a67953b1437ce7d82dbee03f6fe8c2af603 -
Trigger Event:
push
-
Statement type: