Lead Generator MCP Server

Lead Generator MCP Server

lead-generator-mcp-server•by4darsh-dev

An MCP server and standalone scraper that extracts, validates, and scores business leads from Google Maps for B2B sales, marketing, and outreach.

License: MIT License•Runtime: Awaiting documentation review•Category: search web

WHAT IT DOES

  • •Exposes a scrape_google_maps tool through an MCP server for AI assistants and automation tools, returning validated business data dictionaries.
  • •Automates Google Maps scraping by searching, scrolling to load results, extracting listing details, validating phone numbers and websites, and exporting CSV.
  • •Scores businesses from 0 to 100 based on website presence, ratings, and review counts, and sorts leads by score.
  • •Includes anti-detection mechanisms such as user-agent rotation, random delays, and human-like behavior.

BEST FOR

  • •B2B sales and outreach teams generating business leads from Google Maps search queries.
  • •Finding businesses without websites, useful for web development or digital marketing services.
  • •Local service business prospecting, such as HVAC contractors or salons in specific regions.

ABOUT LEAD-GENERATOR-MCP-SERVER

Lead Generator MCP Server is cataloged as an MCP server attributed to 4darsh-dev. An MCP server and standalone scraper that extracts, validates, and scores business leads from Google Maps for B2B sales, marketing, and outreach. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Lead Generator MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What tool does the MCP server expose?

It exposes the scrape_google_maps tool, which accepts a query and max_results and returns a list of validated business data dictionaries.

How are leads scored?

Leads start from a base score of 50 out of a maximum of 100, adjusted by factors such as absent or invalid websites, high ratings, and review counts.

In what format are results exported?

Results are exported to CSV with columns including name, category, address, phone, validation flags, rating, reviews, and lead score.

Upstream README

View this exact version on GitHub

README.md · 9c024e63e0c7 · Fetched 2026-11-13 12:07:13 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

🎯 Lead Generator MCP Server

MIT License Python 3.8+ Playwright MCP

A powerful Model Context Protocol (MCP) server and standalone scraper for automated business lead generation from Google Maps. Extract, validate, and score business data to identify high-quality leads for B2B sales, marketing, and outreach campaigns.

📋 Table of Contents

✨ Features

  • 🔍 Automated Google Maps Scraping - Extract business data from search queries
  • 🤖 MCP Server Integration - Expose scraping functionality via Model Context Protocol
  • 📊 Intelligent Lead Scoring - Rate businesses based on website presence, reviews, and ratings
  • ✅ Data Validation - Verify phone numbers and website URLs
  • 🌐 International Phone Formatting - Standardize phone numbers using Google's libphonenumber
  • 🎭 Anti-Detection Mechanisms - User-agent rotation, random delays, human-like behavior
  • 📈 Progress Tracking - Real-time progress bars with tqdm
  • 💾 CSV Export - Structured data output sorted by lead quality
  • 🔄 Error Recovery - Robust error handling with automatic retries

🎯 How It Works

┌─────────────┐     ┌──────────────┐     ┌─────────────┐     ┌──────────────┐
│   Search    │────>│ Scroll &     │────>│  Extract    │────>│  Validate &  │
│   Query     │     │ Load Results │     │  Data       │     │  Score Leads │
└─────────────┘     └──────────────┘     └─────────────┘     └──────────────┘
                                                                      │
                                                                      ▼
                                                               ┌──────────────┐
                                                               │ Export CSV   │
                                                               └──────────────┘
  1. Search: Navigate to Google Maps with your query
  2. Scroll: Dynamically load results by scrolling (handles infinite scroll)
  3. Extract: Click each business listing and scrape details
  4. Validate: Verify phone numbers and websites
  5. Score: Calculate lead quality score (0-100)
  6. Export: Save to CSV sorted by lead score

🚀 Installation

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)

Step 1: Clone the Repository

git clone https://github.com/4darsh-Dev/Lead-generator-mcp-server.git
cd Lead-generator-mcp-server

Step 2: Create Virtual Environment

# Create virtual environment
python -m venv myenv

# Activate virtual environment
# On Linux/macOS:
source myenv/bin/activate

# On Windows:
myenv\Scripts\activate

Step 3: Install Dependencies

# Install Python packages
pip install -r requirements.txt

# Install Playwright browsers (required)
playwright install chromium

📖 Usage

1. Standalone Scraper (CLI)

Basic Usage

python src/scraper.py --query "coffee shops in Seattle" --max-results 50

Advanced Options

# Visible browser mode (for debugging)
python src/scraper.py --query "beauty salons in London" --max-results 100 --visible

# Custom output filename
python src/scraper.py --query "restaurants in New York" --max-results 200 --output ny_restaurants.csv

# Complete example
python src/scraper.py \
  --query "plumbers in Boston" \
  --max-results 150 \
  --output boston_plumbers_2026.csv \
  --visible

Command Line Arguments

ArgumentTypeRequiredDefaultDescription
--querystring✅ Yes-Search query (e.g., "dentists in Chicago")
--max-resultsinteger❌ No100Maximum number of businesses to scrape
--outputstring❌ Nobusiness_leads_{timestamp}.csvOutput CSV filename
--visibleflag❌ NoFalseRun browser in visible mode (headless=False)

Example Queries

# Target businesses without websites (good for web dev services)
python src/scraper.py --query "yoga studios in Austin"

# B2B lead generation
python src/scraper.py --query "software companies in San Francisco" --max-results 300

# Local service businesses
python src/scraper.py --query "HVAC contractors in Phoenix" --max-results 150

# International search
python src/scraper.py --query "cafes in Mumbai" --max-results 100

2. MCP Server Mode

Run as an MCP server to integrate with AI assistants and automation tools:

python src/mcp-server.py

The server will start on http://localhost:8080 and expose the scrape_google_maps tool.

MCP Tool Usage

# Example MCP tool call
result = scrape_google_maps(
    query="digital marketing agencies in Toronto",
    max_results=50
)
# Returns: List of validated business data dictionaries

⚙️ Configuration

Headless Mode

# In your code
scraper = GoogleMapsScraper(headless=True)  # Invisible (faster)
scraper = GoogleMapsScraper(headless=False)  # Visible (debugging)

Slow Motion (for debugging)

# Add delays between actions (milliseconds)
scraper = GoogleMapsScraper(headless=False, slow_mo=100)

User Agents

User agents are rotated automatically from the USER_AGENTS list in scraper.py. You can add more:

USER_AGENTS = [
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36...",
    # Add your custom user agents here
]

📊 Output Format

CSV Columns

ColumnTypeDescription
namestringBusiness name
categorystringBusiness category/type
addressstringFull address
phonestringPhone number (internationally formatted)
phone_validbooleanPhone number validation status
websitestringWebsite URL
website_validbooleanWebsite accessibility status
ratingfloatGoogle Maps rating (0-5 stars)
reviewsintegerNumber of reviews
lead_scoreintegerCalculated lead quality score (0-100)

Example Output

name,category,address,phone,phone_valid,website,website_valid,rating,reviews,lead_score
"Joe's Coffee Shop","Coffee shop","123 Main St, Seattle, WA","+1 206-555-0123",True,"N/A",False,4.8,342,85
"Brew & Bean","Café","456 Pike St, Seattle, WA","+1 206-555-0456",True,"https://brewbean.com",True,4.5,128,70

🎯 Lead Scoring Algorithm

Businesses are scored from 0-100 based on:

FactorImpactPoints
No WebsiteHigh-quality lead for web services+20
Invalid WebsiteNeeds website help+15
High Rating (4.5+)Quality-focused, has budget+10
Low Reviews (<10)New business, needs marketing+10
Many Reviews (>100)Established, has resources+5

Base Score: 50 points
Max Score: 100 points

Leads are automatically sorted by score (highest first) in the CSV output.

🏗️ Architecture

Lead-generator-mcp-server/
├── src/
│   ├── scraper.py           # Core scraping logic
│   ├── mcp-server.py        # MCP server wrapper
│   └── __init__.py
├── myenv/                   # Virtual environment
├── requirements.txt         # Python dependencies
├── LICENSE                  # MIT License
└── README.md               # Documentation

Key Components

  • GoogleMapsScraper Class: Main scraper with browser automation
  • scrape_google_maps() Tool: MCP-exposed function
  • Playwright: Browser automation framework
  • Pandas: Data manipulation and CSV export
  • phonenumbers: Phone validation (Google's libphonenumber)
  • tqdm: Progress bars

🎭 Anti-Detection Features

  1. User-Agent Rotation: Random user agents per session
  2. Human-Like Delays: Random 1-3 second pauses
  3. Realistic Headers: Accept-Language, Accept headers
  4. Slow Motion: Configurable delays between actions
  5. Scroll Behavior: Smooth scrolling like humans
  6. Error Recovery: Graceful handling of detection

🛠️ Troubleshooting

Common Issues

Issue: playwright._impl._errors.Error: Executable doesn't exist
Solution: Run playwright install chromium

Issue: No results found
Solution:

  • Try running with --visible flag to debug
  • Check if Google Maps changed their HTML structure
  • Verify your internet connection

Issue: ImportError for logging/argparse
Solution: Add these imports to scraper.py:

import logging
import argparse
import random
import time
import re
import requests
import pandas as pd
import phonenumbers

Issue: Script hangs during scrolling
Solution:

  • Reduce --max-results value
  • Check max_attempts in scroll_results() method

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Setup

# Clone your fork
git clone https://github.com/YOUR_USERNAME/Lead-generator-mcp-server.git
cd Lead-generator-mcp-server

# Create virtual environment
python -m venv myenv
source myenv/bin/activate  # or myenv\Scripts\activate on Windows

# Install dev dependencies
pip install -r requirements.txt
playwright install chromium

# Run tests (if available)
pytest tests/

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright (c) 2025 ADARSH MAURYA

⚠️ Disclaimer

This tool is for educational and research purposes only. When using this scraper:

  • ✅ Respect Google Maps Terms of Service
  • ✅ Implement rate limiting (don't scrape too fast)
  • ✅ Use responsibly for legitimate business purposes
  • ✅ Comply with GDPR, CCPA, and data protection laws
  • ❌ Don't use for spam or unsolicited marketing
  • ❌ Don't overload Google's servers

The authors are not responsible for misuse of this tool.

📞 Contact & Support

Issues & Bugs

Found a bug? Have a feature request? Open an issue


⭐ Star this repository if you find it helpful!

Made with ❤️ by Adarsh Maurya

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Lead Generator MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/lead-generator-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related search web MCP Servers

Alternative and complementary servers in the same category

View all in search web →

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Repository stats unavailable
Search & Web Research

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.

94
Search & Web Research