A modern Model Context Protocol (MCP) server with dual transport support for HeyReach LinkedIn automation. Supports both local (stdio) and remote (HTTP streaming) connections for maximum flexibility.
- Header-based Authentication: Secure
X-API-KEYheader authentication - 83% Tool Success Rate: 5/6 core tools fully tested and working
- Session Management: Proper MCP session handling for HTTP transport
- One-Click Install: Cursor IDE integration with deeplink installation
- Docker Support: Multi-stage builds with security best practices
- Vercel & Railway: Ready-to-deploy configurations
- Health Monitoring: Built-in health check endpoints
- Session Management: Proper session handling for HTTP transport
- Latest MCP SDK: Updated to v1.17.0 with latest protocol support
- Security: DNS rebinding protection, CORS support, secure headers
- Backward Compatibility: Existing stdio usage unchanged
- Concurrent Sessions: Support for multiple simultaneous connections
Deploy your HeyReach MCP Server to the cloud instantly with automatic DNS rebinding protection configuration:
Perfect for n8n integration - Automatic environment configuration with ${{RAILWAY_PUBLIC_DOMAIN}}.
π Quick Deploy Steps:
- Click "Deploy on Railway" button above
- Sign in to Railway (connect GitHub if needed)
- Select "Deploy from GitHub repo" from the dropdown
- Search for:
bcharleson/heyreach-mcp - Click Deploy - Railway auto-detects
railway.tomlconfiguration - Done! Your MCP server will be live with automatic DNS configuration
π― Result:
https://your-app.up.railway.appready for n8n integration
Global edge deployment - Instant HTTPS and custom domain support.
π Post-deployment: Follow the Deployment Guide to configure custom domains and test n8n integration.
check-api-key- Verify API key validityget-all-campaigns- List all campaigns with paginationget-active-campaigns- Find campaigns ready for adding leads (ACTIVE status with LinkedIn senders)get-campaign-details- Get detailed campaign information (requires campaign ID)toggle-campaign-status- Pause or resume campaigns (requires campaign ID)
add-leads-to-campaign- Add LinkedIn profiles to ACTIVE campaigns with comprehensive validation and personalization supportget-lead-details- Get detailed lead profile information (requires LinkedIn profile URL)
get-conversations- Retrieve LinkedIn conversations with advanced filtering
get-overall-stats- Get comprehensive analytics and statistics
get-all-lists- Retrieve all lead lists with paginationcreate-empty-list- Create new lead or company listsget-my-network-for-sender- Get network profiles for LinkedIn accounts (requires sender ID)
Get started instantly with Cursor's one-click MCP server installation:
Perfect for remote access and cloud deployment - Works with any deployed HeyReach MCP server.
π Setup Steps:
- Click "Install in Cursor" button above
- Replace placeholders in the generated config:
YOUR_MCP_SERVER_URLβ Your deployed server URL (e.g.,https://your-app.up.railway.app)YOUR_HEYREACH_API_KEY_HEREβ Your actual HeyReach API key
- Save and restart Cursor to start using HeyReach tools!
For local development and testing - Runs HeyReach MCP server via npx.
π Setup Steps:
- Click "Install Local in Cursor" button above
- Replace placeholder in the generated config:
YOUR_HEYREACH_API_KEY_HEREβ Your actual HeyReach API key
- Save and restart Cursor to start using HeyReach tools locally!
π‘ Tip: Use the Production HTTP setup for better performance and when sharing your MCP server with n8n or other tools.
npx heyreach-mcp-server --api-key=YOUR_HEYREACH_API_KEYnpm install -g heyreach-mcp-server
heyreach-mcp-server --api-key=YOUR_HEYREACH_API_KEY# Via NPX
npx heyreach-mcp-http
# Via NPM Global Install
npm install -g heyreach-mcp-server
heyreach-mcp-http
# Or with custom port
heyreach-mcp-server --http --port=3001# Health Check
curl https://your-domain.com/health
# MCP Endpoint with URL path authentication
POST https://your-domain.com/mcp/{API_KEY}
Headers:
Content-Type: application/json
Accept: application/json, text/event-stream
# MCP Endpoint with header authentication (NEW!)
POST https://your-domain.com/mcp
Headers:
Content-Type: application/json
Accept: application/json, text/event-stream
X-API-Key: YOUR_API_KEY
# OR
Authorization: Bearer YOUR_API_KEYgit clone https://github.com/bcharleson/heyreach-mcp-server.git
cd heyreach-mcp-server
npm install
npm run build
vercel --prodnpm install -g @railway/cli
railway updocker build -t heyreach-mcp-server .
docker run -p 3000:3000 heyreach-mcp-servergit clone https://github.com/bcharleson/heyreach-mcp-server.git
cd heyreach-mcp-server
npm install
npm run build
# Stdio mode
npm start -- --api-key=YOUR_HEYREACH_API_KEY
# HTTP mode
npm run start:http--api-key=YOUR_API_KEY(required): Your HeyReach API key--base-url=CUSTOM_URL(optional): Custom base URL for the HeyReach API
heyreach-mcp-server --api-key=hr_1234567890abcdef --base-url=https://api.heyreach.io/api/public--httpor--http-server: Enable HTTP streaming transport--port=3000(optional): Port number (default: 3000)
# Start HTTP server
heyreach-mcp-server --http --port=3001
# Or use dedicated HTTP binary
heyreach-mcp-http --port=3001NODE_ENV=production
PORT=3000
CORS_ORIGIN=*
ENABLE_DNS_REBINDING_PROTECTION=trueAdd the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"heyreach": {
"command": "npx",
"args": [
"heyreach-mcp-server@2.0.0",
"--api-key=YOUR_HEYREACH_API_KEY"
]
}
}
}β CONFIRMED COMPATIBLE - All tools working with n8n community MCP node
- Install the community MCP node in n8n:
n8n-nodes-mcp - Create MCP Client (STDIO) credentials in n8n:
{
"command": "npx",
"args": [
"heyreach-mcp-server@2.0.0",
"--api-key=YOUR_HEYREACH_API_KEY"
],
"transport": "stdio"
}- Add MCP Client node to your workflows and select HeyReach credentials
- Choose from available tools for LinkedIn automation workflows
π NEW IN v2.0.0 - For cloud-based n8n instances
- Deploy HeyReach MCP Server to cloud (Vercel, Railway, etc.)
- Use HTTP Request node in n8n:
{
"url": "https://your-deployment.vercel.app/mcp/{{$env.HEYREACH_API_KEY}}",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json, text/event-stream"
},
"body": {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}
}π NEW IN v2.0.3 - Recommended for n8n users
- Deploy with one-click: Use the Railway or Vercel buttons above
- Configure custom domain: Follow the Deployment Guide
- Create MCP Client (HTTP) credentials in n8n:
MCP Client Configuration:
- Endpoint:
https://your-deployment.vercel.app/mcp - Server Transport:
HTTP Streamable - Authentication:
Header Auth - Credential: Create a new credential with:
- Name:
HeyReach MCP - X-API-Key:
YOUR_HEYREACH_API_KEY
- Name:
Example n8n MCP Client Setup:
Endpoint: https://heyreach-mcp-production.up.railway.app/mcp
Server Transport: HTTP Streamable
Authentication: Header Auth
Credential: HeyReach MCP (X-API-Key: YOUR_API_KEY)
This method is much easier than URL path authentication and more secure!
π See N8N_AGENT_SETUP.md for complete workflow examples
For other MCP-compatible clients (Cursor, Windsurf, ChatGPT, etc.), use the following configuration:
{
"command": "npx",
"args": [
"heyreach-mcp-server@2.0.0",
"--api-key=YOUR_HEYREACH_API_KEY"
],
"transport": "stdio"
}Add to your Cursor settings:
{
"mcp": {
"servers": {
"heyreach": {
"command": "npx",
"args": ["heyreach-mcp-server", "--api-key=YOUR_HEYREACH_API_KEY"]
}
}
}
}Add to your Windsurf MCP configuration:
{
"mcpServers": {
"heyreach": {
"command": "npx",
"args": ["heyreach-mcp-server", "--api-key=YOUR_HEYREACH_API_KEY"]
}
}
}For n8n Agent compatibility, use environment variables for secure API key handling:
MCP Client Credentials:
- Command:
npx - Arguments:
heyreach-mcp-server@1.2.3 - Environment:
HEYREACH_API_KEY=YOUR_HEYREACH_API_KEY
Execute Tools Node:
- Tool Parameters: Remove "Defined automatically by the model" and use:
={{ $fromAI('tool') === 'check-api-key' ? {} : $fromAI('Tool_Parameters', `Based on the selected tool, provide the required parameters as a JSON object. If the tool requires no parameters, return an empty object {}`, 'json') }}- Log in to your HeyReach account
- Navigate to Settings > API Keys
- Generate a new API key
- Copy the API key and use it in the configuration
- Command-line arguments (Claude Desktop):
--api-key=YOUR_API_KEY - Environment variables (n8n Agent):
HEYREACH_API_KEY=YOUR_API_KEY
Verify that your HeyReach API key is valid and working.
Parameters: None
Example Response:
{
"valid": true,
"status": "API key is working correctly"
}Lists all campaigns in your HeyReach account with pagination.
Parameters:
offset(number, optional, default: 0): Number of records to skiplimit(number, optional, default: 50): Maximum campaigns to return (1-100)
Example Response:
{
"campaigns": [
{
"id": 90486,
"name": "Test Campaign",
"status": "DRAFT",
"creationTime": "2025-01-24T21:30:29.037886Z",
"campaignAccountIds": []
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 6,
"hasMore": false
}
}Get detailed information about a specific campaign.
Prerequisites: Use get-all-campaigns first to get valid campaign IDs
Parameters:
campaignId(number, required): Campaign ID from get-all-campaigns
Pause or resume a campaign.
Prerequisites: Use get-all-campaigns first to get valid campaign IDs
Parameters:
campaignId(number, required): Campaign IDaction(enum, required): "pause" or "resume"
Add leads to an existing campaign.
Parameters:
campaignId(string, required): Target campaign IDleads(array, required): Array of lead objects with:firstName(string, optional)lastName(string, optional)email(string, optional)linkedinUrl(string, optional)company(string, optional)position(string, optional)
Retrieve leads from a campaign with pagination.
Parameters:
campaignId(string, required): Campaign IDpage(number, optional, default: 1): Page numberlimit(number, optional, default: 50): Results per page
Send a direct message to a lead.
Parameters:
leadId(string, required): Target lead IDmessage(string, required): Message contenttemplateId(string, optional): Message template ID
Perform LinkedIn social actions.
Parameters:
action(enum, required): "like", "follow", or "view"targetUrl(string, required): LinkedIn URL targetleadId(string, optional): Associated lead ID
Get detailed campaign performance metrics.
Parameters:
campaignId(string, required): Campaign ID
Example Response:
{
"campaignId": "camp_123",
"totalLeads": 150,
"contacted": 120,
"replied": 25,
"connected": 45,
"responseRate": 20.8,
"connectionRate": 37.5
}The server provides detailed error messages for common issues:
- Invalid API Key: Check your API key and ensure it's active
- Rate Limiting: HeyReach API has rate limits; the server will indicate when limits are exceeded
- Invalid Parameters: Detailed validation errors for incorrect tool parameters
- Network Issues: Connection and timeout error handling
- Node.js 18+
- npm or yarn
git clone https://github.com/yourusername/heyreach-mcp-server.git
cd heyreach-mcp-server
npm installnpm run dev # Start in development mode
npm run build # Build for production
npm run start # Start production build# Test with MCP Inspector
npx @modelcontextprotocol/inspector heyreach-mcp-server --api-key=YOUR_API_KEY- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details.
- Issues: GitHub Issues
- Documentation: HeyReach API Docs
- MCP Specification: Model Context Protocol
- π― 91.7% Success Rate (11/12 tools working with comprehensive validation)
- β 12 Production-Ready Tools (all validated against real API)
- π Enhanced Error Handling with pre-flight validation and actionable user guidance
- π Universal MCP Client Support (Claude, Cursor, Windsurf, ChatGPT, n8n, etc.)
- π¨ Advanced Personalization with custom fields and best practices
- π§ Campaign Status Validation prevents adding leads to DRAFT campaigns
- β New get-active-campaigns Tool for finding campaigns ready for leads
- π Type-Safe Parameters with comprehensive validation and clear documentation
- π Tool Dependencies clearly documented with prerequisites
- π API Endpoint Documentation complete validation report for HeyReach team
- π― Production-Ready Architecture with robust error prevention and user guidance