How Leadbay thinks (mental model for your agent)
- Inbox, not a database. Each day your user logs back in, a fresh batch of leads is delivered. Batch size is paced by how many leads the user has actually acted on recently — some workflows produce a big stream of smaller prospects, others a narrow stream of bigger ones. Pulling more won't produce more; acting on leads does.
- Two scoring layers. Every lead ships with a basic
score(firmographic — already decent, usually correlates with AI). Roughly the top 10 of each batch are also AI-qualified (targeted web research + qualification questions →ai_agent_lead_score). Leads below the top 10 aren't worse — the system is saving resources. The agent can request deeper qualification (leadbay_bulk_qualify_leads) or contact enrichment (leadbay_enrich_titles) on any lead that looks worth it. - Daily rhythm. The agent works best as a daily check-in: pull fresh leads, skim the auto-qualified top, deepen 1-3 promising ones, propose outreach, then log what actually got sent via
leadbay_report_outreach. If your host supports scheduling, set up a daily run.
For users
Get Leadbay MCP running inside your AI assistant in a couple of minutes. No coding required.
New to Leadbay? The friendly, screenshot-driven walkthrough — what a lens is, how scoring works, and the full MCP setup for every assistant — lives in the Leadbay user guide. This README is the technical companion.
No Leadbay account yet? Create one here first — you'll need it to sign in during setup.
Connect on the web (no install)
If you use Claude on the web, Claude Desktop, or ChatGPT, the fastest path is a custom connector — no terminal, no tokens to copy. Add one URL and sign in with your browser:
- Name:
Leadbay - URL:
https://mcp.leadbay.app/mcp— one URL for every region (/fr/mcpremains a compatibility alias) - On ChatGPT, use
https://mcp.leadbay.app/chatgpt/mcpinstead. Same server, same sign-in, same leads — but the assistant cannot generate a top-up link or open your billing page there, because the OpenAI app directory does not allow an app to sell credits. Buy credits or change your plan in your Leadbay account instead. - On any other assistant (GitHub Copilot / VS Code, Goose, Cursor, …), use
https://mcp.leadbay.app/apps/mcp. Same server, same sign-in, every region. - On ChatGPT and those assistants, today's leads open as the Lead Triage Board right in the chat, when the assistant can display it. Claude keeps its own widgets and artifacts on
/mcp.
In Claude: Settings → Connectors → + → Add custom connector, paste the URL, then open the connector and Connect. Sign in with Leadbay, click Approve, and you're linked. The server handles OAuth in-app; updates are automatic — you never touch a config file.
Install in Claude Desktop (one-click bundle)
Prefer a bundled desktop extension? Grab the one-click file.
1. Download the extension
👉 Download the latest Leadbay MCP for Claude (.dxt)
On the releases page, click the file ending in .dxt to download it.
2. Install it
Double-click the downloaded .dxt file. Claude opens and shows an install dialog — click Install, and you're done.
If the double-click doesn't open Claude, install it manually:
- Open Claude and go to your profile → Settings → Extensions.
- Open Advanced settings.
- Choose Install extension… and select the
.dxtfile you downloaded.
3. Sign in
Claude will prompt you to connect Leadbay. Sign in with your Leadbay account and you're ready — just ask your agent for leads.
Using a local assistant?
Leadbay MCP also works with Claude Code, Claude Desktop, Cursor, and Codex. The universal installer sets everything up for you and lets you sign in with Leadbay.
Requires Node.js 22+. Then run:
npx -y -p @leadbay/mcp@latest installer
It opens in your browser where you click Sign in with Leadbay, then pick which assistants to connect. Works on macOS, Windows, and Linux.
To uninstall, run the same installer with --uninstall:
npx -y -p @leadbay/mcp@latest installer --uninstall
It opens an uninstall window showing only the assistants that have Leadbay connected — pick the ones to remove and click Remove selected. It only removes Leadbay; your other settings and connections are left untouched.
Ask for your first leads
Open a new conversation and describe the outcome — you never name a tool, just say what you want, the way you'd ask a colleague:
Show me today's leads and tell me which two are worth opening first.
A successful first reply is a ranked table of prospects, not a wall of text: each row has a fit score, a one-line why-it-fits, and the best contact to reach. Then keep going:
Research the top one — is it a fit for us?
Draft me an outreach email to them.
I just emailed them. Log it as outreach.
For developers
Everything below is for contributors and anyone running Leadbay MCP from source or wiring it into automation.
Install a local version with the custom installer
To run your local checkout (instead of the published package), first build it from source:
pnpm install
pnpm prompts:build
pnpm -r build
Then point the installer at your freshly built version with --local:
pnpm --filter @leadbay/mcp installer -- --local
--local registers the MCP client(s) against the build in your working tree rather than @leadbay/mcp@latest. OAuth is handled automatically — you don't need to pass --oauth. The installer asks per-target before writing anything.
All install methods
Every supported way to connect Leadbay MCP:
What each installer writes per client
The GUI/CLI installers only touch clients that are actually installed on the machine:
Claude Code plugin marketplace
/plugin marketplace add leadbay/mcp
/plugin install leadbay@leadbay-mcp
Claude Code prompts for Leadbay auth/config. Registers the MCP server and installs a set of skills that auto-trigger on natural-language asks — including leadbay_daily_check_in ("get my leads today"), leadbay_research_a_domain ("research acme.com"), leadbay_followup_check_in, leadbay_qualify_top_n, leadbay_refine_audience, leadbay_log_outreach, leadbay_import_file, leadbay_plan_tour_in_city, leadbay_prospecting_overview, leadbay_extend_my_lens, leadbay_setup_team_prospecting, leadbay_build_campaign, and leadbay_work_campaign. Each SKILL.md is generated by @leadbay/promptforge from the same source as the MCP prompts, so the two surfaces never drift.
Uninstall
npx -y -p @leadbay/mcp@latest installer --uninstall
Opens the uninstall wizard — only shows clients that already have Leadbay MCP configured. De-registers Claude Code, strips the JSON stanza from Claude Desktop / Cursor configs, removes the [mcp_servers.leadbay] TOML block from Codex, and strips the managed export LEADBAY_* block from ~/.zshrc / ~/.bashrc. Uninstall is scoped to Leadbay — it never rewrites unrelated client settings or removes other MCP servers.
Tools
Your assistant calls these on your behalf — you never call them directly. You ask in plain language ("show me today's leads", "research acme.com", "log that I emailed Jane") and the agent picks the right tool. The default surface below is always exposed; the full per-tool reference lives in the user guide.
Reading tools (always on)
These answer questions about your account. None of them creates, deletes or sends anything. Some of them do write one small thing back while answering — which leads you were shown, or the filter you asked for — and the table says which, because that is why they are not labelled read-only over the wire.
Discover & follow up
Research a company
Travel & field sales
Campaigns
Lenses, audience & qualification
Imports & jobs
Team, billing & product signals
Write actions (on by default since 0.3.0; set LEADBAY_MCP_WRITE=0 to disable)
These take action on your account. Every action is one you could take yourself in the app — there's nothing destructive at the platform level, and deletes are confirm-gated.
Qualify & enrich
Outreach & activity
Contacts
Lenses & audience
Imports & campaigns
Custom fields & qualification questions
Feedback
Advanced granular tools (gated by LEADBAY_MCP_ADVANCED=1)
Low-level, single-API-call tools for power users and integrations (leadbay_discover_leads, leadbay_get_lead_profile, leadbay_get_contacts, leadbay_list_lenses, …). Off by default; enable by setting LEADBAY_MCP_ADVANCED=1 in the MCP server's env. See packages/mcp/README.md for the full list.
How it works
The MCP server automatically uses your active lens (the last lens you used in Leadbay). Just call leadbay_pull_leads and it works — no lens configuration needed.
You can also manage lenses directly from chat: leadbay_manage_lenses lists them and switches/renames/deletes; leadbay_new_lens creates a named one with sector/size criteria; and leadbay_adjust_audience edits an existing lens (the active one, or any lens by name via lensName). Sector names resolve against the live taxonomy — leadbay_list_sectors surfaces the real labels.
leadbay_research_lead_by_id bundles multiple API calls (lead details + AI qualification + contacts) into a single response. If some data isn't available yet, it returns partial results instead of failing.
Configuration
The full environment-variable reference (telemetry, mock mode, logging, timeouts) is in packages/mcp/README.md.
Workflows
The canonical inventory of what the MCP supports — supported / partial / planned / blocked-on-backend — is WORKFLOWS.md. Use it to triage incoming asks: find the row that matches, or add a new one. A small audit asserts every cited tool/prompt and test path is real, so the table can't silently drift.
Quick taste:
leadbay_pull_leads → leadbay_research_lead_by_id → leadbay_prepare_outreach # discover & research
leadbay_pull_followups → leadbay_followups_map → leadbay_prepare_outreach # travel/geo follow-ups
leadbay_import_leads → leadbay_bulk_qualify_leads # import & qualify
Requirements
- Node.js 22+
- A Leadbay account
Privacy Policy
The Leadbay MCP server accesses your Leadbay account data (leads, contacts, campaigns, notes) on your behalf through the Leadbay API, using a token you authorize via OAuth. It does not read your conversation history, Claude memory, or local files. Data handling is governed by the Leadbay privacy policy and terms of use.
Building from source
pnpm install
pnpm prompts:build
pnpm -r build
pnpm -r test
pnpm -r typecheck
Test tiers
- Unit tests (
packages/core/test/unit/) — error-code mapping, tool branches. UsemockHttpfromtest/harness.tsto stubnode:https. No network required. - Integration tests (
packages/core/test/integration/) — opt-in. SetLEADBAY_TEST_TOKENand runpnpm test:smoke. - Audit tests (
packages/mcp/test/audit/) — assert tool descriptions, routing blocks, and WORKFLOWS.md consistency at build time. Always run on CI. - Agent evaluations (evals/) — declarative journeys, isolated testing agents, and independent evidence verification.
pnpm test:evalvalidates artifact contracts; it does not claim behavioral coverage.
See CLAUDE.md for the full contributor guide: tool structure, test conventions, build pipeline, and how to add a new tool.
Publishing
All releases are tag-driven — never run npm publish locally. GitHub Actions owns publishing.
- Bump
packages/mcp/package.json#version+ add CHANGELOG entry, land PR.
git checkout main && git pull
git tag mcp-v0.x.0
git push origin mcp-v0.x.0
- Watch the release workflow:
preflight-npm → publish-mcp.
For dry runs: Actions → release → "Run workflow" → package: mcp, dry_run: true.
Full runbook (auth setup, failure modes, manual re-runs): RELEASE.md.