Open Source·AI Agent Infrastructure

Verified B2B Data.
Agent-Native.

Find emails. Grab mobile numbers. Pull company intel. Full LeadMagic control from the terminal.

LeadMagic has one of the most accurate B2B data APIs on the market — 97% email accuracy, pay-for-found credits, and 18 endpoints covering people, companies, jobs, and ads. You hit the API manually, patch JSON, and handle auth per call.
So we built leadmagic-agent-cli — giving your agent all 18 endpoints as terminal commands and MCP tools, wired for autonomous enrichment from day one.

18
Commands
97%
Email Accuracy
18
MCP Tools
OpenClaw
OpenClaw
CLI / MCP
LeadMagic
LeadMagic
18 commands · 4 command groups · 18 MCP tools · pay for found

Why leadmagic-agent-cli Exists

Without leadmagic-agent-cli

  • No CLI — LeadMagic only offers a REST API and dashboard
  • You hand-write API calls, manage auth headers, and parse raw JSON
  • No credit-optimization logic — easy to waste credits on expensive endpoints first
  • Agents can’t access B2B data without custom wrappers per endpoint
  • You are the middleware between LeadMagic and your enrichment workflow

With leadmagic-agent-cli

  • 18 commands covering people, companies, jobs, and ads — one install
  • Auth stored once in ~/.leadmagic-cli/config.json or env var
  • Built-in credit-conservation logic: cheapest endpoints first
  • JSON output pipes directly to Clay, n8n, or any downstream tool
  • 18 MCP tools registered — Claude and Cursor get full LeadMagic access instantly

Quick Start

1. Install

Terminal
npm install -g leadmagic-agent-cli

2. Authenticate

Terminal
# Get your API key from app.leadmagic.io → Settings → API Keys
leadmagic login

# Or set as environment variable (recommended for agents)
export LEADMAGIC_API_KEY=your_api_key_here

3. Your first enrichment

Terminal
# Validate an email (0.25 credits — always start here)
leadmagic people validate-email --email "jane@acmecorp.com"

# Find work email by name + domain (1 credit)
leadmagic people find-email --first-name "Jane" --last-name "Smith" --domain "acmecorp.com"

# Pull company intelligence (1 credit)
leadmagic companies search --domain "acmecorp.com"

# Run as MCP server for agent access
leadmagic mcp

4. Connect to Claude Desktop or Cursor

claude_desktop_config.json / .cursor/mcp.json
{
  "mcpServers": {
    "leadmagic": {
      "command": "npx",
      "args": ["leadmagic-agent-cli", "mcp"],
      "env": {
        "LEADMAGIC_API_KEY": "your_api_key_here"
      }
    }
  }
}

Pay for Found — The LeadMagic Credit Model

Credits are only charged when data is returned. Every response includes credits_consumed. Exception: people job-change is always charged.

validate-email0.25cr
find-email1cr
profile1cr
companies search1cr
ads (each)0.2cr
personal-email2cr
find-role2cr
job-change3*cr
companies funding4cr
find-mobile5cr
profile-to-email5cr
email-to-profile10cr

* job-change always charged · all others: pay for found

What Your Agent Can See and Do

Email Validation & Finding

Validate any email for deliverability at 0.25 credits, then find work emails by name + company at 1 credit. Credit-optimal: validate first, find only when needed. 97% accuracy on every find.

Mobile Number Finding

Find verified direct-dial and mobile numbers for any contact at 5 credits. Returns formatted numbers with country codes — ready to drop into sequences or your CRM.

LinkedIn Profile Enrichment

Enrich by LinkedIn URL at 1 credit, find email from a profile URL at 5 credits, or reverse-lookup a profile from an email at 10 credits. Full bidirectional LinkedIn ↔ email resolution.

Company Intelligence

Search companies, find competitors, get funding rounds, and pull tech stacks — all via dedicated commands. Returns structured JSON: headcount, revenue, tech footprint, LinkedIn, social links.

Job Discovery

Find open roles at any company with rich filters — remote/hybrid/on-site, experience level, posted date, location, salary range. Returns job listings with 1 credit per job returned.

Ad Intelligence

Pull competitor ad data from Google, Meta, and LinkedIn B2B networks at 0.2 credits each — cheapest endpoint in the suite. See what messaging your competitors are running right now.

Credit-Optimal Waterfall

Every endpoint has a credit cost. The cheapest-first enrichment order: validate-email (0.25) → find-email (1) → profile (1) → personal-email (2) → find-mobile (5) → profile-to-email (5). Your agent only escalates when cheaper options fail.

MCP Server Mode

18 MCP tools registered for direct AI agent connectivity. Run leadmagic-agent-cli as an MCP server and give Claude, Cursor, or any MCP-compatible agent full B2B data access with one config line.

Agent Workflows — Real Use Cases

Your agent has full LeadMagic access from the terminal. These are real use cases — each one runs in seconds.

Credit-Optimal Email Waterfall

Agent Prompt

I have a name and company. Get me their verified email — spend as few credits as possible.

Agent runs the cheapest-first enrichment order: validate any existing email first, then find by name/domain, then escalate to profile-to-email only if needed. Saves 70%+ on enrichment credits vs. going straight to the expensive endpoints.

1
leadmagic people validate-email --email "jane@acmecorp.com"

Validate existing email (0.25 credits)

2
leadmagic people find-email --first-name "Jane" --last-name "Smith" --domain "acmecorp.com"

Find work email by name + domain (1 credit)

3
leadmagic people profile-to-email --linkedin-url "https://linkedin.com/in/janesmith"

Escalate to LinkedIn → email only if above fails (5 credits)

ICP Prospect Build — Account + Contacts

Agent Prompt

Find VP of Sales at Series B SaaS companies using Salesforce. Get me their emails and mobile numbers.

Agent searches companies by funding stage and tech stack, finds employees by role, then enriches each contact with email and mobile — fully autonomous, no dashboard, no CSV.

1
leadmagic companies search --domain "acmecorp.com"

Pull company intelligence + tech stack

2
leadmagic people find-role --company-domain "acmecorp.com" --role "VP of Sales"

Find the target role at the account (2 credits)

3
leadmagic people find-email --first-name "Marcus" --last-name "Chen" --domain "acmecorp.com"

Enrich each contact with verified email (1 credit)

4
leadmagic people find-mobile --linkedin-url "https://linkedin.com/in/marcuschen"

Grab mobile for high-priority accounts (5 credits)

Job Change Signal — Timely Outreach Trigger

Agent Prompt

Monitor my CRM contacts for job changes. Alert me when a champion moves to a new company.

Job changes are the highest-intent buying trigger in outbound. Agent polls for job change signals on your existing contact list — when a champion lands at a new company, you reach out before competitors.

1
leadmagic people job-change --linkedin-url "https://linkedin.com/in/targetcontact"

Check for job change signal (3 credits, always charged)

2
leadmagic companies search --domain "newcompany.com"

Research the new company immediately (1 credit)

3
leadmagic people find-email --first-name "Jane" --last-name "Smith" --domain "newcompany.com"

Find their new work email at the new org (1 credit)

Competitive Ad Intelligence

Agent Prompt

What ads are my top 3 competitors running on LinkedIn and Meta right now?

Ad intel at 0.2 credits each — the cheapest endpoint in the suite. Agent pulls Google, Meta, and B2B ad data for any domain. See competitor messaging, offer angles, and creative themes before you write your own sequences.

1
leadmagic ads b2b --domain "competitor.com"

Pull B2B ad intel (0.2 credits)

2
leadmagic ads meta --domain "competitor.com"

Pull Meta ad creative (0.2 credits)

3
leadmagic ads google --domain "competitor.com"

Pull Google ad copy (0.2 credits)

Full Account Intelligence Package

Agent Prompt

Give me everything on streamvault.io — funding, tech stack, competitors, and the VP of Engineering.

Agent chains four company commands to build a complete account brief: search for baseline data, pull funding rounds, get tech stack, identify competitors — then finds the target contact and verifies their email.

1
leadmagic companies search --domain "streamvault.io"

Company overview + headcount (1 credit)

2
leadmagic companies funding --domain "streamvault.io"

Funding rounds and investors (4 credits)

3
leadmagic companies technographics --domain "streamvault.io"

Full tech stack breakdown (1 credit)

4
leadmagic companies competitors --domain "streamvault.io"

Competitive landscape (5 credits)

5
leadmagic people find-role --company-domain "streamvault.io" --role "VP Engineering"

Find the decision maker (2 credits)

Commands Reference

people
leadmagic people validate-email --email "jane@acme.com"Validate email deliverability (0.25cr)
leadmagic people find-email --first-name "Jane" --last-name "Smith" --domain "acme.com"Find work email by name + domain (1cr)
leadmagic people find-mobile --linkedin-url "https://linkedin.com/in/..."Find mobile number (5cr)
leadmagic people profile --linkedin-url "https://linkedin.com/in/..."Enrich LinkedIn profile (1cr)
leadmagic people email-to-profile --email "jane@acme.com"Reverse-lookup LinkedIn from email (10cr)
leadmagic people profile-to-email --linkedin-url "https://linkedin.com/in/..."Find email from LinkedIn URL (5cr)
leadmagic people personal-email --linkedin-url "https://linkedin.com/in/..."Find personal email (2cr)
leadmagic people find-role --company-domain "acme.com" --role "VP Sales"Find person by role at company (2cr)
leadmagic people find-employees --company-domain "acme.com"List employees at a company
leadmagic people job-change --linkedin-url "https://linkedin.com/in/..."Check for job change signal (3cr, always charged)
companies
leadmagic companies search --domain "acmecorp.com"Company overview, headcount, tech stack (1cr)
leadmagic companies competitors --domain "acmecorp.com"Competitive landscape (5cr)
leadmagic companies funding --domain "acmecorp.com"Funding rounds and investors (4cr)
leadmagic companies technographics --domain "acmecorp.com"Full tech stack breakdown (1cr)
jobs
leadmagic jobs find --company-domain "acmecorp.com" --remote trueFind open roles with filters (1cr/job returned)
leadmagic jobs find --company-domain "acme.com" --experience "senior" --location "New York"Filter by experience and location
ads
leadmagic ads google --domain "competitor.com"Google ad copy (0.2cr)
leadmagic ads meta --domain "competitor.com"Meta ad creative (0.2cr)
leadmagic ads b2b --domain "competitor.com"LinkedIn B2B ad data (0.2cr)
auth / mcp
leadmagic loginStore API key in ~/.leadmagic-cli/config.json
leadmagic creditsCheck remaining credits
leadmagic mcpStart MCP server mode (18 tools registered)

How We Integrate It

LeadMagic CLI is the enrichment layer in our agent stack. Here’s where it fits across GTM operations.

OpenClaw Agent

OpenClaw uses LeadMagic CLI for credit-optimal enrichment — validate-email first, escalate to find-email, only use expensive endpoints when cheaper ones fail. Verified data drops straight into Clay for waterfall enrichment.

Clay Waterfall

LeadMagic JSON output pipes directly into Clay enrichment waterfalls — no CSV export, no manual upload. Agent handles the LeadMagic layer, Clay handles the multi-provider verification and confidence scoring.

Job Change Triggers

n8n polls people job-change on champion contacts daily. When a trigger fires, the agent researches the new company, finds the new email, and queues an Instantly sequence — zero human touchpoint.

Competitive Intelligence

Ad intel commands run at 0.2 credits each — so competitive research is nearly free. Agent pulls Google, Meta, and B2B ad data for target accounts and top competitors weekly, feeding into messaging strategy.

OpenClaw
LeadMagic

Want us to set this up for your business?

We build and manage OpenClaw agents for B2B teams — fully wired into LeadMagic, Clay, Instantly, and your enrichment stack.

Your agent handles enrichment waterfalls, job change signals, competitive intel, and contact finding autonomously. Book a Discovery Call and we’ll scope it for your business.

🤖

OpenClaw agent setup

Built and configured for your stack

🧲

LeadMagic integration

97% accuracy at pay-for-found pricing

Full GTM stack

Clay → Instantly → n8n wired in

View on GitHub

Free 30-minute call · No commitment · We’ll scope the build for your specific stack