Repository avatar
Other Tools
v0.1.2
active

leadgraph-mcp

io.github.0xlearner/leadgraph-mcp

Local lead generation: businesses, their websites and social activity, and decision-makers.

Documentation

leadgraph-mcp

An MCP server for local lead generation. Ask your assistant for "dentists in Austin whose Instagram went quiet, and who runs them", and it:

  1. finds the businesses on Google Maps (or takes your own list, or a placegraph-mcp job);
  2. checks their presence: is the website alive, which business email and phone it publishes, who its team page names, and which Instagram, Facebook, TikTok and YouTube accounts are really theirs, with followers and when each last posted;
  3. finds the decision-makers on LinkedIn, each with a tier (verified, probable, possible) and the evidence behind it;

then returns one scored, explained row per business, ready for your CRM (CSV), a spreadsheet, or Neo4j.

Most lead lists tell you a business exists. This one tells you whether anyone is home: a dental practice that last posted on Instagram 4 years ago, with the owner's LinkedIn and the front desk's inbox.

Data comes from three actors on Apify, run on your Apify account (you pay per result, see Costs): Google Maps Full Suite, Business Website Contacts & Social Media Presence and LinkedIn Profile & Company Search. The server itself is free and open source.

What you can ask

You areAsk your assistantfocus
A social media agency"Dentists in Austin whose Instagram or Facebook went quiet, with someone to contact"social_agency
A web / SEO agency"Roofers in Dallas with a dead website or no public email"web_agency
A B2B sales team"Dental practices near Houston and who runs them, with a business email"b2b_sales
Medical billing / coding"Independent family practices in Houston (no hospital groups) and who runs them"b2b_sales
Reputation management"From my placegraph territory job: businesses trailing their competitors, with their owners"reputation
CRM / RevOps"Add social accounts and decision-makers to these 80 accounts" (your rows)any

Worked examples: one per use case, run from a plain prompt in Claude Code, with the tools it picked, its answer and the Apify cost ($0.04 to $0.66 each, six use cases).

Example: 15 Austin dentists (December 2026)

One prompt, three steps, about 9 minutes, $0.53:

  • Websites: 15 of 15 working; a business inbox on 13 (info@, frontdesk@, care@…), staff members' personal addresses withheld.
  • Social: 33 accounts read, 9 practices active in the last 30 days, 10 silent on at least one platform for over 6 months. One practice's Instagram, Facebook and YouTube had all been quiet for 10 months to 3 years.
  • Decision-makers: found for 10 of 15: 6 verified (the practice's own site names the dentist and the profile matches city and profession, or their LinkedIn lists the practice's domain), 4 probable (their LinkedIn employer is the practice, in Austin). An owner, an operations director, an office manager and dentists; where only staff turned up (assistants, hygienists), no one is called the decision-maker.

focus: social_agency put the practice with every account silent on top; b2b_sales put the ones with a verified dentist and a business inbox on top.

Example: 10 Dallas roofers

About 2.5 minutes, $0.30: business inbox on 8 of 10, decision-maker for 7 (5 verified), one roofer's Instagram silent for 4 years and Facebook for 2.5, one whose site links an Instagram account that no longer exists (instagram_link_broken).

Directories

Listed in the official MCP Registry (io.github.0xlearner/leadgraph-mcp) and on Glama:

leadgraph MCP server on Glama

On Glama you can browse the tools, check the server's quality score, and try it online in the MCP Inspector before installing.

Install

You need an Apify API token. A free Apify account includes monthly credit.

Hosted (no install). The server runs on Cloudflare Workers at https://leadgraph-mcp.rhat398.workers.dev/mcp (Streamable HTTP). Send your Apify token as a bearer header; it's used for that request only and never stored or logged:

claude mcp add --transport http leadgraph https://leadgraph-mcp.rhat398.workers.dev/mcp \
  --header "Authorization: Bearer apify_api_..."

Clients that can't set headers (claude.ai custom connectors, which use OAuth) aren't supported yet. Or run it locally:

Claude Code

claude mcp add leadgraph -e APIFY_TOKEN=apify_api_... -- npx -y github:0xlearner/leadgraph-mcp

Claude Desktop, Cursor, VS Code (mcpServers config):

{
  "mcpServers": {
    "leadgraph": {
      "command": "npx",
      "args": ["-y", "github:0xlearner/leadgraph-mcp"],
      "env": { "APIFY_TOKEN": "apify_api_..." }
    }
  }
}

Works well next to placegraph-mcp: its job ids are accepted by import_businesses. (The few placegraph functions leadgraph uses are vendored in src/placegraph/, so it installs from npm alone.)

Docker: docker build -t leadgraph-mcp . && docker run -i --rm -e APIFY_TOKEN=apify_api_... leadgraph-mcp (stdio).

Tools

ToolWhat it doesStarts runs
estimate_pipelineUpper-bound cost of each step for N businesses.no
find_businessesGoogle Maps search (optionally a grid past ~120 per search): name, category, address, phone, website, rating.yes
import_businessesYour own rows (up to 100), or a placegraph job (its competitor context comes along).no
check_presenceWebsite status, business emails, phones, the team; each social account's match to the business, followers, last post, posts in 90 days.yes
find_decision_makersLinkedIn: company pages the websites link (and the people they list), the business name, the people the website names. Tiered, with evidence.yes
job_statusA step's status; when done, its result and the next step with its estimate.no
lead_sheetThe joined list, scored by focus, with filters (has_email, has_decision_maker, inactive_on, flag, min_score).no
lead_profileEverything about one business: every person and account with its evidence, scores for every focus.no
export_leadscsv (one row per business, CRM-ready), json, cypher (Neo4j: Business, Account, Person).no

Jobs. Each step takes minutes. A step waits up to wait_s (default 45 s), then returns a job_id; job_status(job_id) returns the result when it's done, including the next step's call and estimate. Job ids are self-contained: they work in a later conversation too, while Apify keeps the runs' data (your plan's retention).

How accounts and people are matched

Social accounts (tier on each account):

TierMeaning
mutualthe website links the account and the account links back: certain
websitethe website links it (header, footer or structured data; site builders' own accounts are left out)
profileonly the account links the website

People (tier on each person):

TierMeaning
verifiedtheir LinkedIn lists the business's domain; or the business's own website names them and the profile is in the same city and profession; or the business's LinkedIn page (its website is the business's domain) lists them, in the city
probabletheir LinkedIn employer, headline or title names the business, in the city
possibleweaker (e.g. the right employer, another city). Listed, never scored

Same-name profiles in other cities are dropped. decision_maker is yes for owner, founder, partner, principal, director, manager roles; likely for the practitioner at a small practice (Dr, DDS, Esq.); no for staff (assistant, hygienist, coordinator…), who are listed but never chosen.

Scores

All 0-100, computed on the server from the row (change them in src/score.ts):

  • presence_score: per platform, 1 if the business's own account posted in the last 30 days, 0.5 in 90 days, 0 otherwise or missing; platforms weighted by how many businesses in the batch use them (at least 0.1).
  • contactability: business email 50, phone 20, decision-maker 30 × tier (verified 1, probable 0.7).
  • lead_score by focus:
    • social_agency: 55 × (1 − presence/100) + 25 × email + 20 × decision-maker tier (no website and no accounts: 0);
    • web_agency: 60 × website problem (no site or dead 1, blocks visitors 0.7, no public email 0.5) + 20 × phone + 20 × decision-maker tier;
    • b2b_sales: 50 × decision-maker tier (×1.2 for a decision-maker role, capped) + 30 × email + 20 × phone;
    • reputation: 60 × rating gap to Google's "people also search for" competitors (0.5 stars = full; without them, 4.7 − rating over 0.7) + 20 × email + 20 × decision-maker tier.

Flags explain the rest: website_dead, no_public_email, instagram_inactive_90d, facebook_link_broken, no_tiktok_while_40pct_of_peers_have_one, no_decision_maker_found, rating_below_competitors…

Costs

Each step shows its estimate first, refuses to start above max_cost_usd (default $5), and is capped at its estimate on Apify. Measured in December 2026:

TaskTimeCost
15 dentists, all three steps~9 min$0.53
10 roofers, all three steps~2.5 min$0.30
Find businesses, per business~$0.002
Presence, per business (website + ~2 accounts)~$0.01
Decision-makers, per business~$0.015-0.02

lead_sheet, lead_profile and export_leads cost nothing: they reuse finished jobs' data.

Good to know

  • Emails are business inboxes (info@, office@, names of the business) unless you ask check_presence for personal_emails; staff members' own addresses published on websites are counted (personal_emails_withheld) but not returned. No email guessing, no personal phone numbers.
  • LinkedIn searches can come back empty when Google limits them for a while; the result says which businesses weren't reached. Run find_decision_makers again later.
  • Facebook pages that can't be seen logged out (removed, renamed, age-restricted, or a personal profile) are reported as unavailable with facebook_link_broken.
  • YouTube upload dates are approximate (YouTube shows "3 weeks ago").
  • Hosted server limits. The hosted endpoint runs on Cloudflare's free plan, which gives each call a small CPU and request budget: lead_sheet returns up to 100 rows per call (page with offset), and a call that would need more requests than the budget says so. Measured: a 100-business sheet in 15-42 ms of CPU. The local server (npx) has no such limits.
  • You're responsible for using the data lawfully, including how you contact people (GDPR, CAN-SPAM, PECR).

Development

npm install
npm test            # offline: fixtures from a real job, people pseudonymized
npm run build
APIFY_TOKEN=... node scripts/live-smoke.mjs dentist "Austin, TX" 15   # live, ~$0.50
APIFY_TOKEN=... node scripts/weekly-check.mjs   # five known businesses, all steps, ~$0.15 (also weekly in CI)

License

Apache-2.0