Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .claude-plugin/plugins/leadbay/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
"name": "leadbay",
"version": "0.11.0",
"version": "0.12.0",
"description": "AI lead discovery, qualification, and outreach prep on your Leadbay account.",
"author": {
"name": "Leadbay",
Expand All @@ -15,7 +15,7 @@
"mcpServers": {
"leadbay": {
"command": "npx",
"args": ["-y", "@leadbay/mcp@0.11"],
"args": ["-y", "@leadbay/mcp@0.12"],
"env": {
"LEADBAY_TOKEN": "${user_config.leadbay_token}",
"LEADBAY_REGION": "${user_config.leadbay_region}",
Expand All @@ -27,7 +27,7 @@
"leadbay_token": {
"type": "string",
"title": "Leadbay bearer token",
"description": "Mint with: npx -y @leadbay/mcp@0.11 login --email <you> --region <us|fr>",
"description": "Mint with: npx -y @leadbay/mcp@0.12 login --email <you> --region <us|fr>",
"sensitive": true,
"required": true
},
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Start a conversation — the agent will ask for your Leadbay email and password
### Via MCP (Claude Desktop, Cursor, Cowork, any MCP client)

```bash
npx -y @leadbay/mcp@0.11 install --email you@yourcompany.com --region us
npx -y @leadbay/mcp@0.12 install --email you@yourcompany.com --region us
```

The installer auto-detects which MCP clients you have (Claude Desktop, Cursor, Claude Code), prompts you per-target, and writes the token into each client's config. Add `--no-write` to disable the composite write tools. Full per-client setup, env vars, troubleshooting, and a tour of the MCP primitives is in [`packages/mcp/README.md`](packages/mcp/README.md).
Expand Down
2 changes: 1 addition & 1 deletion packages/dxt/manifest.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"leadbay_token": {
"type": "string",
"title": "Leadbay bearer token",
"description": "Mint one with: npx -y @leadbay/mcp@0.11 login --email <you> --region <us|fr> (then copy LEADBAY_TOKEN from the credentials file the command writes — path is shown on stderr)",
"description": "Mint one with: npx -y @leadbay/mcp@0.12 login --email <you> --region <us|fr> (then copy LEADBAY_TOKEN from the credentials file the command writes — path is shown on stderr)",
"sensitive": true,
"required": true
},
Expand Down
4 changes: 4 additions & 0 deletions packages/leadclaw/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog — @leadbay/leadclaw

## 0.2.7 — 2026-05-21

Campaign workflow contract release. Adds `leadbay_tour_plan`, `leadbay_list_campaigns`, `leadbay_campaign_progression`, `leadbay_campaign_call_sheet`, `leadbay_create_campaign`, and `leadbay_add_leads_to_campaign` to `openclaw.plugin.json#contracts.tools`, picking up the new shared campaign/tour composites from `@leadbay/core`.

## 0.2.6 — 2026-05-18

New `leadbay_like_lead` and `leadbay_dislike_lead` write tools — exposed when `exposeWrite: true`. Picks up `@leadbay/core@0.6.1`. Manifest (`openclaw.plugin.json`): both tools added to `contracts.tools`.
Expand Down
2 changes: 1 addition & 1 deletion packages/leadclaw/openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "leadclaw",
"name": "LeadClaw",
"description": "Leadbay for AI agents: a daily sales-lead inbox with firmographic + AI qualification layers, plus on-demand deeper qualification and contact enrichment. Each login delivers a fresh batch of leads paced by the user's recent consumption; the agent skims, deepens promising ones, and proposes outreach.",
"version": "0.2.6",
"version": "0.2.7",
"contracts": {
"tools": [
"leadbay_login",
Expand Down
2 changes: 1 addition & 1 deletion packages/leadclaw/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leadbay/leadclaw",
"version": "0.2.6",
"version": "0.2.7",
"description": "OpenClaw plugin for Leadbay — AI lead discovery, qualification, and enrichment",
"type": "module",
"main": "dist/index.js",
Expand Down
10 changes: 10 additions & 0 deletions packages/mcp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog — @leadbay/mcp

## 0.12.0 — 2026-05-21

Campaign and field-sales workflow release.

- **Campaign workflows**: adds campaign creation/listing, add-leads, progression summaries, and a `leadbay_campaign_call_sheet` composite that returns phone-ready, LinkedIn-ready, and map-ready lead/contact payloads.
- **Agent routing + skills**: adds the `leadbay_work_campaign`, `leadbay_plan_tour_in_city`, and `leadbay_setup_team_prospecting` prompt/skill flows so agents start with readiness checks, route to the right workflow tool, and keep outreach reporting grounded in verified user action.
- **Progression accuracy**: contacted/already-contacted summaries now use outreach/prospecting signals instead of treating contact coverage as outreach completion.
- **Coverage**: adds workflow audits, prompt-eval coverage for `leadbay_work_campaign`, live campaign smoke coverage, and focused unit tests for the new campaign progression/call-sheet composites.
- **Pin bumps**: every `@leadbay/mcp@0.11` install/runtime reference in docs, generated client config, DXT, and Claude plugin metadata is now `@0.12`.

## 0.11.0 — 2026-05-20

In-server auto-update flow: the MCP server now self-polls GitHub releases (24h throttle, ETag-aware, in-flight guarded) and surfaces an `update_available` block on `leadbay_account_status` when a newer version is published — both at boot AND on every tool call, so long-running Claude Desktop sessions still pick up new releases without restart.
Expand Down
22 changes: 11 additions & 11 deletions packages/mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ A Model Context Protocol server that lets Claude Desktop, Cursor, Claude Code, a
## 1. Install (one command)

```bash
npx -y @leadbay/mcp@0.11 install --email you@yourcompany.com --region us
npx -y @leadbay/mcp@0.12 install --email you@yourcompany.com --region us
# (you'll be prompted for your password — it's not echoed)
```

Expand Down Expand Up @@ -67,14 +67,14 @@ Claude Desktop 2026 ships the DXT (Desktop Extension) system — the legacy `cla

If you installed Node from the official [nodejs.org](https://nodejs.org) `.pkg`, `/usr/local/lib/node_modules` is root-owned. Any of these works:

- **Use `npx` (recommended, no global install):** all examples above use `npx -y @leadbay/mcp@0.11 ...` — no global install needed.
- **Use `npx` (recommended, no global install):** all examples above use `npx -y @leadbay/mcp@0.12 ...` — no global install needed.
- **`sudo npm install -g @leadbay/mcp`** (enter your macOS password).
- **Use a Node version manager** — [nvm](https://github.com/nvm-sh/nvm), [volta](https://volta.sh), [fnm](https://github.com/Schniz/fnm). They install Node under your home directory, so `npm install -g` works without sudo.

### If you'd rather mint a token without auto-install

```bash
npx -y @leadbay/mcp@0.11 login \
npx -y @leadbay/mcp@0.12 login \
--email you@yourcompany.com \
--region us
```
Expand All @@ -92,7 +92,7 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) o
"mcpServers": {
"leadbay": {
"command": "npx",
"args": ["-y", "@leadbay/mcp@0.11"],
"args": ["-y", "@leadbay/mcp@0.12"],
"env": {
"LEADBAY_TOKEN": "<paste-token-from-step-1>",
"LEADBAY_REGION": "us"
Expand All @@ -113,7 +113,7 @@ In Cursor settings, add the MCP server:
"mcp.servers": {
"leadbay": {
"command": "npx",
"args": ["-y", "@leadbay/mcp@0.11"],
"args": ["-y", "@leadbay/mcp@0.12"],
"env": { "LEADBAY_TOKEN": "<paste-token>", "LEADBAY_REGION": "us" }
}
}
Expand All @@ -126,7 +126,7 @@ In Cursor settings, add the MCP server:
claude mcp add leadbay --scope user \
--env LEADBAY_TOKEN=<paste-token> \
--env LEADBAY_REGION=us \
-- npx -y @leadbay/mcp@0.11
-- npx -y @leadbay/mcp@0.12
```

> **`--scope user`** registers Leadbay globally for your account (visible from any project). Without it, `claude mcp add` defaults to project-local scope and the server only appears in conversations opened from the directory where you ran the command.
Expand All @@ -138,7 +138,7 @@ claude mcp add leadbay --scope user \
Before starting Claude, run:

```bash
LEADBAY_TOKEN=<paste-token> npx -y @leadbay/mcp@0.11 doctor
LEADBAY_TOKEN=<paste-token> npx -y @leadbay/mcp@0.12 doctor
```

Expected output:
Expand Down Expand Up @@ -366,14 +366,14 @@ The user's literal text replaces `verification.ref` in the outreach record, and
| `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@0.11` |
| 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@0.12` |
| 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+) |

## 5. Upgrade & rotation

**Upgrade**: change the pinned minor in your config, e.g. `"@leadbay/mcp@0.2"` → `"@leadbay/mcp@0.11"`, then restart the client. **0.3.0 enables composite write tools by default** — see [MIGRATION.md](./MIGRATION.md). See also the [changelog](https://github.com/leadbay/leadclaw/releases).
**Upgrade**: change the pinned minor in your config, e.g. `"@leadbay/mcp@0.2"` → `"@leadbay/mcp@0.12"`, then restart the client. **0.3.0 enables composite write tools by default** — see [MIGRATION.md](./MIGRATION.md). See also the [changelog](https://github.com/leadbay/leadclaw/releases).

**Rotate token**: re-run `npx -y @leadbay/mcp@0.11 install --email you@yourcompany.com --region us` (or `login`) — the new session token replaces the old one in your MCP client config, and logging in again invalidates the prior session on most session backends.
**Rotate token**: re-run `npx -y @leadbay/mcp@0.12 install --email you@yourcompany.com --region us` (or `login`) — the new session token replaces the old one in your MCP client config, and logging in again invalidates the prior session on most session backends.

## 6. Advanced

Expand Down Expand Up @@ -486,7 +486,7 @@ After your first authenticated call, your PostHog `distinctId` is set to your Le
"mcpServers": {
"leadbay": {
"command": "npx",
"args": ["-y", "@leadbay/mcp@0.11"],
"args": ["-y", "@leadbay/mcp@0.12"],
"env": {
"LEADBAY_TOKEN": "u.…",
"LEADBAY_REGION": "us",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leadbay/mcp",
"version": "0.11.0",
"version": "0.12.0",
"mcpName": "io.github.leadbay/leadbay-mcp",
"description": "Model Context Protocol (MCP) server for Leadbay — AI lead discovery, qualification, and enrichment for Claude Desktop, Cursor, and Claude Code.",
"type": "module",
Expand Down
8 changes: 4 additions & 4 deletions packages/mcp/server.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "io.github.leadbay/leadbay-mcp",
"title": "Leadbay",
"description": "AI lead discovery, qualification, and outreach prep on your Leadbay account.",
"version": "0.11.0",
"version": "0.12.0",
"repository": {
"url": "https://github.com/leadbay/leadclaw",
"source": "github",
Expand All @@ -15,7 +15,7 @@
"registryType": "npm",
"registryBaseUrl": "https://registry.npmjs.org",
"identifier": "@leadbay/mcp",
"version": "0.11.0",
"version": "0.12.0",
"transport": {
"type": "stdio"
},
Expand All @@ -27,13 +27,13 @@
},
{
"type": "positional",
"value": "@leadbay/mcp@0.11"
"value": "@leadbay/mcp@0.12"
}
],
"environmentVariables": [
{
"name": "LEADBAY_TOKEN",
"description": "Bearer token; mint with `npx -y @leadbay/mcp@0.11 login --email <you> --region <us|fr>`.",
"description": "Bearer token; mint with `npx -y @leadbay/mcp@0.12 login --email <you> --region <us|fr>`.",
"isRequired": true,
"isSecret": true
},
Expand Down
14 changes: 7 additions & 7 deletions packages/mcp/src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ EXAMPLE Claude Desktop config (~/Library/Application Support/Claude/claude_deskt
"mcpServers": {
"leadbay": {
"command": "npx",
"args": ["-y", "@leadbay/mcp@0.11"],
"args": ["-y", "@leadbay/mcp@0.12"],
"env": {
"LEADBAY_TOKEN": "lb_...",
"LEADBAY_REGION": "us",
Expand Down Expand Up @@ -524,7 +524,7 @@ async function runLogin(args: string[]): Promise<number> {
mcpServers: {
leadbay: {
command: "npx",
args: ["-y", "@leadbay/mcp@0.11"],
args: ["-y", "@leadbay/mcp@0.12"],
env: {
LEADBAY_TOKEN: result.token,
LEADBAY_REGION: result.region,
Expand Down Expand Up @@ -561,7 +561,7 @@ async function runLogin(args: string[]): Promise<number> {
` claude mcp add leadbay --scope user \\\n` +
` --env LEADBAY_TOKEN=${result.token} \\\n` +
` --env LEADBAY_REGION=${result.region} \\\n` +
` -- npx -y @leadbay/mcp@0.11\n\n` +
` -- npx -y @leadbay/mcp@0.12\n\n` +
`Restart your MCP client to pick up the new server.\n`
);
return 0;
Expand Down Expand Up @@ -678,7 +678,7 @@ async function runLogin(args: string[]): Promise<number> {
` claude mcp add leadbay --scope user \\\n` +
` --env LEADBAY_TOKEN=$(jq -r .mcpServers.leadbay.env.LEADBAY_TOKEN ${quotedPath}) \\\n` +
` --env LEADBAY_REGION=${result.region} \\\n` +
` -- npx -y @leadbay/mcp@0.11\n`
` -- npx -y @leadbay/mcp@0.12\n`
);
}
process.stderr.write(
Expand Down Expand Up @@ -926,7 +926,7 @@ export function buildClaudeCodeAddArgs(
`LEADBAY_TELEMETRY_ENABLED=${telemetryEnabled ? "true" : "false"}`,
];
if (!includeWrite) args.push("--env", `LEADBAY_MCP_WRITE=0`);
args.push("--", "npx", "-y", "@leadbay/mcp@0.11");
args.push("--", "npx", "-y", "@leadbay/mcp@0.12");
return args;
}

Expand Down Expand Up @@ -1000,7 +1000,7 @@ async function installInJsonConfig(

parsed.mcpServers.leadbay = {
command: "npx",
args: ["-y", "@leadbay/mcp@0.11"],
args: ["-y", "@leadbay/mcp@0.12"],
env,
};

Expand Down Expand Up @@ -1232,7 +1232,7 @@ async function runInstall(args: string[]): Promise<number> {
}
process.stderr.write(
`\nThe token was written into client config files but never printed to your terminal.\n` +
`Verify with: LEADBAY_TOKEN=$(...) npx -y @leadbay/mcp@0.11 doctor\n` +
`Verify with: LEADBAY_TOKEN=$(...) npx -y @leadbay/mcp@0.12 doctor\n` +
`Restart your MCP client(s) to pick up the new server.\n` +
`If you ever leak the token, run \`leadbay-mcp login --email <you> --region <us|fr>\` to mint a fresh one (which invalidates the prior session).\n`
);
Expand Down
4 changes: 2 additions & 2 deletions packages/mcp/test/unit/install-flags.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ describe("buildClaudeCodeAddArgs — Claude Code registration argv", () => {
expect(args).toContain("LEADBAY_MCP_WRITE=0");
});

it("pins the @leadbay/mcp@0.11 npx target", () => {
it("pins the @leadbay/mcp@0.12 npx target", () => {
const args = buildClaudeCodeAddArgs("tok", "us", true, true);
const sep = args.indexOf("--");
expect(sep).toBeGreaterThan(0);
expect(args.slice(sep + 1)).toEqual(["npx", "-y", "@leadbay/mcp@0.11"]);
expect(args.slice(sep + 1)).toEqual(["npx", "-y", "@leadbay/mcp@0.12"]);
});

it("token and region are NOT placed after the `--` separator (would be passed to npx, not claude)", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp/test/unit/login-collision.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const CFG = (email: string, region: "us" | "fr", token = "u.tok") => ({
mcpServers: {
leadbay: {
command: "npx",
args: ["-y", "@leadbay/mcp@0.11"],
args: ["-y", "@leadbay/mcp@0.12"],
env: { LEADBAY_TOKEN: token, LEADBAY_REGION: region },
},
},
Expand Down
Loading