Skip to main content
Glama
gomessoaresemmanuel-cpu

linkedin-prospection-mcp

find_leads

Search LinkedIn for professionals discussing burnout, stress, or exhaustion to identify potential leads for outreach and engagement.

Instructions

Search LinkedIn for leads posting about burnout, stress, or exhaustion. Uses Playwright to scrape LinkedIn posts matching burnout keywords. Requires an active LinkedIn session (run setup-session first).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNoSimulate without actually scraping

Implementation Reference

  • The handler function for the 'find_leads' tool, which runs the 'find-leads-v2.js' script and processes the results.
      async ({ dry_run }) => {
        if (!fs.existsSync(SESSION_DIR)) {
          return {
            isError: true,
            content: [{ type: "text" as const, text: "LinkedIn session not found. Run setup-session.js first to log in." }],
          };
        }
    
        const args = dry_run ? ["--dry-run"] : [];
        const result = await runScript("find-leads-v2.js", args, 300_000);
    
        if (result.code !== 0) {
          return {
            isError: true,
            content: [{ type: "text" as const, text: `Lead search failed (code ${result.code}):\n${result.stderr}` }],
          };
        }
    
        const leads = getLeads();
        const summary = (leads as { summary?: { p1?: number; p2?: number; p3?: number; total?: number } }).summary;
    
        return {
          content: [
            {
              type: "text" as const,
              text: [
                "Lead search completed!",
                summary ? `P1-hot: ${summary.p1 || 0} | P2-warm: ${summary.p2 || 0} | P3-nurture: ${summary.p3 || 0} | Total: ${summary.total || 0}` : "",
                "",
                result.stdout.slice(-2000),
              ].join("\n"),
            },
          ],
        };
      },
    );
    
    // ─── Tool 2: score_lead ─────────────────────────────────────────
    
    server.registerTool(
      "score_lead",
  • src/index.ts:250-262 (registration)
    Registration of the 'find_leads' tool in the MCP server.
    server.registerTool(
      "find_leads",
      {
        title: "Find LinkedIn Leads",
        description:
          "Search LinkedIn for leads posting about burnout, stress, or exhaustion. " +
          "Uses Playwright to scrape LinkedIn posts matching burnout keywords. " +
          "Requires an active LinkedIn session (run setup-session first).",
        inputSchema: {
          dry_run: z.boolean().default(false).optional().describe("Simulate without actually scraping"),
        },
        annotations: { readOnlyHint: false, openWorldHint: true, destructiveHint: false },
      },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gomessoaresemmanuel-cpu/linkedin-prospection-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server