Leadbay MCP server
Commit Oct 24, 2026Find, research, and prepare B2B outreach on prospects using your Leadbay account through an AI agent.
Also known as leadbay/mcp, leadbay-mcp, @leadbay/mcp
- Stars
- 0
- Tools
- —
- Downloads, 30 days
- 1,845
- Latest version
- 0.46.1
- Last commit
- Oct 24, 2026
- License
- MIT
What is Leadbay MCP?
Leadbay is an MCP server. Find, research, and prepare B2B outreach on prospects using your Leadbay account through an AI agent.
Summary generated from the project's README
About Leadbay MCP server
Leadbay provides an MCP server that enables AI agents to manage B2B prospecting directly through your existing Leadbay account. It allows developers and sales teams to find, research, and prepare outreach for potential prospects using compatible clients like Claude Desktop, Cursor, and Claude Code. The server can be installed locally via an Electron installer or npm, or connected remotely as a custom connector for web-based assistants.
Users can interact with the server using specific tools such as leadbay_refine_lead_targeting to reshape recommendations across their entire organization. The system supports both read-only and write modes, with composite write tools like adjust_audience and report_outreach enabled by default. Authentication is handled through Leadbay OAuth, which automatically detects your region, though users can manually specify us or fr regions if required. The server is designed to integrate with your agent's existing memory while using Leadbay to store specific market preferences and lead feedback.
What you can do with it
- 1Automate prospect researchAsk your assistant to perform deep research on a specific company domain to prepare for outreach.
- 2Manage daily lead workflowsRequest a summary of new leads available in your account for the current day.
- 3Log outreach activitiesInstruct the agent to record your recent communication efforts with prospects.
Written from the project's README. Every use case is checked against a quote from it.
How to install Leadbay MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Leadbay MCP in Claude Code
$ claude mcp add --env 'LEADBAY_TOKEN=<YOUR_LEADBAY_TOKEN>' --env 'LEADBAY_REGION=<LEADBAY_REGION>' leadbay-mcp -- npx -y @leadbay/mcpInstall Leadbay MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"leadbay-mcp": {
"command": "npx",
"args": [
"-y",
"@leadbay/mcp"
],
"env": {
"LEADBAY_TOKEN": "<YOUR_LEADBAY_TOKEN>",
"LEADBAY_REGION": "<LEADBAY_REGION>"
}
}
}
}Install Leadbay MCP in VS Code
.vscode/mcp.json
{
"servers": {
"leadbay-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@leadbay/mcp"
],
"env": {
"LEADBAY_TOKEN": "<YOUR_LEADBAY_TOKEN>",
"LEADBAY_REGION": "<LEADBAY_REGION>"
}
}
}
}Install Leadbay MCP in VS Code CLI
$ code --add-mcp '{"name":"leadbay-mcp","type":"stdio","command":"npx","args":["-y","@leadbay/mcp"],"env":{"LEADBAY_TOKEN":"<YOUR_LEADBAY_TOKEN>","LEADBAY_REGION":"<LEADBAY_REGION>"}}'Install Leadbay MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"leadbay-mcp": {
"command": "npx",
"args": [
"-y",
"@leadbay/mcp"
],
"env": {
"LEADBAY_TOKEN": "<YOUR_LEADBAY_TOKEN>",
"LEADBAY_REGION": "<LEADBAY_REGION>"
}
}
}
}Install Leadbay MCP in Codex
$ codex mcp add leadbay-mcp --env 'LEADBAY_TOKEN=<YOUR_LEADBAY_TOKEN>' --env 'LEADBAY_REGION=<LEADBAY_REGION>' -- npx -y @leadbay/mcpInstall Leadbay MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.leadbay-mcp] command = "npx" args = ["-y", "@leadbay/mcp"] [mcp_servers.leadbay-mcp.env] LEADBAY_TOKEN = "<YOUR_LEADBAY_TOKEN>" LEADBAY_REGION = "<LEADBAY_REGION>"
Install Leadbay MCP in Gemini CLI
$ gemini mcp add -s user -e 'LEADBAY_TOKEN=<YOUR_LEADBAY_TOKEN>' -e 'LEADBAY_REGION=<LEADBAY_REGION>' leadbay-mcp npx -- -y @leadbay/mcpInstall Leadbay MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"leadbay-mcp": {
"command": "npx",
"args": [
"-y",
"@leadbay/mcp"
],
"env": {
"LEADBAY_TOKEN": "<YOUR_LEADBAY_TOKEN>",
"LEADBAY_REGION": "<LEADBAY_REGION>"
}
}
}
}Configuration
LEADBAY_TOKENRequiredSecretBearer token, set by the installer. Run `npx -y -p @leadbay/mcp@latest installer` and sign in with your browser.
LEADBAY_REGIONRequiredus or fr - Leadbay backend that owns your account.
LEADBAY_MCP_ADVANCEDSet to 1 to expose granular API tools.
LEADBAY_MCP_WRITESet to 0 to hide composite write tools (default: 1, ON).
LEADBAY_TELEMETRY_ENABLEDProduct-usage telemetry (PostHog/Sentry). Set to false to opt out. On a local/stdio install this env var is the ONLY way to stop telemetry — the account-level toggle (leadbay_set_telemetry) governs the hosted connector, not a local process (default: true).
| Name | Description | |
|---|---|---|
| LEADBAY_TOKEN | Bearer token, set by the installer. Run `npx -y -p @leadbay/mcp@latest installer` and sign in with your browser. | RequiredSecret |
| LEADBAY_REGION | us or fr - Leadbay backend that owns your account. | Required |
| LEADBAY_MCP_ADVANCED | Set to 1 to expose granular API tools. | |
| LEADBAY_MCP_WRITE | Set to 0 to hide composite write tools (default: 1, ON). | |
| LEADBAY_TELEMETRY_ENABLED | Product-usage telemetry (PostHog/Sentry). Set to false to opt out. On a local/stdio install this env var is the ONLY way to stop telemetry — the account-level toggle (leadbay_set_telemetry) governs the hosted connector, not a local process (default: true). |
Automated checks
Ran Nov 13, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachableleadbay/mcp is public and reachablegithub.com/leadbay/mcp ↗Pass
- Package names this repository as its source@leadbay/mcp names leadbay/mcp as sourcenpmjs.com/package/@leadbay/mcp ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for @leadbay/mcpnpmjs.com/package/@leadbay/mcp/v/0.46.1#provenance ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-10-24github.com/leadbay/mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @leadbay/mcpPass
- No critical advisory in the package or its dependencies196 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the modelInstruction aimed at the model found in the description or READMEFinding
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeHTTPS endpoint answered 401 (sign-in required)Pass
README
View on GitHub@leadbay/mcp — Leadbay MCP server
A Model Context Protocol server that lets Claude Desktop, Cursor, Claude Code, and any other MCP-compatible agent find, research, and prepare outreach on B2B prospects using your Leadbay account.
Upgrading? See CHANGELOG and MIGRATION.md for version-specific behavior changes. Key callout: composite write tools are ON by default since 0.3.0 — set
LEADBAY_MCP_WRITE=0to restore read-only behavior.
What Leadbay remembers
Leadbay stores nothing about how you like to work. Your assistant already does that — Claude, ChatGPT and Codex each keep their own memory of your tone, naming and habits, and it survives across conversations without us.
What Leadbay stores is what changes who it finds for you. When you tell the
agent something about your market ("I target fleets over 100 vehicles",
"carriers are a bad fit unless they do last-mile"), it calls
leadbay_refine_lead_targeting, and that reshapes your recommendations for your whole
organization — in the web app too, on every refresh. A lead you reject is
recorded as a dislike, which feeds the recommender the same way.
1. Install
On macOS and Windows, launch the guided Electron installer from the npm package:
npx -y -p @leadbay/mcp@latest installer
It downloads the npm package, opens the installer app, signs in with Leadbay OAuth in your browser, detects installed MCP clients, then installs the selected ones.
On Linux, use the terminal-only path instead (no desktop installer window):
npx -y @leadbay/mcp@latest install --oauth
Claude web / Cowork on the web (no terminal)
On the web there's no terminal, so npx … installer doesn't apply — add
Leadbay as a custom Connector instead. Claude connects to the hosted MCP
from Anthropic's cloud and runs the OAuth sign-in in-app (no localhost
callback, no client id/secret to fill in):
- Customize → Connectors → "+" → Add custom connector
- Name:
Leadbay· URL:https://mcp.leadbay.app/mcp - Add, then complete the Leadbay sign-in prompt.
The same hosted URL works from a terminal that has the Claude Code CLI:
claude mcp add --transport http leadbay https://mcp.leadbay.app/mcp
In Claude Cowork with a terminal, the guided installer works as usual —
it opens your browser for sign-in and configures the detected clients. If the
browser never opens, the installer no longer hangs: it exits after a short
watchdog with the Connector / claude mcp add instructions above.
From a repo checkout, run the same native installer with:
pnpm --filter @leadbay/mcp installer
pnpm --filter @leadbay/mcp installer -- --uninstall
Testing a local build
Add --local to install your current checkout instead of pulling from npm. Useful when developing the MCP and wanting to test changes in Claude Desktop or Claude Code without publishing.
# 1. Build
pnpm --filter @leadbay/mcp build
# 2a. GUI wizard — same OAuth flow, writes node dist/bin.js into client configs
pnpm --filter @leadbay/mcp installer -- --local
# 2b. Terminal-only
node packages/mcp/dist/bin.js install --oauth --local
# 2c. Explicit path (if running from a different directory)
node packages/mcp/dist/bin.js install --oauth --local=/abs/path/to/packages/mcp/dist/bin.js
Instead of npx -y @leadbay/mcp@latest, each client config gets node /absolute/path/to/dist/bin.js. After each rebuild the next MCP session picks up your changes automatically — no reinstall needed.
For terminal-only installs (works on macOS, Windows, and Linux):
npx -y @leadbay/mcp@latest install --oauth
To uninstall with the same guided app:
npx -y -p @leadbay/mcp@latest installer --uninstall
Only shows clients that already have Leadbay MCP configured.
These commands:
- Open Leadbay OAuth in your browser.
- Exchange the browser approval for a local MCP credential.
- Auto-detect which MCP clients you have installed (Claude Code, Claude Desktop, Cursor, Codex) and register the server in each (after asking you per-target). Claude Code is registered with
--scope userso the server appears in any project, not just where you ran the command. - Write the credential into the client config files — never to your terminal scrollback.
Add --no-write to disable the composite write tools (refine_prompt, report_outreach, adjust_audience, etc. — ON by default since 0.3.0; pass --no-write for a read-only agent). Add --yes for non-interactive runs (CI / scripts). Add --target claude-code,cursor to scope to specific clients. The legacy --include-write flag is accepted but is now a no-op.
OAuth auto-detects your region through stargate. Pass --region us|fr only if you need to override it.
To rotate the local MCP credential, re-run npx -y @leadbay/mcp install --oauth.
Don't have a Leadbay account? Register here.
Install via the Claude Code plugin marketplace
/plugin marketplace add leadbay/mcp
/plugin install leadbay@leadbay-mcp
Claude Code prompts for Leadbay auth/config through the plugin's userConfig. This is equivalent to the npm/CLI install above.
The plugin install gives you two surfaces in one shot:
- The MCP server — registered via the plugin's
mcpServers.leadbayblock (boots@leadbay/mcpover stdio). This exposes theleadbay_*tools to the agent. - Six auto-discovered Claude Code skills under
skills/—leadbay_daily_check_in,leadbay_research_a_domain,leadbay_import_file,leadbay_log_outreach,leadbay_qualify_top_n,leadbay_refine_audience. These auto-trigger on natural-language matches against each skill's description ("get me leadbay leads today", "research acme.com", etc.) and dispatch to the MCP tools above by name. EachSKILL.mdis generated by@leadbay/promptforgefrom the same.md.tmplsource as the MCP prompt, so the two surfaces never drift.
You can verify the skills installed by running /skill list after install. To uninstall everything, /plugin uninstall leadbay@leadbay-mcp removes the MCP server registration and the skills together.
Claude Desktop
The guided installer writes the local mcpServers.leadbay entry in claude_desktop_config.json with npx -y @leadbay/mcp@latest, like the Linux flow. Restart Claude Desktop after install.
The .dxt / .mcpb bundle from Releases remains available as an alternative install path.
npm install -g says "EACCES" / "permission denied"
If you installed Node from the official nodejs.org .pkg, /usr/local/lib/node_modules is root-owned. Any of these works:
- Use
npx(recommended, no global install): all examples above usenpx -y @leadbay/mcp@latest ...— no global install needed. sudo npm install -g @leadbay/mcp(enter your macOS password).- Use a Node version manager — nvm, volta, fnm. They install Node under your home directory, so
npm install -gworks without sudo.
If you'd rather authenticate without auto-install
npx -y @leadbay/mcp@latest login --oauth
Default writes a 0600-mode JSON file at the platform-correct credentials path ($XDG_CONFIG_HOME/leadbay/credentials.json on Linux, ~/Library/Application Support/leadbay/credentials.json on macOS, %APPDATA%\leadbay\credentials.json on Windows). Pass --write-config /some/path.json to override the path. Pass --force to overwrite an existing file from a different account. The legacy email/password path still exists for scripts that cannot use a browser.
2. Updating the hosted MCP
The hosted MCP at https://mcp.leadbay.app/mcp runs self-hosted on the Leadbay
k3s cluster (leadbay/infra). Deploys are automatic and driven off release tags
— there is nothing to run by hand:
- Bump
packages/mcp/package.jsonin a normal PR and merge tomain.auto-tag.ymlpushes the matchingmcp-v<ver>tag. build-image.ymlbuilds this repo'sDockerfileand pushes the image to Azure Container Registry asleadbay.azurecr.io/mcp:<commit-sha>(and:latest).- Argo CD Image Updater in
leadbay/infrawatches for the new SHA-tagged image and rolls themcpworkload automatically.
To confirm the live endpoint is serving the expected version:
curl https://mcp.leadbay.app/healthz
# {"ok":true,"version":"<published-version>"}
Infrastructure details (workload manifests, Argo CD app, DNS) live in
leadbay/infra — not this repo.
3. Quickstart
Prefer the installer in §1. If you need to hand-write config,
first authenticate with npx -y @leadbay/mcp@latest login --oauth, then copy the
LEADBAY_TOKEN and LEADBAY_REGION values from the credentials file it writes.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"leadbay": {
"command": "npx",
"args": ["-y", "@leadbay/mcp@latest"],
"env": {
"LEADBAY_TOKEN": "<paste-oauth-token>",
"LEADBAY_REGION": "us"
}
}
}
}
Restart Claude Desktop.
Cursor
In Cursor settings, add the MCP server:
{
"mcp.servers": {
"leadbay": {
"command": "npx",
"args": ["-y", "@leadbay/mcp@latest"],
"env": { "LEADBAY_TOKEN": "<paste-oauth-token>", "LEADBAY_REGION": "us" }
}
}
}
Claude Code
claude mcp add leadbay --scope user \
--env LEADBAY_TOKEN=<paste-oauth-token> \
--env LEADBAY_REGION=us \
-- npx -y @leadbay/mcp@latest
--scope userregisters Leadbay globally for your account (visible from any project). Without it,claude mcp adddefaults to project-local scope and the server only appears in conversations opened from the directory where you ran the command.
To disable the composite write tools (refine_prompt, report_outreach, adjust_audience, etc.), add
--env LEADBAY_MCP_WRITE=0. They are ON by default since 0.3.0. The legacyLEADBAY_MCP_WRITE=1opt-in is now a no-op.
Verify it works
Before starting Claude, run:
LEADBAY_TOKEN=<paste-oauth-token> npx -y @leadbay/mcp@latest doctor
Expected output:
Leadbay connection OK.
Organization: Your Org
Billing: active
AI credits: 420 / 1000
Claude Desktop / ChatGPT / remote-MCP clients
Leadbay runs a hosted MCP server that any remote-MCP client can connect to without a local install. Pick the URL for your assistant — each one works for every region:
https://mcp.leadbay.app/mcp # Claude (Desktop, web, Cowork, Claude Code)
https://mcp.leadbay.app/chatgpt/mcp # ChatGPT
https://mcp.leadbay.app/apps/mcp # every other assistant (GitHub Copilot / VS Code, Goose, Cursor, …)
- Claude Desktop: Settings → Connectors → Add custom connector → paste the
/mcpURL. - ChatGPT Desktop: Settings → Apps → Add app → paste the
/chatgpt/mcpURL. - Any other assistant: add a remote (Streamable HTTP) MCP server with the
/apps/mcpURL.
The three are the same server, sign-in and leads. /chatgpt/mcp and /apps/mcp also show the Lead Triage Board inside the chat when the assistant can display MCP Apps; an assistant that can't simply shows the usual results. Claude keeps its own widgets and artifacts on /mcp. /chatgpt/mcp additionally leaves out the top-up and billing tools, which the OpenAI app directory does not allow.
On first connect the client runs the Leadbay OAuth sign-in (the server advertises OAuth 2.0 Protected Resource Metadata per RFC 9728 and challenges unauthenticated requests with 401 + WWW-Authenticate). Sign in once in the browser; the client stores the token and sends it as Authorization: Bearer <token> on every request. No token to copy-paste, no local Node install needed.
You don't pick a region. Sign-in goes through Stargate, Leadbay's single region-agnostic OAuth authority, and your region rides in the token itself rather than in the connector path — so /mcp, /chatgpt/mcp and /apps/mcp resolve US and FR accounts alike. /fr/mcp still works as a compatibility alias for connectors configured before this change; there is no need to migrate and no benefit to using it. If the sign-in prompt never appears, you're on an old build of the hosted server (pre-0.21.0); it auto-updates on release.
Updates are automatic — the hosted server is always running the latest published release. You never need to update a config file or restart anything on your side.
4. Example prompts that work
Find me 20 SaaS companies in Berlin that match my Ideal Buyer Profile.
Research the top prospect from that list — give me the AI summary, recent activity, and who I should reach out to.
Prepare an outreach package for Acme Corp — include the recommended contact with enriched email if we have credits.
5. Spec primitives in action
If you're building or auditing an MCP integration, this section shows what each spec primitive looks like on the wire when calling
@leadbay/mcp. Every example is the actual JSON-RPC frame your client sends or receives — copy verbatim into a debugger.
tools/list — annotations + outputSchema
Every tool advertises read/write/idempotent/openWorld posture and (for the top declarers) a typed return schema.
Request:
{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }
Response (excerpt):
{
"tools": [
{
"name": "leadbay_account_status",
"description": "Show the user's account state — admin rights, language, last-active lens, current quota …",
"inputSchema": { "type": "object", "properties": {}, "additionalProperties": false },
"annotations": {
"title": "Show Leadbay account + quota state",
"readOnlyHint": true, "destructiveHint": false,
"idempotentHint": true, "openWorldHint": true
},
"outputSchema": {
"type": "object",
"properties": {
"user": { "type": "object", "properties": { "email": {}, "name": {}, "admin": {}, "manager": {}, "language": {} } },
"organization": { "type": "object", "properties": { "id": {}, "name": {}, "ai_agent_enabled": {}, "computing_intelligence": {}, "plan": {} } },
"last_requested_lens": {},
"quota": {},
"_meta": { "type": "object", "properties": { "region": {} } }
},
"required": ["user", "organization"]
}
}
]
}
Capable clients use the annotations to decide auto-approve vs prompt; the outputSchema lets them dispatch on shape rather than re-parse the text.
tools/call with structuredContent
When the tool declares outputSchema, the response carries a typed structuredContent block alongside text content:
Request:
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call",
"params": { "name": "leadbay_account_status", "arguments": {} } }
Response:
{
"content": [
{ "type": "text", "text": "{\"user\":{...},\"organization\":{...}, ...}" }
],
"structuredContent": {
"user": { "email": "you@example.com", "name": "You", "admin": true, "manager": false, "language": "en" },
"organization": { "id": "org-1", "name": "Your Co", "ai_agent_enabled": true, "computing_intelligence": false, "plan": "PRO" },
"last_requested_lens": 42,
"quota": { "plan": "PRO", "windows": [...] },
"_meta": { "region": "us" }
}
}
prompts/list and prompts/get — slash commands
Request:
{ "jsonrpc": "2.0", "id": 3, "method": "prompts/list" }
Response (excerpt):
{
"prompts": [
{ "name": "daily-check-in", "description": "Pull fresh leads, surface auto-qualified top, deepen 1-3 promising ones.", "arguments": [] },
{ "name": "research-a-domain", "description": "Import a domain → resolve to leadId → research_lead.",
"arguments": [{ "name": "domain", "description": "Company domain (e.g., acme.com)", "required": true }] },
{ "name": "log-outreach", "description": "Gather verification → report_outreach.",
"arguments": [{ "name": "lead_id", "required": true }, { "name": "what", "required": true }] }
]
}
Then prompts/get materialises the chosen workflow as a structured messages array the agent unfurls:
{ "jsonrpc": "2.0", "id": 4, "method": "prompts/get",
"params": { "name": "research-a-domain", "arguments": { "domain": "acme.com" } } }
Clients without a prompts/list UI (Cowork is the prototypical case): the catalog still reaches the agent. The server's initialize response includes a serverInfo.instructions string that names every prompt, its trigger phrasing, and its required arguments — so the agent can match the user's natural-language ask and invoke prompts/get directly without the user clicking through a slash menu. No client action is needed beyond the standard MCP initialize handshake.
resources/list and resources/read — URI-addressable read-only data
Three URI schemes are advertised: lead://{uuid}/profile, lens://{id}/definition, org://taste-profile. Capable clients cache them across turns.
Request:
{ "jsonrpc": "2.0", "id": 5, "method": "resources/templates/list" }
Response (excerpt):
{
"resourceTemplates": [
{ "uriTemplate": "lead://{uuid}/profile", "name": "Lead profile", "description": "Lead profile by Leadbay UUID — basics + qualifications + contacts.", "mimeType": "application/json" },
{ "uriTemplate": "lens://{id}/definition", "name": "Lens definition", "description": "Filter + scoring config for a lens.", "mimeType": "application/json" }
]
}
Read a specific lead:
{ "jsonrpc": "2.0", "id": 6, "method": "resources/read",
"params": { "uri": "lead://0xabcd-…/profile" } }
Response wraps the JSON in a text content block with the URI's mime type so clients can render or cache it.
notifications/progress — streaming during long ops
When the agent calls a long-running tool with a progressToken in _meta, the server streams progress notifications back. Long-runners that emit: bulk_qualify_leads, import_and_qualify, enrich_titles, bulk_enrich_status, qualify_status.
Request:
{ "jsonrpc": "2.0", "id": 7, "method": "tools/call",
"params": {
"name": "leadbay_bulk_qualify_leads",
"arguments": { "leadIds": ["lead-1", "lead-2", "lead-3"] },
"_meta": { "progressToken": "bq-1" }
} }
While the call runs, notifications arrive:
{ "jsonrpc": "2.0", "method": "notifications/progress",
"params": { "progressToken": "bq-1", "progress": 1, "total": 3, "message": "Qualified Acme Corp (1/3)" } }
{ "jsonrpc": "2.0", "method": "notifications/progress",
"params": { "progressToken": "bq-1", "progress": 2, "total": 3, "message": "Qualified Globex (2/3)" } }
{ "jsonrpc": "2.0", "method": "notifications/progress",
"params": { "progressToken": "bq-1", "progress": 3, "total": 3, "message": "Qualified Initech (3/3)" } }
Then the final tools/call response.
notifications/cancelled — actually cancelling
Send the cancellation by id; the server's ToolContext.signal aborts the polling loop within ≤2 seconds. The job itself keeps running on the backend — poll leadbay_bulk_enrich_status with the notification_id later to pick it up.
{ "jsonrpc": "2.0", "method": "notifications/cancelled",
"params": { "requestId": 7, "reason": "user clicked cancel" } }
elicitation/create — server asks the user
Used by refine_prompt (clarification flow) and report_outreach (anti-poisoning user-confirmation). The server sends an elicitation/create request to the client; the client renders a form; the user types; the response feeds back into the tool call. The agent never sees the prompt.
Server emits (mid-tools/call):
{ "jsonrpc": "2.0", "id": 99, "method": "elicitation/create",
"params": {
"message": "An AI agent wants to log outreach on lead-1: 'Called Acme'. The agent claims you confirmed this. Type your literal confirmation to proceed; cancel to reject.",
"requestedSchema": {
"type": "object",
"properties": { "confirmation": { "type": "string", "title": "Your confirmation" } },
"required": ["confirmation"]
}
} }
Client returns:
{ "jsonrpc": "2.0", "id": 99, "result": { "action": "accept", "content": { "confirmation": "yes I called Acme today" } } }
The user's literal text replaces verification.ref in the outreach record, and the response carries confirmed_via: "elicit" for the SDR audit trail.
6. Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
LEADBAY_TOKEN environment variable is required |
Local MCP credential missing from config env | Re-run npx -y @leadbay/mcp install --oauth, restart client |
Authentication token expired or invalid |
Credential revoked or wrong region | Re-authenticate: npx -y @leadbay/mcp install --oauth; verify LEADBAY_REGION |
Leadbay doctor: could not reach any Leadbay region |
Wrong region OR network blocked | Run doctor with LEADBAY_REGION=fr to auto-probe. Check https://api-us.leadbay.app reachable. |
No enrichment credits remaining |
Out of quota | Contact Leadbay support to extend quota |
| Claude Desktop "loading forever" on first use | npx cold-start fetching the package |
First run takes ~10s. Prefer npm install -g @leadbay/mcp for faster startup. |
| Claude Desktop doesn't show Leadbay tools | Server crashed at startup | Check ~/Library/Logs/Claude/mcp*.log (macOS) or %APPDATA%\Claude\logs\mcp*.log (Windows). |
| Claude Code can't find Leadbay in a new conversation | MCP server installed at project scope (default before 0.3.0) | Re-run with --scope user: claude mcp remove leadbay && claude mcp add leadbay --scope user --env LEADBAY_TOKEN=… --env LEADBAY_REGION=us -- npx -y @leadbay/mcp@latest |
Agent reports "tool not found" for refine_prompt / adjust_audience etc. |
Pre-0.3.0 install with LEADBAY_MCP_WRITE unset (writes were off) |
Either re-run npx @leadbay/mcp install or remove LEADBAY_MCP_WRITE=0 from your client config (writes are on by default in 0.3.0+) |
Leadbay MCP questions
How do I add Leadbay MCP to Claude Code?
Run claude mcp add --env 'LEADBAY_TOKEN=<YOUR_LEADBAY_TOKEN>' --env 'LEADBAY_REGION=<LEADBAY_REGION>' leadbay-mcp -- npx -y @leadbay/mcp in your terminal. Add --scope user to make it available in every project.
How do I add Leadbay MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
Does Leadbay store my personal AI preferences?
No, Leadbay does not store how you like to work; your AI assistant handles your tone and habits. Leadbay only stores data that changes who it finds for you, such as market targeting refinements.
How can I install Leadbay on macOS or Windows?
You can use the guided Electron installer by running the command npx -y -p @leadbay/mcp@latest installer in your terminal.
How do I disable write tools to make the server read-only?
You can set the environment variable LEADBAY_MCP_WRITE=0 to disable composite write tools like audience adjustment and outreach reporting.