Skip to main content
Glama
LeadMagic

LeadMagic MCP Server

by LeadMagic

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

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


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

GitHub npm Discord

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

-
security - not tested
A
license - permissive license
-
quality - not tested

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/LeadMagic/leadmagic-mcp'

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