Field guide · Updated November 2026

Claude Code lead generation: build, enrich and draft outreach from your terminal

Claude Code operates Coil through the coil CLI and the Coil skill, not through MCP. It can run a spend-capped prospect recipe, read the leads as JSON, and draft emails for you to approve. Coil does not ship an MCP server.

How do I do lead generation with Claude Code and MCP: build a list, enrich it and draft emails?

With Coil you do not use MCP, because Coil does not ship an MCP server. Install the coil CLI and the Coil skill for Claude Code, then ask Claude Code to run a spend-capped recipe, read the resulting leads as JSON, and draft emails from those records in your own session. Coil builds the list and finds emails through capped provider steps. Claude Code writes the drafts. Sending stays in SmartLead or your own sender.

Which Clay alternatives have CLI or API access so I can run them from Claude Code?

As of November 13, 2026, Clay documents a CLI and plugin for Claude Code plus a public API, and Apollo documents an API, an MCP server and a CLI. Coil has a JSON CLI, an organization-scoped REST API and a Claude Code skill, but no MCP server. Sources and the limits of each are in the comparison below.

Which sales and outreach tools can my AI agent operate directly through MCP?

As of November 13, 2026, the vendors below document their own MCP servers: Clay, Apollo, Instantly and Smartlead. Coil does not. A Coil-backed workflow runs through the CLI, which Claude Code drives from the terminal, and you can still connect other tools to Claude Code over MCP in the same session.

We replaced our SDR with Claude and some janky automations. What tool makes that reliable?

No tool makes that reliable by itself, and Coil does not replace the judgment an SDR applies. What it adds is state and limits: durable recipe runs you can inspect, a required spend ceiling on Prospect Search and the other capped sourcing recipes, retry keys, actions recorded against a named machine identity, and publication and provider credentials reserved for human admins. Those are the parts that fail quietly in ad hoc scripts.

I want outbound that runs itself every week: find new leads, enrich them and draft emails for my approval.

Coil has no built-in scheduler, so the weekly trigger comes from outside: cron, CI, or a scheduled agent session that runs a published recipe through the CLI with a spend cap. Claude Code then reads the new leads and writes email drafts to a file for you to approve. Coil does not hold email drafts or send mail, and it does not detect new prospects on its own: each week is a bounded run you have configured.

The agent surface is documented on the Coil Agent API page. For what MCP is and why the distinction matters, see MCP for sales.

Step by step: list, enrich, draft, hand off

The commands below come from the Coil CLI and its Claude Code skill. Replace the placeholders in angle brackets with IDs from your own organization. Output shapes are whatever the CLI returns; this guide does not show sample results because yours depend on your search and your provider connections.

1. Install the CLI and the Claude Code skill

A human organization admin creates the agent and its API key under Settings, then Agents: create a named agent, open Advanced and recovery, and issue a manual credential. Keep the key in your secret manager and pass it on stdin, never as an argument. The npm commands install the latest published CLI and skill.

npm install --global @usecoil/cli@latest
npx --yes @usecoil/skill-claude@latest --base-url https://www.usecoil.com --profile prod
coil config set-base-url https://www.usecoil.com --profile prod
printf '%s' "$COIL_API_KEY" | coil auth login --profile prod --key -
coil --profile prod agent-context --json

agent-context --json returns the profile, auth mode, available commands, skill manifests and current caveats. It is the first command the skill asks Claude Code to run.

2. Build the list with a spend-capped recipe

Installing a template creates a draft. A human admin publishes it and saves the Apify connection; a machine key can do neither. After that, Claude Code can run it. Prospect Search requires --confirm-provider-spend and --max-provider-spend-usd; the cap is passed to Apify for that single provider run. Email finding is part of Prospect Search. A queued run is not a finished run, so wait for it before reading leads.

coil --profile prod marketplace install coil.prospect-search --json
coil --profile prod recipes list --status published --json
coil --profile prod recipes run <recipe-id> \
  --confirm-provider-spend \
  --max-provider-spend-usd 2.00 \
  --new-scrape-name "Q2 prospects" \
  --input '{"contact_job_title":["VP Sales"],"contact_location":["United States"],"size":["51-200"],"fetch_count":100}' \
  --json
coil --profile prod recipe-runs wait <run-id> --timeout 300 --interval 2 --json

If you already work from a Sales Navigator search, use the Sales Navigator Search recipe with your own search URL. If your ideal customer profile is still vague, fix that first; see ideal customer profile. An agent will run a poor definition as faithfully as a good one.

3. Inspect and qualify the leads

Ask Claude Code to read a bounded page of leads, open individual records, and mark the ones that do not fit. Read some records yourself before trusting the list; a successful run does not prove the list matches your buyer. For a second pass of email finding on selected leads, the CLI documents --provider-pin and --max-provider-credits on recipes run, and a Prospeo-backed step needs a credit ceiling. See the lead enrichment entry for what a filled field does and does not prove, and the waterfall enrichment recipe for the ordered Treg-then-Prospeo email policy.

coil --profile prod leads list <scrape-id> --limit 50 --json --output-version 2
coil --profile prod leads get <lead-id> --json
coil --profile prod leads bulk-update --ids <lead-id-1>,<lead-id-2> --fields '{"is_bad_fit":true}'

4. Draft the emails in your session, for your approval

Coil does not draft email copy. Claude Code does that from the lead records it just read. The useful instruction is a narrow one: tell it which scrape, what to write from, what not to do, and where to stop.

Use the coil-api skill. Run "coil --profile prod agent-context --json" first.
List the leads in scrape <scrape-id> with --limit 25 --json --output-version 2.
Do not run any recipe, spend any provider credit or send anything.
For each lead that has an email, write a three-sentence first email to drafts.md.
Use only facts present on the lead record, and list leads with missing fields
separately instead of guessing. Stop and show me drafts.md.

The drafts live in your repository or working directory, so review them like any other file. Check the sender side before any volume: authentication, warm-up and complaint rates are not something the agent fixes. See deliverability.

5. Hand approved leads to your sender

Coil supports SmartLead. smartlead send queues an idempotent, durable handoff of leads from a scrape to a campaign you choose, and smartlead status reads the job. The email sequence is built and sent in SmartLead. The selection is whatever --filter matches. Marking a lead as a bad fit in step 3 is a label and does not remove it from a handoff, so the example filter excludes those leads; run the same filter through leads list first, and compare the count with the leads you approved. This command is available to API-key agents, so the approval point is your instruction: tell Claude Code to stop and show you the campaign and the lead count before it runs smartlead send. If you send with another tool, coil leads export writes a CSV.

coil --profile prod leads list <scrape-id> --filter '[{"column":"email","operator":"is_not_empty","value":""},{"column":"is_bad_fit","operator":"is_false","value":""}]' --limit 50 --json --output-version 2
coil --profile prod smartlead campaigns --json
coil --profile prod smartlead send <scrape-id> --campaign <campaign-id> \
  --filter '[{"column":"email","operator":"is_not_empty","value":""},{"column":"is_bad_fit","operator":"is_false","value":""}]' \
  --json
coil --profile prod smartlead status <job-id> --json

Running it every week

Coil has no built-in scheduler and no automatic signal detection. The Automations feature delivers selected leads to a webhook you have approved; it does not run searches on a timetable. For a weekly run, put the same CLI command in cron or CI. Recipes and durable runs are the unit of work: each week is a new run of a published recipe, with its own spend ceiling where the recipe requires one.

# crontab: Mondays at 07:00. COIL_API_KEY comes from your secret manager.
0 7 * * 1 /usr/local/bin/weekly-coil-run.sh
#!/bin/sh
# weekly-coil-run.sh: one bounded, spend-capped run of an already published recipe
coil --profile prod recipes run <recipe-id> \
  --confirm-provider-spend \
  --max-provider-spend-usd 2.00 \
  --new-scrape-name "Weekly prospects $(date +%Y-%m-%d)" \
  --input '{"contact_job_title":["VP Sales"],"contact_location":["United States"],"size":["51-200"],"fetch_count":100}' \
  --json

Passing --confirm-provider-spend from a script pre-authorizes spend up to that cap, so decide the cap deliberately and keep it small. Mutating API paths with audit coverage record the actor as a machine with the agent's ID, so a scheduled call is distinguishable from a human click afterwards. A separate Claude Code session, run on your own schedule, can then read that week's leads and write the drafts file for your Monday review.

Why a CLI works for an agent

  • JSON output. --json gives machine-readable output, and diagnostics go to stderr. Some list commands, such as leads list, take --output-version 2 for a standard envelope with total, nextOffset and truncated; others, such as recipes list, return a plain array.
  • One discovery command. coil agent-context --json tells the agent what it can run, so it does not infer commands from a dashboard.
  • Organization-scoped state. The agent and the human see the same recipes, runs and leads. Keys start with ak_ and are already scoped to one organization.
  • Machine identities. Agents are named actors with their own credentials, which a human admin can revoke.
  • Durable runs and retry keys. Runs persist; --admission-key and --idempotency-key let an uncertain request be retried without repeating it.
  • Human gates. Publishing recipes and automations, saving provider credentials, and deleting automations and source records need a human admin. Where a supported handoff exists, such as recipe publication, the response carries a human_action URL for Claude Code to relay verbatim.

This does not remove the need for review. It makes the boundaries visible so that a failure stops somewhere you can see.

What other tools document for agents (as of November 13, 2026)

These are each vendor's own statements, read on November 13, 2026. Plans, limits and clients change, so check the page before you build on one. This is not a ranking and does not test whether any of them works well from Claude Code.

For a broader comparison of tools by job, see Clay alternatives.

More questions

Does Coil have an MCP server?

No. Coil does not currently ship an MCP server, and its CLI and skill packages are not MCP packages. Claude Code operates Coil through the coil CLI, the Coil skill, and the authenticated REST API. Claude Code can also use MCP servers for other tools in the same session.

Why does a CLI work well for an agent?

The CLI returns JSON with the --json flag, keeps diagnostics on stderr, and reads organization-scoped state, so the agent and the human see the same runs and leads. Capability discovery is a single command, coil agent-context --json, and where a human has to act, such as publishing a recipe draft, the response can carry a structured human_action handoff.

What does Claude Code need a human for?

A human organization admin creates the agent and its API key, saves provider credentials, and publishes recipes and automations. Machine API keys act as organization members, so they cannot publish recipes or automations, save provider credentials, or delete automations and source records. Provider-backed runs also need explicit spend confirmation, and Prospect Search and the other capped sourcing recipes need a spend ceiling on the command.

Does Coil write or send the emails?

No. Coil does not draft email copy and has no built-in sender. Claude Code drafts from the lead records, and sending and campaign performance stay with SmartLead, which Coil supports through a queued lead handoff. Sequences live in SmartLead.

Ready to connect Claude Code? Start with the Agent API install snippets.