Skip to main content
Glama
LeadMagic

LeadMagic MCP Server

by LeadMagic

๐Ÿš€ LeadMagic MCP Server

IMPORTANT

This local MCP server is deprecated. LeadMagic now ships a hosted MCP server with OAuth sign-in (no API keys in your client) and the full current tool surface โ€” people/company/jobs search, enrichment, ads research, and bulk:

https://mcp.leadmagic.io/mcp

The npm package below still works against the REST API with an X-API-Key, but it is no longer maintained and misses newer tools. Please migrate to the hosted 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.

Related MCP server: fetchcraft-mcp

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Enables AI tools to search and enrich B2B leads, including finding professional emails, company profiles, and filtering people and companies by various criteria.
    5
    227
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables B2B research by finding verified work emails, extracting contacts, detecting tech stacks, and profiling DNS and SaaS, all through a suite of MCP tools.
    -
  • A
    license
    A
    quality
    D
    maintenance
    Enables business analysis, compatibility checking, and marketing campaign creation using the B2Brilliant API. Tools allow discovering and refining business information from URLs and generating personalized outreach campaigns.
    7
    21
    MIT

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