instantly-mcp
Enables MCP clients to read Instantly.ai analytics and manage leads, campaigns, Unibox, sender accounts, blocklist, and webhooks, with write actions gated behind confirm prompts and configurable safety policies.
README
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/instantlymcp.git
cd instantlymcp
# 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/instantlymcp", "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/instantlymcp/.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/instantlymcp 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 |
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.
License
MIT.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。