Email tools

How to Connect Claude Code to Cold Email

Connect Claude Code to your cold email setup: call the Outreach2day API from the terminal or add a local MCP server with claude mcp add. Commands, limits.

Max Korolev
Max KorolevFounder & CEO, Outreach2dayPublished 5 min read
On this page

Short answer: Claude Code reaches your cold email setup in two ways that work today. It can call the Outreach2day REST API with curl from your terminal, or it can use a local MCP server over the same API, added with claude mcp add. Claude Code runs local MCP servers, and since 18 June 2025 also remote servers, with OAuth or a fixed header. The hosted Outreach2day MCP server is in early access, so this page shows no remote URL yet.

Checked September 2026 against Claude Code's MCP documentation and Anthropic's remote MCP announcement.

Connection Methods

Method

Works with Outreach2day today

Best for

Setup

curl through the Bash tool

Yes

One-off checks, scripts, anything in the API

Key in an env variable

Local MCP server (--transport stdio)

Yes, you run it

Repeated questions with typed tools

Python script + one command

Remote MCP server (--transport http + --header)

Early access

Same tools, no local process

One command when live

Claude Code asks before it runs a shell command or calls an MCP tool, unless you allow that command or tool for good. That approval step is what makes it a reasonable place to manage infrastructure that costs money.

What Claude Code Can Do With Your Cold Email Setup

  • Size the setup. From a lead count and a daily target, work out mailboxes and domains: at 25 cold emails per mailbox a day and 5 mailboxes per domain, one domain carries about 125 cold emails a day.

  • Check domains. POST /check_domains returns free, taken or not_allowed for up to 50 names per call. Buying domains through the API is paid right away — give an agent a billing-scoped key only if you want it to buy.

  • Read mailboxes. GET /mailboxes lists address, status and domain. The response includes SMTP/IMAP credentials — store the API key like a password.

  • Run warm-up. GET /warmup/mailboxes shows warmupState per mailbox; POST /warmup/operations enables or pauses warm-up with an idempotencyKey, so a retry does not start a second operation.

  • Read replies. GET /threads lists reply threads with a replyIntent label; see triage cold email replies with AI.

  • Prepare campaigns. Draft and lint the sequence in files. The campaign API is not enabled for every workspace; if you send from Instantly or Smartlead, the export endpoints add your mailboxes there.

Connect Claude Code to Outreach2day, step by step

  1. Create an API key. In the app, open the API keys page and create a key only for Claude Code. It starts with ot2d_ and acts as your user in every workspace you belong to.

  2. Export it in your shell. Run export O2D_KEY=ot2d_... (or put it in a git-ignored .env). Claude Code inherits your environment, so the key never appears in the chat.

  3. Tell Claude Code about the API once. Add a short note to CLAUDE.md in your project: base URL https://public.outreach2day.com, header Authorization: Bearer $O2D_KEY, reference at dev.outreach2day.com, "never print the key".

  4. Ask a read-only question. "List my workspaces and the number of mailboxes in each." Approve the curl call and compare the answer with the app.

  5. Optionally add a local MCP server. Build the read-only server from our cold email MCP server guide and register it with the command below. Run /mcp inside Claude Code to see its tools.

claude mcp add outreach2day \
  -e O2D_API_KEY="$O2D_KEY" \
  -e O2D_WORKSPACE_ID="$O2D_WORKSPACE_ID" \
  -- /path/to/.venv/bin/python /path/to/o2d_mcp.py

The default scope is local: the server is added for you, in this project only. --scope user adds it to every project; --scope project writes it to .mcp.json in the repo, which you should only commit without secrets.

The Hosted MCP Server (Early Access)

Claude Code already supports remote servers: claude mcp add --transport http <name> <url> --header "Authorization: Bearer ...". The hosted Outreach2day server that will use that command is in early access and has no public URL yet, so there is nothing to paste today. Until it is generally available, the API and the local server above cover the same read jobs. Get early access on the home page.

Prompts to Try in Claude Code

  • "We need to reach 6,000 leads in 4 weeks, 5 sending days a week. How many mailboxes and domains, at 25 cold emails per mailbox per day and 5 mailboxes per domain?"

  • "Check these 20 domain ideas and write the free ones to domains/free.txt. Do not buy."

  • "Show mailboxes whose warm-up started less than 14 days ago, grouped by domain."

  • "Read copy/sequence.md and flag any link, any step without spintax in the subject, and any gap that is not 2, 3, 5 or 5 days."

Fifteen more, grouped by task, are in Claude Code prompts for cold email.

Limits and Safety

  • Rate limits: 10 requests a second, 300 a minute, 1,000 an hour, 10,000 a day per user and per workspace; 429 with Retry-After over the limit.

  • Allow reads, not writes. It is fine to allow curl GETs for good. Keep POST calls, and especially purchases, on "ask every time".

  • Reply text is untrusted. A lead writes it; Claude Code should read it as data, not instructions.

  • One key per tool. Revoke Claude Code's key on the API keys page without touching other integrations.

FAQ

Can Claude Code use an MCP server with an API key in a header?

Yes. claude mcp add --transport http <name> <url> --header "Authorization: Bearer <token>" adds a remote server with a fixed header. OAuth servers are authorised from /mcp inside a session.

Do I need the MCP server, or is the API enough?

The API is enough. Claude Code can call any endpoint with curl. An MCP server gives it named tools with descriptions, which makes repeated questions shorter and lets you strip fields such as passwords in code.

Can Claude Code buy domains or mailboxes?

It can call POST /domains/purchase. Buying domains through the API is paid right away — give an agent a billing-scoped key only if you want it to buy. Mailboxes are ordered in the app.

Is a Claude Code skill the same as an MCP server?

No. A skill is instructions, for example your cold email copy rules. An MCP server gives Claude Code tools that read live data. You can use both: a skill for the rules, the API or a server for domains, mailboxes and warm-up.

Does this also work in Claude Desktop?

Claude Desktop runs local servers from its own config file; see how to connect Claude to cold email.

Create an account, add mailboxes, then create a key for Claude Code.

Get an API key

Free guide

Send 100,000 cold emails a month

How to send 100,000 cold emails a month while keeping quality, engagement and conversion rates high: domains, mailboxes, warm-up, leads, copy and scaling.

Step-by-step playbook · 19 min read
  • Email tools5 min read

    How to Connect Cursor to Cold Email

  • Email tools5 min read

    How to Connect Claude to Cold Email

  • Cold email6 min read

    15 Claude Code Prompts for Cold Email

See deliverability issues before they kill performance

Monitor mailbox health in real time, spot degradation early, and keep warmup, protection, and sending in one place.