🚀 AI-Powered Sales Automation: Configuring Claude Code & Instantly MCP for Instant Lead Gen
TL;DR. Automate outbound sales with Claude Code and Instantly.ai. Discover how to use MCP and the Cursor IDE to build autonomous lead generation workflows.
Published: Mar 23, 2026, 09:03 AM · Updated: Jun 28, 2026
Topic: Sales Automation
Source: https://www.youtube.com/watch?v=rRJNr9rxeGs
📋 Overview
- Type: Technical Tutorial / Strategic Workshop
- Main Topic: Leveraging an IDE (Cursor) and Claude Code to autonomously ingest leads, segment audiences, write cold email copy, and launch campaigns in Instantly.ai via MCP.
- Speakers: Sales Development / Agency Expert (from "Top of Funnel").
🎯 Core Purpose & Context
The goal of this session is to move beyond manual Sales Development Representative (SDR) work. The speaker demonstrates a high-leverage workflow where an AI Agent (Claude Code) acts as the operator. Instead of clicking buttons in a SaaS dashboard, the user sets up a local environment where the AI analyzes data, makes strategic decisions (segmentation), writes copy, and executes campaign creation directly via API/MCP.
🧠 Key Concepts & Technical Stack
Core Concepts
- IDE (Integrated Development Environment): The workspace used. The speaker prefers Cursor over VS Code for its ability to visualize code, CSVs, and browsers in a single window.
- R.T.O. Framework: The prompting strategy used to program the AI:
- Role: Who is the AI? (e.g., "Mastermind Sales Developer").
- Task: What specifically needs to be done? (e.g., "Analyze CSV and create campaigns").
- Output: What is the deliverable? (e.g., "Active campaigns in Instantly").
- MCP (Model Context Protocol): The technical standard that allows the AI (Claude) to "talk" to external tools (Instantly.ai) safely and structurally via API.
Figure 1: The full automation stack — Claude Code acts as the operator, using MCP as the bridge between local lead data and Instantly.ai campaign execution.
The "Rules of Engagement" for Cold Email (Defined in Prompt)
- Length: 80–100 words maximum.
- Tone: Zero small talk ("I hope this finds you well" is banned).
- Structure: High value, soft Call to Action (CTA).
- Goal: Move from cold to warm lead status; start a conversation, don't just sell.
⚡ Step-by-Step Implementation Guide
Phase 1: Environment Setup
- Select IDE: Open Cursor (recommended for speed/shipping).
- Directory Setup: Create a new empty folder on your local machine (e.g., "Claude Code Demo") and open it in the IDE.
- Data Import: Drag and drop your
.csvlead list into this folder. - Launch Terminal: Open the terminal within Cursor (using the VS Code plugin for Claude Code).
Phase 2: Role "Injection" (The Matrix Moment)
You must "initialize" the project by setting the context.
- Action: Use the RTO framework to tell Claude it is a "Sales Mastermind."
- Specific Instruction: "You are a professional marketer. Cut the small talk. Focus on high-value propositions."
Phase 3: Connecting the MCP (Instantly.ai)
- Get API Key: Go to Instantly.ai -> Settings -> Integrations -> API Keys -> Create New (Give full scopes used for demo).
- Install MCP: Run the command in the terminal:
claude mcp add [transport streamable http] [URL provided by Instantly] - Scope: Set to "Project Level" (not global) so this API key is only accessible within this specific folder/client project.
- Verify: Run
/mcpor ask Claude "Do you have access to Instantly MCP?" to confirm tool availability.
Figure 4: The Mega-Prompt execution loop — Claude autonomously moves from raw CSV data to live segmented campaigns, pausing only for human copy approval before API deployment.
Phase 4: Execution (The Loop)
- Prompt: asking Claude to read the CSV.
- Analyze: Claude analyzes the leads and decides on segmentation (e.g., "Decision Makers" vs. "Influencers").
- Create: Claude generates the emails in a Markdown file (
.md) for review. - Deploy: Claude uses the MCP to actually create the campaigns inside the Instantly account and upload the leads to the specific campaigns.
🧭 Strategic Analysis & "Game Changers"
🧐 Hidden Connections
- The Death of the Drag-and-Drop Interface: The speaker implies a future where we interact less with UI (User Interfaces) and more with CLI (Command Line Interfaces) driven by natural language. We are bypassing the "Instantly" dashboard entirely until the verification stage.
- Local Privacy / Cloud Execution: By keeping the environment local (on the hard drive) but using MCP to touch the SaaS, the user maintains better control over data files (CSVs) while leveraging cloud power.
💡 The "So What?"
This workflow changes the unit of labor. An SDR typically spends hours cleaning lists, segmenting rows in Excel, writing copy, and uploading to a tool. This workflow condenses 2-3 hours of manual work into 5 minutes of prompt engineering. It allows a single person to function as an entire Lead Gen agency.
Figure 3: MCP transforms Claude from a text generator into a software operator — collapsing hours of manual SDR work into a single prompt execution.
🚀 The Game Changer: Model Context Protocol (MCP)
The true revolution here isn't the AI writing the email; it's the MCP connection.
- Before MCP: You ask ChatGPT to write an email -> Copy -> Paste into Instantly -> Upload CSV -> Map fields manually.
- With MCP: You ask Claude to "do the campaign." Claude is the software operator. It executes actions, not just text generation.
📊 Detailed Breakdown
[00:00:00] Introduction & Tool Selection
- Context: Code capabilities for operational tasks (not just building apps).
- Tool Choice: Cursor is selected as the IDE because it handles visualization of code and CSVs faster than VS Code or Windsurf using "Yell Mode" (term for high-velocity coding).
- The Goal: Launch a lead gen campaign using Claude Code.
[00:01:03] Project Initialization
- Setup: Create an empty folder -> Open in Cursor.
- Data Entry: A CSV of leads is present in the folder.
- Why Cursor?: It integrates the browser and terminal in one window, allowing for better "Context" (the AI sees the files and the folder structure).
Figure 2: The RTO Framework — structuring your AI prompt with a defined Role, Task, and Output is the foundation of high-conversion cold outreach automation.
[00:02:40] "RTO" - Defining the Persona
- The Prompt: The user speaks to the AI to define the Role, Task, and Output.
- The Persona: "You are a mastermind when it comes to sales development... you are a professional marketer."
- Strict Rules:
- No "I hope this finds you well."
- No small talk.
- Emails must be 80-100 words.
- Focus on "Cold to Warm" conversion.
- The Handshake: The user asks Claude to confirm understanding before executing creates a feedback loop to prevent errors.
[00:06:17] Creating the Logic (claud.md)
- Action: Claude creates a
claud.mdfile. This acts as the "Brain" or "Constitution" for the project. - Tech Tip: Use
Shift + Command + Vin Cursor to preview Markdown files beautifully. - Strategy: "Injecting skills almost like Matrix to Neo." You are saving your strategic brain into a file that the AI references for every future task in this folder.
[00:08:00] Installing the Instantly MCP
- Process: The user grabs the MCP URL (
https://mcp.instantly.ai...) and generates an API key from Instantly. - Security Note: The speaker discusses "Project Level" vs. "User Level" installation.
- Strategic Insight: Always use Project Level for agencies. You don't want Client A's API key active when working on Client B's folder.
- Verification: The user runs a check to ensure
Instantly MCPis listed in the available tools.
[00:12:51] The Execution Prompt (The "Mega-Prompt")
- Input: The user drags
sample_leads.csvinto the context. - Complex Instruction:
- Analyze: Look at the CSV.
- Score: Rate leads (Decision Maker vs. Influencer).
- Segment: Split them into valid groups.
- Copywrite: Write specific emails for those segments (referencing the Air Force case study).
- Execute: Create the campaigns in Instantly and push the leads there.
- Constraint: "Stop for verification." The user wants to approve the copy before the API sends it to the tool.
[00:13:37] Real-Time Automation
- Observation: Claude reads the CSV, identifies 20 leads, and splits them into "Executive Tier 1" and "Influencer."
- Action: Claude creates two separate campaigns in Instantly via the API.
- Resource Allocation: Claude asks to assign sender accounts (Email inboxes). The user specifies adding 10 accounts to the campaign.
[00:14:15] Quality Assurance
- Copy Review: The user reviews the generated email copy in the markdown preview.
- Tweaking: The user notices the sequence logic (Follow-up 1, Follow-up 2) needs a slight adjustment in the Subject Line ("Re:" vs standard).
- Final Result: The campaigns are live in the Instantly Dashboard with leads uploaded, schedules set, and copy written.
🔑 Key Takeaways
- RTO is Non-Negotiable: Without setting a strong Role, Task, and Output (the "Constitution" file), the AI will generate generic, low-conversion outreach. You must "inject" your expertise first.
- The Rise of MCP: The ability for an LLM to add leads and create campaigns via API (without the user touching the UI) is the future of admin automation.
- Segmentation at Speed: The AI didn't just "upload" the list; it analyzed the job titles and split them into Tier 1 and Tier 2 campaigns automatically. This used to be a tedious manual CSV task.
- Project-Level Security: When using MCPs, always confine API keys to the
Projectlevel to prevent cross-contamination of client data. - Visual Verification: Using a Markdown previewer (
.md) is a superior way to audit AI-generated copy before verifying the API push.
❓ Unresolved Questions / Follow-up
- Cost Scaling: How many tokens does Claude Code consume when processing a CSV of 5,000+ rows? Is it cost-effective compared to traditional scripts?
- Error Handling: What happens if the CSV data is dirty (missing names, bad formatting)? Does the agent halt, or does the proper handling need to be defined in the
claud.mdrules? - Sender Account Rotation: The AI added "10 accounts," but did it intelligently select which accounts based on domain health, or did it just grab the first 10?
Tags: AI Automation, Claude Code, Cursor IDE, Cold Email Strategy, MCP (Model Context Protocol)
Frequently Asked Questions
What is MCP (Model Context Protocol) and why does it matter for sales automation?
MCP, or Model Context Protocol, is a technical standard that lets an AI like Claude communicate with external tools such as Instantly.ai safely and structurally via API. Its significance is that it transforms Claude from a text generator into a software operator, allowing it to actually create campaigns and upload leads rather than just writing copy you must copy and paste manually. This bypasses the SaaS dashboard entirely until the verification stage.
What is the RTO framework for prompting AI in cold email campaigns?
RTO stands for Role, Task, and Output, a prompting strategy used to program the AI. Role defines who the AI is (for example, a Mastermind Sales Developer), Task specifies what needs to be done (such as analyzing a CSV and creating campaigns), and Output defines the deliverable (active campaigns in Instantly). Setting a strong RuO acts as the project's constitution, without which the AI generates generic, low-conversion outreach.
How do you connect Instantly.ai to Claude Code using MCP?
First generate an API key in Instantly by going to Settings, then Integrations, then API Keys, and creating a new key with full scopes. Then run the command 'claude mcp add' with the streamable HTTP transport and the URL provided by Instantly, setting the scope to Project Level so the key is only accessible within that specific folder. Finally verify access by running /mcp or asking Claude whether it has access to the Instantly MCP.
What are the rules for cold email copy in this AI workflow?
Cold emails should be a maximum of 80 to 100 words with zero small talk, meaning phrases like 'I hope this finds you well' are banned. The structure should deliver high value with a soft call to action, and the goal is to move a lead from cold to warm status by starting a conversation rather than just selling. These rules are defined directly in the prompt so the AI follows them consistently.
Why should you use Project Level rather than global scope for MCP API keys?
You should always confine API keys to the Project Level to prevent cross-contamination of client data. This ensures that one client's API key is not active when you are working on another client's folder, which is especially important for agencies managing multiple accounts. Project Level scope keeps each API key accessible only within its specific folder or client project.
Glossary
- Claude Code
- An advanced AI coding agent designed to operate in a terminal, manage files, and execute complex workflows beyond simple text generation.
- Cursor
- A code editor (IDE) optimized for AI-assisted development, offering features like 'Yell Mode' and better visualization of code and data.
- MCP
- Model Context Protocol. A standard allowing AI models to connect to and control external tools, data sources, and APIs securely.
- Instantly
- A cold email outreach platform used for sending mass emails, warming up accounts, and managing lead campaigns.
- RTO
- Role, Task, Output. A prompting framework used to set up the AI's persona and improved context and deliverables.
- IDE
- Integrated Development Environment. Software for building applications that combines common developer tools into a single GUI (e.g., VS Code, Cursor).
- CSV
- Comma Separated Values. A simple file format used to store tabular data, such as a spreadsheet or database of leads.
- Spokenly
- A speech-to-text application used to rapidly dictate prompts and context to the AI.
- Opus 4.5
- Likely referring to a specific high-performance version of the Claude AI model family (Claude 3.5 Sonnet/Opus) noted for copywriting quality.
- Bash Command
- A text-based command used in the Unix shell to instruct the operating system to perform tasks, often executed by Claude Code.
- Markdown (.md)
- A lightweight markup language for creating formatted text using a plain-text editor, used here for documenting plans and email copy.
- API Key
- A unique identifier used to authenticate a user, developer, or calling program to an API (like Instantly's).
- Scope
- The specific permissions granted to an API key, determining what data or actions the key can access.
- Project Level
- A configuration setting that applies changes or installs tools only to the current working directory, not the entire system.
- Transport HTTP
- The communication method used by the MCP server to transmit data between the AI and the external tool.
- Decision Maker Level
- A ranking or attribute used to classify leads (e.g., Executive vs. Manager) to tailor messaging strategies.
- Value Proposition
- A statement summarizing why a consumer should buy a product or service, focused on solving problems (saving time/money).