instantly-mcp-next

instantly-mcp-next

3.2

If you are the rightful owner of instantly-mcp-next and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol (MCP) server for the Instantly API v2, built with Next.js and deployable on Vercel.

Instantly MCP Server for Next.js

A Model Context Protocol (MCP) server for the Instantly API v2, built with Next.js and deployable on Vercel.

Features

  • Full implementation of the Instantly API v2 as MCP tools
  • Support for both Streamable HTTP and SSE transports
  • Optimized for deployment on Vercel with Fluid compute
  • Compatible with any MCP client (Claude, Cursor, Windsurf, etc.)

Getting Started

Prerequisites

  • Node.js 18 or later
  • (Optional) Redis for SSE transport resumability

Installation

# Clone the repository
git clone https://github.com/yourusername/instantly-mcp-next.git
cd instantly-mcp-next

# Install dependencies
npm install

Configuration

Create a .env.local file in the root directory with the following variables:

# Instantly API Key (Required)
INSTANTLY_API_KEY=your_api_key_here

# Redis URL for SSE transport resumability (Optional)
# REDIS_URL=redis://username:password@host:port

# Set NODE_ENV to production for deployment
NODE_ENV=development

# Next.js specific (Optional)
# NEXT_PUBLIC_BASE_URL=https://your-deployed-url.vercel.app

Development

# Start the development server
npm run dev

Visit http://localhost:3000 to see the server in action.

Endpoints

The MCP server exposes multiple endpoints to support different client types:

  • /api/mcp - Default endpoint for backward compatibility
  • /api/sse - For SSE transport clients
  • /api/streamable - For Streamable HTTP transport clients (recommended for new clients)

Available Tools

The server exposes all Instantly API v2 endpoints as MCP tools, including:

Leads

  • instantly_create_lead
  • instantly_get_lead
  • instantly_list_leads
  • instantly_update_lead
  • instantly_delete_lead
  • instantly_merge_leads
  • instantly_update_lead_interest_status
  • instantly_remove_lead_from_subsequence

Campaigns

  • instantly_list_campaigns
  • instantly_get_campaign
  • instantly_create_campaign
  • instantly_update_campaign
  • instantly_delete_campaign
  • instantly_start_campaign
  • instantly_stop_campaign

Accounts

  • instantly_create_account
  • instantly_list_accounts
  • instantly_get_account
  • instantly_update_account
  • instantly_delete_account
  • instantly_pause_account
  • instantly_resume_account

Analytics

  • instantly_get_warmup_analytics
  • instantly_test_account_vitals
  • instantly_get_campaign_analytics

Utilities

  • instantly_test_connection
  • instantly_mcp_info

Authentication

To use the server, you need an Instantly API key. This key should be set as an environment variable:

INSTANTLY_API_KEY=your_api_key_here

Deployment

Deploying to Vercel

  1. Fork this repository
  2. Create a new Vercel project
  3. Link the repository to your Vercel project
  4. Set the following environment variables:
    • INSTANTLY_API_KEY: Your Instantly API key
    • REDIS_URL (optional): URL to a Redis instance for SSE transport resumability
  5. Enable Fluid compute in project settings for optimal performance
  6. Deploy the project

Using with a Client

To use this server with an MCP client, simply point the client to your deployed URL:

// Example with TypeScript MCP SDK
import { Client } from "@modelcontextprotocol/sdk/client";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp";

const client = new Client({
  name: "my-client",
  version: "1.0.0"
});

const transport = new StreamableHTTPClientTransport(
  new URL("https://your-deployed-url.vercel.app/api/streamable")
);

await client.connect(transport);

// Now you can call Instantly API tools
const campaigns = await client.callTool({
  name: "instantly_list_campaigns",
  arguments: { limit: 5 }
});

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.