Skip to content

πŸš€ Production-ready Model Context Protocol server for LeadMagic API - Complete B2B data enrichment suite with 19 powerful tools. Zero-config setup for Claude, Cursor, Windsurf, Continue.dev, and all MCP clients.

License

Notifications You must be signed in to change notification settings

LeadMagic/leadmagic-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ 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

Client Installation Status Notes
πŸ€– Claude Desktop Interactive installer or manual config βœ… Fully Supported Official Anthropic client
🎯 Cursor (Cline) Interactive installer or VS Code settings βœ… Fully Supported Requires Cline extension
πŸ„ Windsurf Interactive installer or manual config βœ… Fully Supported Codeium's AI IDE
πŸ”„ Continue.dev Interactive installer or config file βœ… Fully Supported Open source coding assistant
πŸ’» VS Code (Cline) VS Code settings.json βœ… Fully Supported Requires Cline extension
πŸ’» VS Code (Continue) Continue extension config βœ… Fully Supported Requires Continue extension
⚑ Zed Editor Interactive installer or settings βœ… Fully Supported Modern code editor
πŸ€– Aider Manual Configuration βœ… Supported AI pair programming in your terminal
✨ Augment Code Manual Configuration βœ… Supported AI coding assistant
πŸ”— Any MCP Client Manual configuration βœ… Supported Standard 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

Endpoint Credits Notes
πŸ’³ /credits 0 Free to check
βœ… /email-validate 0.05 Very cost-effective
πŸ“§ /email-finder 1 Standard rate
πŸ“± /mobile-finder 5 Only if found
πŸ‘€ /profile-search 1 Rate limited (300/min)
πŸ”— /b2b-profile 10 Higher cost for reverse lookup
πŸ’° /company-funding 4 Premium intelligence
πŸ’Ό /jobs-finder 1 per job Based on results
πŸ” /google/searchads 1 per ad Based on ads found
πŸ“Š All others 1-2 Standard 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:

Scenario Command Best For
πŸ†• First time user npx leadmagic-mcp-server install Easiest setup
πŸ€– Claude Desktop Interactive installer β†’ Option 1 Most popular
🎯 Cursor/VS Code Interactive installer β†’ Option 2/5 Developers
πŸ”„ Multiple clients Interactive installer β†’ Option 7 Power users
⚑ Quick test LEADMAGIC_API_KEY=key npx leadmagic-mcp-server Testing
πŸ’» Local development Clone repo + .env file Contributors

🀝 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