home / mcp / lead generation mcp server
Provides lead discovery and enrichment using multiple data sources with caching and monitoring.
Configuration
View docs{
"mcpServers": {
"bashirk-inbound-mcp": {
"command": "mcp",
"args": [
"dev",
"lead_server.py",
"--reload",
"--port",
"8080"
],
"env": {
"GOOGLE_CSE_ID": "YOUR_GOOGLE_CSE_ID",
"GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY",
"HUNTER_API_KEY": "YOUR_HUNTER_API_KEY",
"CLEARBIT_API_KEY": "YOUR_CLEARBIT_API_KEY"
}
}
}
}You can deploy and operate a production-grade lead generation MCP server that orchestrates crawling, enrichment, caching, and monitoring to deliver qualified leads. This guide shows practical steps to install, configure, and run the server, and how to use its MCP tools to generate and enrich leads efficiently.
You interact with the Lead Generation MCP server through an MCP client. Start by generating a lead using your search terms, then enrich the lead with additional data sources, and finally monitor the overall lead workflow. Use the server to manage lead discovery, enrichment from multiple services, and caching for fast responses.
Prerequisites you need before installation:
# Create and activate a virtual environment
python -m venv .venv && source .venv/bin/activate
# Install production dependencies
pip install mcp crawl4ai[all] aiocache aiohttp uvloop
# Install browser dependencies for scraping
python -m playwright install chromium# Development mode with live reload
mcp dev lead_server.py --reload --port 8080
# Production (example, use a process manager in production)
gunicorn -w 4 -k uvicorn.workers.UvicornWorker lead_server:app# Build the image
docker build -t lead-server .
# Run the container with necessary environment variables
docker run -p 8080:8080 \
-e HUNTER_API_KEY=YOUR_KEY \
-e CLEARBIT_API_KEY=YOUR_KEY \
-e GOOGLE_CSE_ID=YOUR_ID \
-e GOOGLE_API_KEY=YOUR_KEY \
lead-serverservices:
hunter:
api_key: ${HUNTER_API_KEY}
rate_limit: 50/60s
clearbit:
api_key: ${CLEARBIT_API_KEY}
cache_ttl: 86400
scraping:
stealth_mode: true
headless: true
timeout: 30
max_retries: 3
cache:
backend: redis://localhost:6379/0
default_ttl: 3600Use the MCP client to perform common workflows: generate a lead, enrich it with multiple services, and then retrieve lead status. The client abstracts the protocol details and focuses on the business actions.
Common issues and solutions include: 403 from Google services; 429 Too Many Requests; Playwright timeouts; Redis cache misses. Resolve by rotating IPs or adjusting API keys, implementing backoff policies, increasing timeouts, and verifying cache connections.
Keep API keys secure and rotate credentials periodically. Store sensitive values in environment variables and use least-privilege access for data sources. Ensure you comply with data usage terms for each service.
Lead generation, data enrichment, and lead maintenance are exposed through MCP endpoints. The server coordinates data from Google Custom Search, Crawl4AI, Hunter.io, Clearbit, and LinkedIn scraping to produce enriched lead records, with caching to improve response times.
Choose a deployment method that fits your workload. For high-concurrency scenarios, use a production-friendly server setup (gunicorn with an ASGI worker) and a robust Redis-backed cache. Monitor real-time metrics to observe throughput and latencies.
Apache 2.0 - See LICENSE for details.
Generates a new lead by querying multiple data sources using search terms.
Enriches an existing lead by aggregating data from Hunter.io, Clearbit, and other services.
Monitors lead status and maintains lifecycle from discovery to enrichment.