LeadMagic

Access LeadMagic's B2B data enrichment API suite for email finding, profile enrichment, and company intelligence.

šŸš€ LeadMagic MCP Server

LeadMagic MCP Server

⚔ The Ultimate Model Context Protocol Server for B2B Data Enrichment

Seamlessly integrate LeadMagic's complete API suite with Claude, Cursor, Windsurf, and all MCP-compatible AI tools

npm version Downloads License: MIT Node.js

TypeScript MCP Compatible Production Ready Security

GitHub Stars GitHub Issues GitHub Forks Last Commit


šŸŽÆ 19 Powerful Tools • šŸ”„ Zero Configuration • ⚔ One-Line Setup • šŸ›”ļø Enterprise Security


šŸ“– Table of Contents


šŸŽÆ Access all 19 LeadMagic API endpoints through the Model Context Protocol for seamless integration with Claude, Cursor, Windsurf, Continue.dev, and other MCP-compatible AI tools.

šŸš€ Super Easy Installation

⚔ Option 1: Interactive Installer (Recommended)

The easiest way to get started - works on macOS, Windows, and Linux. Our new interactive installer, built with React and Ink, makes setup a breeze.

# šŸ”„ Using npx (no installation required)
npx leadmagic-mcp-server install

✨ The installer will:

  • āœ… Validate your API key in real-time and show your remaining credits.
  • āœ… Automatically detect and configure your preferred AI tool (Claude, Cursor, VS Code, etc.).
  • āœ… Create all necessary config files and a local .env for development.
  • āœ… Provide usage examples and helpful links.

šŸ“± Option 2: Quick Manual Setup

If you prefer manual setup or are using a client like Aider, you can add the server configuration directly to your client's settings file. The interactive installer provides copy-pasteable snippets for this.

Run the installer and choose the "Other (Manual Setup)" option:

npx leadmagic-mcp-server install

šŸ”‘ Get Your API Key

  1. 🌐 Visit LeadMagic Dashboard
  2. šŸ“ Sign up for free (if needed)
  3. šŸ” Generate your API key
  4. šŸ“‹ Paste it into the interactive installer when prompted.

⚔ npx Usage (Zero Installation)

You can use the server without installing, which is great for quick tests or containerized environments:

# šŸš€ Run directly with your API key
LEADMAGIC_API_KEY=your-key npx leadmagic-mcp-server

# šŸ“‹ Run the interactive installer
npx leadmagic-mcp-server install

# ā“ Check available commands
npx leadmagic-mcp-server --help

šŸ› ļø Available Tools

šŸ“Š Core Operations (3 tools)

  • šŸ’³ get_credits - Check API credit balance
  • āœ… validate_email - Validate email deliverability and get company info
  • šŸ“§ find_email - Find verified email addresses by name and company

šŸ¢ Profile & Company Intelligence (5 tools)

  • šŸ‘¤ search_profile - Get full B2B profile details (300 req/min)
  • šŸ­ search_company - Search companies by domain, name, or profile URL
  • šŸ“± find_mobile - Find mobile phone numbers from profiles/emails
  • šŸ”— email_to_profile - Find B2B profile URLs from work emails
  • šŸ’° get_company_funding - Get funding, financials, and competitor data

āœ‰ļø Advanced Email Finding (2 tools)

  • šŸ“Ø find_personal_email - Find personal emails from B2B profiles
  • šŸ”„ social_to_work_email - Find work emails from social profiles

šŸ’¼ Job & Employee Intelligence (5 tools)

  • šŸ” find_jobs - Search job postings with advanced filters
  • šŸ‘” find_role - Find specific roles within companies
  • šŸ‘„ find_employees - Find employees of specific companies
  • šŸŒ get_job_countries - Get available job search countries
  • šŸ“‹ get_job_types - Get available job types for filtering

šŸ“± Advertisement Intelligence (4 tools)

  • šŸ” search_google_ads - Search Google Ads by company
  • šŸ“˜ search_meta_ads - Search Meta (Facebook/Instagram) Ads
  • šŸ“ˆ search_b2b_ads - Search B2B advertising campaigns
  • šŸ“„ get_b2b_ad_details - Get detailed B2B ad information

šŸ’” Usage Examples

Once installed, you can use natural language commands in your AI tool:

šŸ“§ Email Operations

"Find the email for John Doe at Microsoft"
"Validate the email john@acme.com" 
"Find personal email for B2B profile https://linkedin.com/in/johndoe"

šŸ¢ Company Intelligence

"Search for Tesla company information"
"Get funding information for Stripe"
"Find employees at OpenAI who work in engineering"

šŸ’¼ Job & Recruitment

"Find software engineer jobs at tech companies"
"Search for product manager roles in San Francisco"
"Find mobile number for this B2B profile"

šŸ“± Competitive Analysis

"Search for Google Ads from competitor.com"
"Find Meta ads for company XYZ"
"Get B2B advertising campaigns for stripe.com"

šŸ”§ Development Setup

šŸ“‹ Prerequisites

  • šŸ“¦ Node.js 18.0.0 or higher
  • šŸ”‘ LeadMagic API key from leadmagic.io

šŸ’» Local Development

# šŸ“„ Clone the repository
git clone https://github.com/LeadMagic/leadmagic-mcp.git
cd leadmagic-mcp

# šŸ“¦ Install dependencies
npm install

# šŸ” Create environment file
echo "LEADMAGIC_API_KEY=your-api-key-here" > .env

# šŸš€ Start development server
npm run dev

# šŸ—ļø Build for production
npm run build

# āœ… Run validation
npm run validate

šŸ” Testing with MCP Inspector

# šŸš€ Start the MCP inspector
npm run inspector

# 🌐 Open the provided URL in your browser to test all tools

🌐 Supported MCP Clients

ClientInstallationStatusNotes
šŸ¤– Claude DesktopInteractive installer or manual configāœ… Fully SupportedOfficial Anthropic client
šŸŽÆ Cursor (Cline)Interactive installer or VS Code settingsāœ… Fully SupportedRequires Cline extension
šŸ„ WindsurfInteractive installer or manual configāœ… Fully SupportedCodeium's AI IDE
šŸ”„ Continue.devInteractive installer or config fileāœ… Fully SupportedOpen source coding assistant
šŸ’» VS Code (Cline)VS Code settings.jsonāœ… Fully SupportedRequires Cline extension
šŸ’» VS Code (Continue)Continue extension configāœ… Fully SupportedRequires Continue extension
⚔ Zed EditorInteractive installer or settingsāœ… Fully SupportedModern code editor
šŸ¤– AiderManual Configurationāœ… SupportedAI pair programming in your terminal
✨ Augment CodeManual Configurationāœ… SupportedAI coding assistant
šŸ”— Any MCP ClientManual configurationāœ… SupportedStandard MCP protocol

šŸ—ļø Architecture

šŸ› ļø Technology Stack

  • ⚔ Runtime: Node.js 18+
  • šŸ“˜ Language: TypeScript with strict type checking
  • šŸ”Œ MCP SDK: @modelcontextprotocol/sdk v1.0.0+
  • 🌐 HTTP Client: Axios with comprehensive error handling
  • āœ… Validation: Zod schemas for all API inputs/outputs
  • šŸ”§ Development: ESLint, Prettier, Jest for testing

šŸ“ Project Structure

ā”œā”€ā”€ src/
│   ā”œā”€ā”€ index.ts        # šŸš€ Main entry point and CLI command handling
│   ā”œā”€ā”€ server.ts       # šŸ”Œ MCP server implementation with all 19 tools
│   ā”œā”€ā”€ client.ts       # 🌐 LeadMagic API client wrapper  
│   ā”œā”€ā”€ types.ts        # šŸ“ TypeScript types and Zod schemas
│   └── install.tsx     # šŸŽØ The new interactive installer (React/Ink)
ā”œā”€ā”€ dist/               # šŸ“¦ Compiled JavaScript output
ā”œā”€ā”€ .env.example        # šŸ” Environment configuration example
└── README.md           # šŸ“š This file

šŸ“Š API Reference

šŸ”¤ Field Naming Convention

All fields use snake_case (matching LeadMagic API):

{
  "first_name": "John",
  "company_name": "Acme Corp",
  "email_status": "valid"
}

šŸ” Authentication

Include your API key in requests:

X-API-Key: your-leadmagic-api-key

ā±ļø Rate Limits

  • šŸ‘¤ Profile Search: 300 requests/minute
  • šŸ“Š Other endpoints: Standard rate limits apply

āŒ Error Handling

Consistent error format across all endpoints:

{
  "error": "Bad Request", 
  "message": "API key is missing or invalid."
}

šŸ“ˆ Credit Consumption

EndpointCreditsNotes
šŸ’³ /credits0Free to check
āœ… /email-validate0.05Very cost-effective
šŸ“§ /email-finder1Standard rate
šŸ“± /mobile-finder5Only if found
šŸ‘¤ /profile-search1Rate limited (300/min)
šŸ”— /b2b-profile10Higher cost for reverse lookup
šŸ’° /company-funding4Premium intelligence
šŸ’¼ /jobs-finder1 per jobBased on results
šŸ” /google/searchads1 per adBased on ads found
šŸ“Š All others1-2Standard rates

šŸ”’ Security & Best Practices

āœ… No API keys in code - Always use environment variables
āœ… Type-safe requests - Full TypeScript coverage with Zod validation
āœ… Error handling - Comprehensive error catching and user-friendly messages
āœ… Rate limiting - Respects LeadMagic API rate limits
āœ… Secure defaults - Production-ready configuration out of the box
āœ… Interactive installer - No manual config file editing required


šŸŽÆ Installation Matrix

Choose your installation method based on your setup:

ScenarioCommandBest For
šŸ†• First time usernpx leadmagic-mcp-server installEasiest setup
šŸ¤– Claude DesktopInteractive installer → Option 1Most popular
šŸŽÆ Cursor/VS CodeInteractive installer → Option 2/5Developers
šŸ”„ Multiple clientsInteractive installer → Option 7Power users
⚔ Quick testLEADMAGIC_API_KEY=key npx leadmagic-mcp-serverTesting
šŸ’» Local developmentClone repo + .env fileContributors

šŸ¤ Support & Resources


šŸ“„ License

MIT License - see the LICENSE file for details.


šŸ™‹ā€ā™€ļø Contributing

We welcome contributions! Here's how to get started:

  1. šŸ“ Fork the repository
  2. 🌿 Create a feature branch: git checkout -b feature/new-feature
  3. ✨ Make your changes and add tests
  4. āœ… Run validation: npm run validate
  5. šŸ’¾ Commit your changes: git commit -am 'Add new feature'
  6. šŸ“¤ Push to the branch: git push origin feature/new-feature
  7. šŸ”„ Submit a pull request

šŸ› Bug Reports

Found a bug? Please open an issue with:

  • šŸ“ Clear description of the issue
  • šŸ”„ Steps to reproduce
  • šŸ’» Your environment details
  • šŸ“‹ Expected vs actual behavior

šŸ’” Feature Requests

Have an idea? Request a feature with:

  • šŸ“– Clear description of the feature
  • šŸŽÆ Use case and benefits
  • šŸ’­ Any implementation ideas

šŸ”„ Updates & Changelog

v1.0.1 (Latest) - June 27, 2025

  • šŸŽØ Redesigned README with professional and impactful header
  • šŸ“¦ Enhanced package.json with better description and keywords
  • šŸŽÆ Improved branding and visual presentation
  • šŸ”§ Documentation polish and terminology consistency
  • šŸ·ļø Added enhanced badges with security verification
  • šŸ“š Overall professional presentation improvements

v1.0.0 - June 27, 2025

  • ✨ Interactive installer for all major AI tools
  • āœ… Support for Claude Desktop, Cursor, Windsurf, Continue.dev, VS Code, Zed
  • šŸ”§ All 19 LeadMagic API endpoints implemented
  • šŸŽÆ Zero-config npx usage
  • šŸ”’ Enhanced security and error handling
  • šŸ“š Comprehensive documentation

View complete changelog


šŸŽ‰ Built with the official LeadMagic OpenAPI specification for 100% API accuracy


🌟 Star us on GitHub • šŸ› Report Issues • šŸ’” Request Features

GitHub npm Discord

Made with ā¤ļø by the LeadMagic team

Related Servers