trackmcp
Back to directory
LeadMagic

leadmagic-mcp

View on GitHub

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

7 stars TypeScriptOthers Updated Aug 25, 2026
ai-toolsapi-clientautomationb2bclaudecontinuecursordata-enrichmentemail-finderenterpriselead-generationleadmagicmcpmodel-context-protocolnodejsproduction-readysdktypescriptwindsurfzero-config

Documentation

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

>

> - Setup for every client (Claude, Claude Code, ChatGPT, Codex, Cursor, and more): leadmagic.io/docs/mcp/setup

> - Agent skills: `npx skills add LeadMagic/leadmagic-skills`

> - Claude Code plugin: LeadMagic/leadmagic-claude-plugin ยท Cursor plugin: LeadMagic/leadmagic-cursor-plugin

>

> 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.


๐Ÿ“– 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.

bash
# ๐Ÿ”ฅ 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:

bash
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:

bash
# ๐Ÿš€ 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
  • ๐Ÿ” `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

code
"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

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

๐Ÿ’ผ Job & Recruitment

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

๐Ÿ“ฑ Competitive Analysis

code
"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

bash
# ๐Ÿ“ฅ 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

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

code
โ”œโ”€โ”€ 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):

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

๐Ÿ” Authentication

Include your API key in requests:

bash
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:

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

๐Ÿ“ˆ Credit Consumption

EndpointCreditsNotes
๐Ÿ’ณ `/credits`0Free to check
โœ… `/email-validate`0.05Very cost-effective
๐Ÿ“ง `/email-finder`1Standard rate
๐Ÿ“ฑ `/mobile-finder`5Only if found
๐Ÿ‘ค `/profile-search`1Rate limited (300/min)
๐Ÿ”— `/b2b-profile`10Higher cost for reverse lookup
๐Ÿ’ฐ `/company-funding`4Premium intelligence
๐Ÿ’ผ `/jobs-finder`1 per jobBased on results
๐Ÿ” `/google/searchads`1 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 user`npx leadmagic-mcp-server install`Easiest setup
๐Ÿค– Claude DesktopInteractive installer โ†’ Option 1Most popular
๐ŸŽฏ Cursor/VS CodeInteractive installer โ†’ Option 2/5Developers
๐Ÿ”„ Multiple clientsInteractive installer โ†’ Option 7Power users
โšก Quick test`LEADMAGIC_API_KEY=key npx leadmagic-mcp-server`Testing
๐Ÿ’ป 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


Frequently asked questions

What is leadmagic-mcp?

leadmagic-mcp is ๐Ÿš€ 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.

How do I install leadmagic-mcp?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is leadmagic-mcp open source?

Yes โ€” it is hosted on GitHub at https://github.com/LeadMagic/leadmagic-mcp and has 7 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP