Lead Generation with Cursor: Search, Enrich, and Outreach

Lead generation is a structured, repeatable process: find prospects, research them, write personalized outreach. That structure makes it a good fit for an AI agent. With AgentPatch connected, Cursor can find businesses through Google Maps, research them with web search, and draft outreach via email, all within the editor.

Why This Matters

If you’re building a lead gen tool, you need to test it with real data. Mocked prospects won’t tell you whether the discovery step returns useful results, whether the research step surfaces actionable signals, or whether the email drafts make sense to send.

Cursor with AgentPatch can run the actual pipeline during development. Real prospects, real web presence checks, real email drafts. You see what the data looks like before writing the abstraction layer.

Even if you’re not building a lead gen product, the same workflow applies any time you need to find businesses, learn about them, and reach out. Agency work, consulting, partnership outreach.

Setup

The AgentPatch CLI is designed for AI agents to use via shell access. Install it, and your agent can discover and invoke any tool on the marketplace.

Install (zero dependencies, Python 3.10+):

pip install agentpatch

Set your API key:

export AGENTPATCH_API_KEY=your_api_key

Example commands your agent will use:

ap search "web search"
ap run google-search --input '{"query": "test"}'

Get your API key from the AgentPatch dashboard.

  1. Open Cursor Settings (Cmd+Shift+J on Mac, Ctrl+Shift+J on Windows/Linux).
  2. Navigate to the MCP section in the sidebar.
  3. Click Add new global MCP server.
  4. Cursor opens ~/.cursor/mcp.json. Add the AgentPatch server config:
{
  "mcpServers": {
    "agentpatch": {
      "url": "https://agentpatch.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
  1. Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard.
  2. Save and restart Cursor. It discovers all AgentPatch tools automatically.

Example

You’re prototyping a lead gen workflow and want to run it end-to-end before writing any automation code. In Cursor’s chat:

“Run a live test of a prospect pipeline. Find dental offices in Atlanta, check their online presence, and draft outreach emails. Don’t send yet, just show me everything so I can see the data shape.”

Cursor runs it step by step:

Searching Google Maps for "dental office Atlanta GA"...

Found 12 results. Filtering for smaller practices (fewer than 100 reviews):

1. Midtown Dental Arts — 4.3 stars, 38 reviews
2. Peachtree Family Dentistry — 4.1 stars, 54 reviews
3. Grant Park Dental — 4.5 stars, 29 reviews

Searching Google for each practice's web presence...

Midtown Dental Arts: WordPress site, last updated 2023, no blog.
Peachtree Family Dentistry: Outdated site design, no mobile version.
Grant Park Dental: No website found, Google Business profile only.

Drafting outreach emails...

Draft 1 — Midtown Dental Arts:
Subject: Quick thought about your website
Hi, noticed your WordPress site hasn't been updated in a while...

Draft 2 — Peachtree Family Dentistry:
Subject: Your website on mobile
[...]

Draft 3 — Grant Park Dental:
Subject: Getting your practice online
[...]

Here's the data type I'd suggest:

interface LeadResult {
  businessName: string;
  rating: number;
  reviewCount: number;
  webPresence: 'none' | 'outdated' | 'present';
  emailDraft: string;
}

Cursor ran the full pipeline, showed the output, and derived the data type. Real data, no mocking needed.

Wrapping Up

With AgentPatch connected, Cursor can handle the full lead gen workflow: discovery, research, outreach. Maps, Search, and Email are three tools from the same marketplace. The same connection also unlocks news, trends, image generation, and more. See everything at agentpatch.ai.