Instantly MCP Server
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Enables connection to Gmail accounts through the Instantly API, supporting email campaign management and deliverability monitoring through IMAP/SMTP authentication.
Provides integration with Google-based email accounts for managing email campaigns, monitoring account health, and handling email verification through the Instantly platform.
Instantly MCP Server
MCP Server for the Instantly API v2, providing access to email campaign and lead management functionality.
About Instantly API
The Instantly API v2 is a RESTful API that provides access to various resources and functions of the Instantly platform, including:
- Campaign management
- Lead management
- Email handling and verification
- Analytics
- Account management
- Blocklist management
- And more
This MCP server implements a subset of these endpoints to provide easy access to the most commonly used features.
API Reference
The full Instantly API v2 documentation is available at:
The base URL for all API requests is: https://api.instantly.ai/api/v2
Tools
This MCP server implements the following tools that map to Instantly API v2 endpoints:
instantly_create_lead
- API Endpoint:
POST /api/v2/leads
- Create a new lead
- Inputs:
email
(string)first_name
(optional string)last_name
(optional string)company_name
(optional string)campaign
(optional string, uuid)list_id
(optional string, uuid)personalization
(optional string)website
(optional string)phone
(optional string)custom_variables
(optional object)
- API Endpoint:
instantly_get_lead
- API Endpoint:
GET /api/v2/leads/{id}
- Get details of a lead by ID
- Input:
id
(string, uuid) - Returns: lead details
- API Endpoint:
instantly_list_leads
- API Endpoint:
POST /api/v2/leads/list
- List leads with optional filters
- Inputs:
campaign
(optional string, uuid)list_id
(optional string, uuid)limit
(optional number)starting_after
(optional string)
- Returns: array of leads
- API Endpoint:
instantly_update_lead
- API Endpoint:
PATCH /api/v2/leads/{id}
- Update a lead's information
- Inputs:
id
(string, uuid)first_name
(optional string)last_name
(optional string)company_name
(optional string)personalization
(optional string)website
(optional string)phone
(optional string)custom_variables
(optional object)
- API Endpoint:
instantly_delete_lead
- API Endpoint:
DELETE /api/v2/leads/{id}
- Delete a lead
- Input:
id
(string, uuid)
- API Endpoint:
instantly_list_campaigns
- API Endpoint:
GET /api/v2/campaigns
- List campaigns with pagination support
- Inputs:
limit
(optional number, default 5, max 100)starting_after
(optional string) - For pagination, use thenext_starting_after
value from the previous responsestatus
(optional number) - Filter campaigns by status (0: Draft, 1: Active, 2: Paused, 3: Completed, 4: Running Subsequences)
- Returns: array of campaigns with pagination information
- Pagination:
- First request: Call without
starting_after
- Subsequent pages: Use the
next_starting_after
value from the previous response - When there are no more pages, the response will not contain a
next_starting_after
value
- First request: Call without
- Example: To get only active campaigns, use
status: 1
- API Endpoint:
instantly_get_campaign
- API Endpoint:
GET /api/v2/campaigns/{id}
- Get details of a campaign
- Input:
id
(string, uuid) - Returns: campaign details
- API Endpoint:
instantly_get_warmup_analytics
- API Endpoint:
POST /api/v2/accounts/warmup-analytics
- Get warmup analytics for specified email accounts
- Input:
emails
(array of strings) - Returns: Health scores and metrics for email warmup performance
- Useful for monitoring email deliverability and account health
- API Endpoint:
instantly_test_account_vitals
- API Endpoint:
POST /api/v2/accounts/test/vitals
- Test the health and connectivity of email accounts in your Instantly workspace
- Input:
accounts
(array of strings) - Can test multiple email addresses at once - Returns:
- Overall test status
- Summary of successful and failed accounts
- Detailed information for each account including provider details
- Troubleshooting recommendations for failed accounts
- Helps identify issues with email account configuration, authentication, and API access
- Example:
{"accounts": ["user@example.com", "sales@company.com"]}
- API Endpoint:
instantly_get_campaign_analytics
- API Endpoint:
GET /api/v2/campaigns/analytics
- Get performance metrics for campaigns over a specified time period
- Inputs:
id
(optional string) - Campaign ID for a specific campaignstart_date
(string) - Start date in YYYY-MM-DD formatend_date
(string) - End date in YYYY-MM-DD format
- Returns: Comprehensive metrics including open rates, reply rates, lead counts and opportunity data
- API Endpoint:
Analytics Endpoints
The Instantly API provides powerful analytics endpoints to monitor the performance of your email campaigns and accounts:
- Get Warmup Analytics
- API Endpoint:
POST /api/v2/accounts/warmup-analytics
- Description: Retrieves warmup analytics data for specified email accounts
- Required Scopes:
accounts:read
,accounts:all
,all:read
, orall:all
- Request Body:Copy
- Response: Provides daily and aggregate data about sent emails, inbox placement, spam placement, and received emails, along with health scores for each account
- API Endpoint:
- Test Account Vitals
- API Endpoint:
POST /api/v2/accounts/test/vitals
- Description: Tests the health and connectivity of email accounts
- Required Scopes:
accounts:read
,accounts:all
,all:read
, orall:all
- Request Body:Copy
- Response: Returns success and failure lists with detailed information about account status and any detected issues
- API Endpoint:
- Get Campaign Analytics
- API Endpoint:
GET /api/v2/campaigns/analytics
- Description: Retrieves performance metrics for one or multiple campaigns
- Query Parameters:
id
(optional): Campaign ID for a specific campaignstart_date
: Start date for the analytics periodend_date
: End date for the analytics period
- Response: Returns comprehensive campaign statistics including:
- Total leads count
- Contacted leads count
- Email open count
- Reply count
- Bounced count
- Unsubscribed count
- Completed count
- Emails sent count
- New leads contacted count
- Total opportunities
- Total opportunity value
- API Endpoint:
For detailed information on request parameters and response formats, see the Instantly Analytics API documentation.
Additional Instantly API Endpoints
The Instantly API v2 includes many other endpoints not implemented in this MCP server, including:
- Campaign Management:
- Create campaign:
POST /api/v2/campaigns
- Activate campaign:
POST /api/v2/campaigns/{id}/activate
- Pause campaign:
POST /api/v2/campaigns/{id}/pause
- Update campaign:
PATCH /api/v2/campaigns/{id}
- Create campaign:
- Email:
- Reply to email:
POST /api/v2/emails/reply
- List emails:
GET /api/v2/emails
- Get email:
GET /api/v2/emails/{id}
- Count unread emails:
GET /api/v2/emails/unread/count
- Reply to email:
- Account Management:
- These endpoints are now available as tools in this MCP server! See the "Account Management Tools" section below.
- Email Verification:
- Verify email:
POST /api/v2/email-verification
- Verify email:
- Lead Lists:
- Create list:
POST /api/v2/lead-lists
- List lead lists:
GET /api/v2/lead-lists
- Create list:
For a complete reference of all available endpoints, see the Instantly API Explorer.
Setup
API Key
Get an Instantly API key from your Instantly account settings:
- Go to integrations in your Instantly dashboard
- Click the "API Keys" section in the left sidebar
- Click the "Create API Key" button
- Enter a name for your API key
- Select the scopes you want this key to have access to
- Create and copy your API key (note: it will only be shown once)
Usage with Claude Desktop
Add the following to your claude_desktop_config.json
:
Docker
NPX
Build
Docker build:
Authentication
The Instantly API v2 uses Bearer token authentication. Your API key should be included in the Authorization header of all requests:
The MCP server handles this automatically when you provide your API key through the environment variable.
License
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Account Management Tools
This MCP server implements the following tools for account management:
instantly_create_account
- API Endpoint:
POST /api/v2/accounts
- Create a new email account in Instantly
- Inputs:
email
(string): Email address of the accountfirst_name
(string): First name associated with the accountlast_name
(string): Last name associated with the accountprovider_code
(number): Provider code (1: Custom IMAP/SMTP, 2: Google, 3: Microsoft, 4: AWS)imap_username
(string): IMAP usernameimap_password
(string): IMAP passwordimap_host
(string): IMAP host (e.g. imap.gmail.com)imap_port
(number): IMAP port (e.g. 993)smtp_username
(string): SMTP usernamesmtp_password
(string): SMTP passwordsmtp_host
(string): SMTP host (e.g. smtp.gmail.com)smtp_port
(number): SMTP port (e.g. 587)daily_limit
(optional number): Daily email sending limittracking_domain_name
(optional string): Tracking domain name
- API Endpoint:
instantly_list_accounts
- API Endpoint:
GET /api/v2/accounts
- List email accounts in Instantly with automatic pagination
- Inputs:
limit
(optional number): The number of accounts to return per page (max 100, default 10)starting_after
(optional string): The ID of the last item in the previous page - used for paginationsearch
(optional string): Search term to filter accountsstatus
(optional number): Status filter (1: Active, 2: Paused, -1: Connection Error, -2: Soft Bounce Error, -3: Sending Error)provider_code
(optional number): Provider code filter (1: Custom IMAP/SMTP, 2: Google, 3: Microsoft, 4: AWS)fetch_all
(optional boolean): Whether to automatically fetch all pages and provide a comprehensive summary. Use this to get information about all accounts.
- Pagination:
- Default behavior: Returns a single page of results with a link to the next page
- With
fetch_all=true
: Automatically fetches all pages and returns a comprehensive summary of all accounts, including:- Total account count
- Account distribution by provider
- Account distribution by status
- Sample of accounts for reference
- API Endpoint:
instantly_get_account
- API Endpoint:
GET /api/v2/accounts/{email}
- Get details of a specific email account in Instantly
- Input:
email
(string): Email address of the account to retrieve
- API Endpoint:
instantly_update_account
- API Endpoint:
PATCH /api/v2/accounts/{email}
- Update an existing email account in Instantly
- Inputs:
email
(string): Email address of the account to updatefirst_name
(optional string): First name associated with the accountlast_name
(optional string): Last name associated with the accountdaily_limit
(optional number): Daily email sending limittracking_domain_name
(optional string): Tracking domain nameskip_cname_check
(optional boolean): Whether to skip CNAME check for tracking domainremove_tracking_domain
(optional boolean): Whether to remove tracking domain from the account
- API Endpoint:
instantly_delete_account
- API Endpoint:
DELETE /api/v2/accounts/{email}
- Delete an email account from Instantly
- Input:
email
(string): Email address of the account to delete
- API Endpoint:
instantly_pause_account
- API Endpoint:
POST /api/v2/accounts/{email}/pause
- Pause an email account in Instantly
- Input:
email
(string): Email address of the account to pause
- API Endpoint:
instantly_resume_account
- API Endpoint:
POST /api/v2/accounts/{email}/resume
- Resume a paused email account in Instantly
- Input:
email
(string): Email address of the account to resume
- API Endpoint:
Tool Testing Status
We've thoroughly tested all tools implemented in this MCP server to ensure they work correctly with the Instantly API v2. Below is a summary of the testing status:
# | Tool Name | Status | Notes |
---|---|---|---|
1 | instantly_list_campaigns | ✅ VERIFIED | Successfully lists campaigns with pagination support |
2 | instantly_list_leads | ❌ NOT WORKING | Persistent API error - "Invalid email address" when attempting to list leads |
3 | instantly_delete_lead | ✅ VERIFIED | Successfully deletes leads by ID or email address |
4 | instantly_create_lead | ✅ VERIFIED | Successfully creates new leads with proper data |
5 | instantly_get_lead | ✅ VERIFIED | Successfully retrieves lead details by ID |
6 | instantly_update_lead | ✅ VERIFIED | Successfully updates existing lead information |
7 | instantly_list_accounts | ✅ VERIFIED | Successfully lists all email accounts with statistics |
8 | instantly_get_account | ✅ VERIFIED | Successfully retrieves detailed account information |
9 | instantly_test_account_vitals | ✅ VERIFIED | Successfully retrieves account health information |
10 | instantly_get_warmup_analytics | ✅ VERIFIED | Successfully retrieves warmup data for accounts |
For more details about the testing process and results, see Testing.md in the repository.
Known Issues
- The
instantly_list_leads
tool currently returns an "Invalid email address" API error when attempting to list leads without a specific email filter. We've tried multiple approaches to fix this issue, including:- Using the
contacts
array parameter for email searches - Implementing automatic retries with empty request bodies
- Various parameter formatting approaches
We'll continue to work on resolving this issue in future releases.
- Using the
Setup for Development
If you want to contribute to this project or run it locally for development:
- Clone the repository:Copy
- Install dependencies:Copy
- Create a
.env
file in the root directory with your Instantly API key:Copy⚠️ Important: Never commit your
.env
file or API key to version control. The.env
file is included in.gitignore
to prevent accidental commits. - Build the project:Copy
- Run the server:Copy
Contributing
Contributions are welcome! If you'd like to contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Before submitting a pull request, please ensure:
- Your code follows the project's coding style
- You've added tests for new functionality
- All tests pass
- You've updated the documentation if necessary
This server cannot be installed
Provides access to Instantly API v2 for email campaign and lead management functionality.