Claude Code can help you build and operate a B2B lead generation workflow, but it should not be treated as another contact database.

On its own, Claude Code can research companies, process prospect lists, apply your Ideal Customer Profile criteria, remove duplicates, score accounts, and prepare personalised outreach.

When connected to lead data and sales platforms through the Model Context Protocol, or MCP, it can also search for contacts, enrich emails and phone numbers, and move approved prospects into an outreach campaign.

A practical workflow looks like this:

Leadsforge finds and enriches prospects → Claude Code cleans, researches, and prioritises them → Salesforge prepares and runs the outreach → your email infrastructure and deliverability tools support sending.

Claude Code becomes the operating layer between these systems. It translates your instructions into actions, applies your rules consistently, and reduces the manual work involved in moving from an ICP to an outreach-ready prospect list.

This guide explains how to set up that workflow, what Claude Code can realistically automate, and where human review is still necessary.

TL;DR: Can Claude Code Generate B2B Leads?

Yes, Claude Code can help generate and qualify B2B leads, but it does not contain a proprietary database of verified business contacts. Depending on the tools and permissions available, Claude Code can research companies using public information. However, if you need verified work emails, phone numbers, LinkedIn profiles, firmographic data, or scalable contact search, you will need to connect it to an external lead data platform.

With the right connections, Claude Code can help you:

  • Convert your ICP into structured company and contact criteria.
  • Search a connected B2B contact database.
  • Review prospects before spending enrichment credits.
  • Enrich shortlisted contacts with emails, phone numbers, or LinkedIn profiles.
  • Standardise job titles and company names.
  • Identify duplicate and incomplete records.
  • Score prospects against your qualification rules.
  • Research high-priority accounts.
  • Prepare approved contacts for Salesforge.
  • Create sequences and campaign drafts for review.

Claude Code can determine whether a contact appears to match your ICP. It cannot confirm that the person has an active budget, purchase authority, or genuine interest in buying until you receive stronger intent signals or engage them in a sales conversation.

What Claude Code Actually Does in a Lead Generation Workflow

Claude Code is an agentic tool that can read and create files, run commands, execute scripts, use web tools, and interact with external services. Through MCP, it can connect directly to tools, databases, and APIs rather than relying only on information pasted into a chat.

For lead generation, its role can be divided into three areas.

1. Reasoning and decision-making

Claude Code can take a written ICP and convert it into structured rules. For example, you might describe your audience as:

Heads of Sales and Revenue Operations leaders at B2B SaaS companies in the United States with 50 to 500 employees.

Claude Code can turn this into:

  • Target industries.
  • Company-size ranges.
  • Geographic filters.
  • Suitable job titles.
  • Seniority levels.
  • Excluded industries.
  • Excluded job functions.
  • Required and optional fields.
  • Lead-scoring criteria.

This makes your prospecting process more repeatable than manually rebuilding the same filters every time.

2. Data processing and research

Claude Code can work with prospect data stored in CSV files, spreadsheets, databases, or connected sales tools.

It can:

  • Clean inconsistent company names.
  • Normalise job titles.
  • Match records using email addresses, LinkedIn URLs, domains, and names.
  • Detect likely duplicates.
  • Flag missing information.
  • Research priority accounts.
  • Separate confirmed facts from assumptions.
  • Generate structured summaries for sales representatives.

It can also run scripts when a task requires deterministic processing, such as validating a CSV structure or applying a fixed scoring formula.

3. Workflow execution

Once Claude Code is connected to your sales tools, it can take actions rather than merely recommend them.

The Forge MCP Server, for example, provides access to supported capabilities across Leadsforge, Salesforge, Mailforge, Primeforge, Infraforge, and Warmforge through one MCP endpoint.

Available capabilities include contact search, enrichment, lookalike search, contact and sequence management, mailbox operations, and deliverability data. You only need to provide API keys for the products you use.

This means a single Claude Code session can potentially move through the entire process:

Define the ICP → search for contacts → enrich approved records → qualify the results → research accounts → prepare the campaign.

Claude code session workflow example
This image shows the Claude code session workflow example

What Claude Code Can and Cannot Do

Claude Code Can Help With Claude Code Cannot Guarantee
Turn your ICP into structured criteria Access to a proprietary contact database without a connected provider
Research publicly available company information That every piece of public information is current
Search connected sales and lead tools That every returned contact is a good prospect
Clean, organise, and deduplicate records A verified email or phone number without an enrichment source
Apply lead-scoring rules That a prospect has budget or buying authority
Explain why a prospect received a score That an ICP match is ready to buy
Prepare account summaries and outreach angles That every personalisation detail is accurate without verification
Move approved contacts between connected tools Safe campaign execution without permissions and approval controls
Create campaign and sequence drafts Strong deliverability without healthy sending infrastructure
Summarise responses and update workflows Replace human sales conversations

The important distinction is between fit and qualification. Claude Code can assess whether someone fits your documented ICP based on available information. A prospect only becomes genuinely qualified once you have stronger evidence, such as confirmed need, authority, timing, budget, engagement, or a relevant buying signal.

What You Need Before Using Claude Code for Lead Generation

What you need before using Claude Code for lead generation
This image shows what you need before using Claude Code for lead generation

You do not need to build a complicated sales system before starting. However, Claude Code needs clear instructions and controlled access to the right tools. Prepare the following first.

Claude Code access

Install Claude Code or use one of its supported environments. The terminal version gives you direct control over local files, commands, scripts, and MCP configurations.

A documented ICP

Your ICP should define more than an industry and job title. Include:

  • Target industries.
  • Company size.
  • Company location.
  • Revenue or funding requirements, when relevant.
  • Target departments.
  • Suitable job titles.
  • Required seniority.
  • Technologies used.
  • Relevant business signals.
  • Excluded company types.
  • Excluded job titles.
  • Existing customers and competitors.
  • Disallowed countries or markets.

Access to a lead data source

Claude Code needs a connected source if you want it to retrieve verified B2B contact data at scale. Leadsforge supports natural-language ICP search, contact enrichment, lookalike search, competitor-follower search, intent signals, and exports to Salesforge or CSV.

Its enrichment options include work emails, LinkedIn profiles, and mobile numbers.

A destination for approved prospects

Decide where qualified records should go. This could be:

  • A CSV file.
  • Your CRM.
  • A sales engagement platform.
  • A Salesforge contact list.
  • A specific outbound sequence.
  • A manual approval queue.

Credit and spending rules

Lead enrichment can become expensive when an automated workflow enriches every returned record. Define:

  • The maximum number of contacts per search.
  • Which fields can be enriched.
  • The maximum credits allowed per run.
  • Whether phone enrichment is necessary.
  • The minimum fit score required before enrichment.
  • When Claude Code must request approval.

Suppression and exclusion lists

Your workflow should check prospects against:

  • Existing customers.
  • Open opportunities.
  • Previous unsubscribes.
  • Do-not-contact lists.
  • Employees.
  • Partners.
  • Competitors.
  • Previously rejected prospects.

Without this step, automation can make your workflow faster while also making your mistakes faster.

How to Connect Claude Code to Leadsforge and Salesforge

Claude Code connects to external tools through MCP. MCP servers allow it to discover and use the actions exposed by a connected platform.

Anthropic currently recommends HTTP for remote MCP servers. Claude Code supports authentication headers, environment-variable expansion, local or project-level configurations, and the /mcp command for checking server status.

Step 1: Generate your API keys

Generate API keys for the Forge products you intend to use.

For a basic lead generation workflow, you will normally need:

Generate Leadsforge API key
This image shows the Generate Leadsforge API key
  • A Salesforge API key if you want to create contacts, sequences, or enrolments.
Generate Salesforge API key
This image shows the Generate Salesforge API key

You do not need to connect products that are not part of your workflow.

Step 2: Add the Forge MCP Server

You can add the server through the Claude Code command line.

claude mcp add --transport http \
  --header "X-Leadsforge-Key: YOUR_LEADSFORGE_API_KEY" \
  --header "X-Salesforge-Key: YOUR_SALESFORGE_API_KEY" \
  forge https://mcp.salesforge.ai/mcp

Remove the Salesforge header if you only want to use Leadsforge. For frequent or team usage, avoid placing credentials directly in a shared configuration file. Claude Code supports environment-variable expansion inside .mcp.json, allowing you to keep the configuration shareable without committing the underlying keys.

An example configuration looks like this:

{
  "mcpServers": {
    "forge": {
      "type": "http",
      "url": "https://mcp.salesforge.ai/mcp",
      "headers": {
        "X-Leadsforge-Key": "${LEADSFORGE_API_KEY}",
        "X-Salesforge-Key": "${SALESFORGE_API_KEY}"
      }
    }
  }
}

Set the keys as environment variables on your machine:

export LEADSFORGE_API_KEY="your-leadsforge-api-key"
export SALESFORGE_API_KEY="your-salesforge-api-key"

Do not paste API keys into ordinary Claude Code prompts, store them in prospect files, or commit them to a public repository.

Step 3: Verify the connection

Start Claude Code and run:

/mcp

Confirm that the Forge server is connected and that its tools are available.

You can also run a read-only test prompt:

List the available Leadsforge and Salesforge tools.

Do not search for contacts, enrich data, create records, or make any

changes. Only explain what each available tool can do.

This confirms the connection before you spend credits or make changes to your workspace.

Create a CLAUDE.md File for Your Lead Generation Rules

One-off prompts are useful, but they are not enough for a repeatable workflow.

Create a dedicated project folder for lead generation and add a CLAUDE.md file containing your permanent prospecting rules.

Here is a template:

# B2B Lead Generation Rules
## Our product

We sell:

[Describe your product in two or three sentences.]

Primary outcome:

[Explain the business result your product creates.]

## Target companies

Industries:

- B2B SaaS
- Sales technology
- Marketing technology

Company size:

- 50 to 500 employees

Locations:

- United States
- Canada
- United Kingdom

Required characteristics:

- Sells to other businesses
- Has an established sales team
- Uses outbound or account-based sales
## Target contacts

Priority roles:

- VP of Sales
- Head of Sales
- VP of Revenue
- Head of Revenue Operations
- Director of Sales Development

Minimum seniority:

- Director

## Exclusions

Exclude:

- Agencies
- Recruitment firms
- Consultants
- Freelancers
- Companies with fewer than 50 employees
- Existing customers
- Open opportunities
- Competitors
- Contacts on our suppression list

## Required output fields

For every prospect, return:

- Full name
- Job title
- Company
- Company domain
- Location
- Employee range
- LinkedIn URL
- Work email, when approved for enrichment
- Phone number, only when explicitly requested
- Fit score
- Data-confidence level
- Reason for inclusion
- Missing information
- Recommended next action

## Credit rules

- Search before enriching.
- Do not enrich more than 25 contacts without approval.
- Do not enrich phone numbers unless explicitly instructed.
- Do not enrich records with a fit score below 70.
- Show the estimated action and record count before using credits.

## Approval rules

Always request approval before:

- Enriching more than 25 records.
- Creating or updating a Salesforge sequence.
- Enrolling contacts into a campaign.
- Sending or scheduling outreach.
- Deleting or merging uncertain records.

## Data-quality rules

- Never invent missing values.
- Mark unknown fields as unknown.
- Separate verified facts from assumptions.
- Flag uncertain duplicate matches for manual review.
- Do not describe a prospect as sales-qualified based only on ICP fit.

This file gives Claude Code a stable operating policy. You can update the ICP, exclusions, scoring rules, or credit limits without rewriting them in every prompt.

Complete Claude Code Lead Generation Workflow

Once your tools and rules are connected, you can operate the workflow in stages.

Do not ask Claude Code to search, enrich, qualify, research, and launch a campaign in one uncontrolled instruction. Separate the work into reviewable steps.

Step 1: Convert Your ICP Into Search Criteria

ICP to Search criteria cycle
This image shows the ICP to Search criteria cycle

Start by asking Claude Code to interpret your ICP. Read our CLAUDE.md file and convert the ICP into proposed company and contact search criteria.

Return:

1. Company filters.
2. Contact filters.
3. Included job titles.
4. Excluded job titles.
5. Company exclusions.
6. Any ambiguous criteria that could affect the results.

Do not search for contacts yet. Wait for approval. Review the proposed criteria carefully.

Claude Code may interpret phrases such as “mid-market,” “technology company,” or “decision-maker” differently from you. Resolving those ambiguities before running the search will produce a cleaner list.

Step 2: Search for Matching Prospects

Once the criteria are approved, run an initial search without unnecessary enrichment. Use the approved criteria to search Leadsforge for up to 100 matching contacts.

At this stage:

- Do not enrich phone numbers.
- Do not create records in Salesforge.
- Do not enrol anyone into a sequence.
- Do not use more than the minimum data required for the initial search.

Return:

- The total number of matches.
- The filters used.
- A sample of 20 contacts.
- Any filters that were unavailable or interpreted differently.
- Missing fields that may affect qualification.

The purpose of this step is to inspect the quality of the search before using additional credits. Check whether:

  • The companies genuinely match your market.
  • The job titles are relevant.
  • The seniority is appropriate.
  • The locations are correct.
  • Excluded businesses are appearing.
  • The result set is too broad or narrow.

Refine the search before moving forward.

Step 3: Pre-Qualify Before Enrichment

Do not enrich every contact returned by the search.

Ask Claude Code to score the initial records using only the available company and contact data.

A simple 100-point model could look like this:

Category Maximum Score
Company fit 35
Role and seniority fit 25
Geographic fit 10
Relevant business or buying signal 20
Data completeness and confidence 10

Example instructions:

Score each prospect against the qualification model in CLAUDE.md.

For every record:

- Show the total score.
- Explain the reason for the score.
- Mark every missing value as unknown.
- Do not infer employee count, revenue, funding, or technology usage.
- Flag prospects that require manual review.

Group the results into:

- Priority A: 80 to 100
- Priority B: 65 to 79
- Priority C: Below 65

Do not enrich any contact yet.

This is pre-qualification, not final sales qualification. The score tells you how closely the available record matches your ICP. It does not prove that the prospect is actively looking for your product.

Step 4: Enrich Only the Shortlisted Contacts

Once the shortlist looks accurate, enrich the contacts you realistically intend to approach.

Enrich the Priority A prospects with:

- Verified work email.
- Confirmed LinkedIn profile.

Do not enrich phone numbers.

Before taking action, report:

- The number of contacts that will be enriched.
- The fields that will be requested.
- Any records that should be excluded.
- The expected credit impact, when available.

Wait for my approval before running the enrichment. For phone-based campaigns, create a separate enrichment step. Phone data normally has a different cost and should not be retrieved automatically for every contact.

Leadsforge supports contact search together with email, phone, and LinkedIn enrichment, while also offering lookalike and competitor-follower workflows. This makes it possible to restrict enrichment to the specific data required for each campaign.

Step 5: Clean and Deduplicate the Results

After enrichment, clean the records before they reach your outreach platform. Clean and deduplicate the enriched prospect list. Use the following matching order:

1. Work email.
2. LinkedIn profile URL.
3. Company domain plus full name.
4. Normalised company name plus full name.

Standardise:

- Company names.
- Job titles.
- Country names.
- LinkedIn URLs.
- Website domains.

Do not delete uncertain matches. Create a separate manual-review group for records that may be duplicates but cannot be matched confidently.

Claude Code can also compare the records against existing customer, opportunity, unsubscribe, and suppression files. Do this before creating contacts in Salesforge.

Step 6: Research the Highest-Priority Accounts

Target account research
This image shows the Target account research

Not every shortlisted prospect needs extensive account research. Focus deeper research on the accounts where personalisation is most likely to improve the message or help the sales representative understand the opportunity.

Research the Priority A accounts using current, publicly available information. For every company, provide:

- What the company sells.
- Its primary customer type.
- Relevant recent company changes.
- Current hiring activity related to sales or growth.
- Confirmed technology or process signals.
- A potential outreach angle.
- Source and publication date for every time-sensitive claim.

Rules:

- Use only information that can be verified.
- Do not infer a problem merely because the company fits our ICP.
- Label assumptions separately.
- Do not use generic compliments.
- Do not mention information that would feel intrusive in an email.

The goal is not to generate a long company report. It is to find one or two confirmed facts that make the outreach more relevant.

Step 7: Prepare the Approved Prospects for Salesforge

Once the data has been reviewed, Claude Code can prepare or create the relevant records in Salesforge. Prepare the approved Priority A prospects for Salesforge.

Before creating anything:

- Check the suppression list again.
- Exclude existing customers and open opportunities.
- Exclude records without a verified email.
- Show the final number of contacts.
- Show the field mapping.
- Flag any records with incomplete required fields.

Wait for approval before creating contacts.

After the contacts are approved, you can ask Claude Code to create a campaign draft.

Create a draft two-step email sequence for the approved contacts.

Use:

- Our value proposition from CLAUDE.md.
- The approved messaging guidelines.
- Only verified personalisation details.
- Plain-text emails.
- One clear call to action.

Do not enrol contacts, activate the sequence, or schedule sending.

Create the sequence as a draft for manual review.

The Forge MCP Server supports Salesforge operations involving contacts, sequences, mailboxes, sender profiles, enrolments, email validation, and do-not-contact lists. Write actions should still be protected by clear approval rules.

A Complete Claude Code Lead Generation Prompt

The following prompt combines the research and qualification stages while preserving approval gates.

Act as a B2B lead operations agent.

Read and follow every rule in CLAUDE.md.

Objective:

Build a shortlist of prospects matching our ICP and prepare the approved
records for outreach.

Workflow:

1. Convert the ICP into structured company and contact filters.
2. Show the filters and exclusions before searching.
3. Wait for approval.
4. Search Leadsforge for up to [NUMBER] prospects.
5. Do not enrich phone numbers.
6. Do not create or update Salesforge records.
7. Score every prospect against our qualification model.
8. Mark missing information as unknown.
9. Separate the results into Priority A, B, and C.
10. Recommend which contacts should be enriched.
11. Report the number of records and requested fields before using
    enrichment credits.
12. Wait for approval.
13. Enrich only the approved contacts.
14. Clean and deduplicate the enriched results.
15. Check every contact against our exclusions and suppression list.
16. Research only the approved Priority A accounts.
17. Use verified public information and include the source date for
    time-sensitive claims.
18. Prepare the final contacts for Salesforge.
19. Wait for approval before creating contacts, sequences, or enrolments.

Required output for every prospect:

- Full name
- Job title
- Company
- Company domain
- Company location
- Company size
- LinkedIn URL
- Work email
- Fit score
- Data-confidence level
- Reason for inclusion
- Missing information
- Research angle
- Recommended next action

Never:

- Invent missing information.
- Treat an ICP match as sales-qualified.
- Spend enrichment credits without approval.
- Contact existing customers or suppressed prospects.
- Create or launch outreach without approval.

This prompt is intentionally restrictive. A useful lead generation workflow should prevent incorrect or expensive actions, not merely execute tasks quickly.

Recommended Prospect Output Format

Ask Claude Code to return results in a consistent structure.

Field Example
Full name Jane Smith
Job title VP of Sales
Company Example Software
Company domain examplesoftware.com
Employee range 100–250
Location United States
Work email Verified after approval
LinkedIn URL Confirmed
Fit score 86/100
Data confidence High
Inclusion reason Correct industry, company size, location, role, and seniority
Missing information Current sales-team size
Research angle Recently expanded its outbound sales team
Next action Add to manual outreach review

A consistent format makes it easier to export the results, compare batches, audit decisions, and identify where your workflow is producing weak leads.

MCP vs API vs Agent SDK

Claude Code workflows can be implemented in several ways.

Method Best For Main Advantage Main Limitation
MCP Interactive prospecting and sales operations Use connected tools through natural-language instructions. Results depend on tool permissions and the quality of your instructions.
Direct API Deterministic internal applications Precise control over requests, fields, errors, and application logic. Requires more development.
Claude Agent SDK Production agents and repeatable automated workflows Programmatic control over tools, permissions, sessions, costs, and output. Requires engineering and operational monitoring.
Scheduled Claude Code tasks Recurring research and operational checks Runs saved workflows on a schedule. Requires careful permissions and exception handling.

Anthropic describes the CLI as suitable for interactive and one-off work, while the Agent SDK is designed for custom applications, CI/CD, and production automation. The SDK can also connect to external MCP servers and restrict which tools an agent is allowed to use.

You do not have to choose only one method. A common approach is:

  • Build and test the workflow interactively with Claude Code and MCP.
  • Move stable data-processing logic into scripts or direct API calls.
  • Use the Agent SDK when the workflow needs to run programmatically.
  • Use scheduled tasks for recurring research, list maintenance, or reporting.

Claude Code currently supports recurring tasks through local scheduled tasks and cloud routines. Cloud routines can include configured connectors and run on schedules or supported triggers, although the routines feature is currently described as a research preview.

Common Mistakes to Avoid

1) Asking Claude Code to “find good leads”

This instruction is too vague. Define what “good” means using company, contact, signal, exclusion, and data-quality criteria.

2) Enriching before reviewing the search

Search and shortlist first. Enriching every result wastes credits and creates unnecessary data.

3) Treating an ICP match as a qualified lead

A Head of Sales at a 200-person SaaS company may match your ICP perfectly and still have no reason to buy your product. Call the record an ICP match or a pre-qualified prospect until genuine interest or need has been confirmed.

4) Letting Claude Code guess missing information

Missing data should remain missing. An unknown employee count is safer than an invented employee range that gives the prospect an artificially high score.

5) Giving write access without approval gates

Searching and reading are lower-risk actions. Creating contacts, updating sequences, enrolling prospects, and launching outreach are materially different. Require approval before every consequential write action.

6) Ignoring suppression data

Your exclusion process should run immediately before records are created or enrolled, not only at the beginning of the workflow.

Using unsupported personalisation

Do not let Claude Code turn weak clues into confident claims. “Your team is clearly struggling to scale outbound” is not valid personalisation unless the company has directly indicated that problem.

7) Automating too much too early

Start with one small, observable workflow. For example:

  1. Search for 50 prospects.
  2. Review the results.
  3. Enrich 10 contacts.
  4. Check the data.
  5. Create a draft campaign.
  6. Review every action and output.

Expand the workflow only after the results are consistently accurate.

Is Claude Code Good for Lead Generation?

Claude Code is useful for lead generation when the main problem is fragmented work. It is particularly suitable for:

  • GTM engineers building repeatable prospecting systems.
  • Revenue operations teams that need controlled data workflows.
  • Founders managing research and outreach across several tools.
  • Agencies building lists for multiple campaigns or clients.
  • Sales teams that need consistent qualification logic.
  • Technical teams that want to combine natural-language instructions with scripts and APIs.

It is less suitable when:

  • You only need a simple, point-and-click contact database.
  • Your ICP is not clearly defined.
  • You do not have reliable data sources.
  • You expect it to determine genuine buying intent from firmographic data alone.
  • You are not prepared to review permissions, credit usage, and outputs.
  • Your team does not have a clear suppression and compliance process.

Claude Code does not eliminate the need for specialist sales tools. Its value comes from coordinating them. Leadsforge can provide the contact search and enrichment layer.

Claude Code can apply your rules, process the results, and manage the workflow. Salesforge can handle approved contacts and campaign execution. The rest of your infrastructure can support sending and deliverability.

That is a stronger use case than asking Claude Code to replace your entire sales stack.

Personalized Outbound Strategy

Get The Right Outbound Strategy In Minutes

Enter your email to get a custom plan & stack recommendation for your business

It's being carefully crafted by AI

Please check your mailbox in 5 minutes

Final Verdict

Claude Code can make B2B lead generation faster, more consistent, and easier to operate, but only when the workflow is designed properly. It is not a hidden database of prospects. It is an agentic operating layer that can research, reason, process data, and interact with the platforms that provide your contact information and sales infrastructure.

The most reliable setup is to:

  1. Document your ICP and exclusions.
  2. Connect Claude Code to a trusted lead data platform.
  3. Search before enriching.
  4. Apply transparent scoring rules.
  5. Keep missing information marked as unknown.
  6. Separate ICP fit from genuine sales qualification.
  7. Require approval before spending credits or making write actions.
  8. Review prospects before launching outreach.

For teams already using the Forge ecosystem, connecting Claude Code to Leadsforge and Salesforge creates a practical path from a natural-language ICP to an outreach-ready prospect list without manually moving data between several dashboards.

The quality of the result will still depend on the quality of your ICP, data source, qualification logic, and review process. Claude Code makes the workflow easier to run. It does not remove the need to design the workflow well.

Ready to outreach
your leads with Salesforge?

You can test it out yourself - no credit card needed
Try
free
4.6 rating on G2
Add as a preferred
source on Google