Multilead Open API MCP Server
A comprehensive FastMCP server providing access to the Multilead Open API with 74 endpoints for lead management, campaigns, conversations, webhooks, and analytics.
Overview
This MCP server enables Claude and other AI assistants to interact with the Multilead platform for:
Lead Management (32 endpoints): Create, retrieve, update, delete, search, and enrich leads with custom fields and tags
Campaign Management (12 endpoints): Design, execute, and monitor email campaigns with advanced targeting
Conversations (15 endpoints): Access email threads, message history, and conversation analytics
Webhooks (8 endpoints): Set up real-time event notifications for leads, campaigns, and conversations
Analytics & Reporting (7 endpoints): Generate performance reports, track metrics, and analyze trends
Features
Full async/await support for high-performance operations
Comprehensive error handling with helpful error messages
Authentication via Bearer token (API key)
Rate limiting and retry logic
Type-safe operations using Pydantic models
Example tools, resources, and prompts included
Production-ready structure for adding all 74 API endpoints
Prerequisites
Python 3.10 or higher
Package manager:
uv(recommended) orpipMultilead API Key: Get yours at https://app.multilead.co/settings/api
Installation
1. Clone or Navigate to Project
2. Create Virtual Environment
Using uv (recommended):
Using standard venv:
3. Install Dependencies
Using uv:
Using pip:
4. Configure Environment Variables
Copy the example environment file and add your API key:
Edit .env and replace your_multilead_api_key_here with your actual API key:
Important: Never commit your .env file to version control. It's already in .gitignore.
Usage
Quick Start
STDIO Mode (For Claude Desktop/Code/Cursor)
HTTP Mode (For Remote Access)
The server will be available at:
MCP Endpoint:
http://localhost:8000/mcpHealth Check:
http://localhost:8000/health
Advanced Usage
Custom HTTP Configuration
Manual Startup
STDIO:
HTTP:
Health Check
When running in HTTP mode, check server health:
Expected response:
Deployment
The Multilead MCP Server supports two deployment modes:
STDIO Deployment (Local/IDE Integration)
For Claude Desktop, Cursor, and Claude Code integration.
Quick Setup:
Copy IDE configuration template:
# For Claude Desktop (macOS) cp docs/setup/claude-desktop-config.json ~/Library/Application\ Support/Claude/claude_desktop_config.json # For Cursor cp docs/setup/cursor-mcp-config.json .cursor/mcp_config.json # For Claude Code cp docs/setup/claude-code-mcp.json .claude/mcp.jsonEdit configuration file and add your API key
Restart your IDE
Detailed Guide: IDE Setup Guide
HTTP Deployment (Remote Access)
For web services, remote access, and cloud deployment.
Development:
Production: See the complete Deployment Guide for:
systemd service configuration
Docker deployment
nginx reverse proxy setup
SSL/TLS configuration
Production best practices
Production Features
The server includes production-ready middleware:
Structured Logging: JSON or text format, file rotation
Request Logging: All requests logged with timing
Error Handling: Graceful error responses with proper status codes
Rate Limiting: Configurable per-minute and per-hour limits (100/min, 1000/hr default)
Health Checks:
/healthendpoint for monitoringResponse Timing:
X-Response-Timeheader on all responses
Configuration:
Documentation
Complete deployment documentation is available in the docs/ directory:
Deployment Guide - Complete deployment instructions
Deployment Checklist - Pre/post deployment checklist
IDE Setup Guide - Claude Desktop, Cursor, Claude Code integration
Environment Variables - Complete variable reference
Configuration Templates in
docs/setup/- Ready-to-use IDE configs
Available Tools
Lead Management (5 tools implemented)
create_lead: Create a new lead with email, name, company, tags, and custom fields
get_lead: Retrieve a lead by ID with all properties
list_leads: List and filter leads with pagination and filtering
update_lead: Update lead properties, tags, and custom fields
delete_lead: Delete a lead by ID
Example usage with Claude:
Resources
multilead://config: Server configuration and API status
multilead://stats: API usage statistics and account information
Prompts
lead_enrichment_prompt: Template for enriching lead data with AI analysis
campaign_analysis_prompt: Template for analyzing campaign performance
API Coverage
Current Implementation
5 core lead management tools (create, read, update, delete, list)
2 informational resources
2 AI prompt templates
Full error handling and authentication
Planned Tools (69 endpoints remaining)
Lead Management (27 more):
Bulk import/export
Lead scoring and enrichment
Tag management
Custom field operations
Lead lifecycle tracking
Duplicate detection
Lead assignment
Campaign Management (12 endpoints):
Campaign CRUD operations
Template management
Segment targeting
Schedule management
Performance tracking
A/B testing
Conversations (15 endpoints):
Thread retrieval
Message history
Participant tracking
Conversation analytics
Export capabilities
Webhooks (8 endpoints):
Webhook registration
Event subscriptions
Delivery logs
Webhook testing
Analytics (7 endpoints):
Lead reports
Campaign analytics
Engagement metrics
Custom reporting
Project Structure
Development
Adding New Tools
Follow the pattern in server.py:
Code Quality
Security Best Practices
Never hardcode API keys in source code
Always use environment variables for secrets
The
.envfile is in.gitignoreto prevent accidental commitsAPI keys are never logged or exposed in error messages
Use
.env.exampleas a template with placeholders only
Troubleshooting
Authentication Errors
Solution: Verify your API key is correct and active at https://app.multilead.co/settings/api
Timeout Errors
Solution: Increase the timeout in your .env file:
Rate Limiting
Solution: The API has rate limits. Wait a few minutes before retrying. Consider implementing request queuing for high-volume operations.
Connection Errors
Solution:
Check your internet connection
Verify the
MULTILEAD_BASE_URLis correctCheck if Multilead API is operational
API Documentation
For complete API reference, visit:
Official Docs: https://docs.multilead.co/api-reference
API Dashboard: https://app.multilead.co/settings/api
FastMCP Documentation
Learn more about FastMCP:
Getting Started: https://gofastmcp.com/getting-started/welcome
Server Guide: https://gofastmcp.com/servers/server
Contributing
Contributions are welcome! To add more endpoints:
Review the Multilead API documentation
Add the tool function following existing patterns
Include proper type hints and docstrings
Test the endpoint manually
Update this README with the new tool
License
MIT License - See LICENSE file for details
Support
For issues with:
This MCP server: Open an issue in the repository
Multilead API: Contact Multilead support
FastMCP framework: Visit FastMCP documentation
Changelog
Version 1.0.0 (2025-11-05)
Initial release
5 core lead management tools implemented
2 informational resources
2 AI prompt templates
Full authentication and error handling
Production-ready foundation for 74 API endpoints