Stores and manages LinkedIn lead data, API keys, usage tracking, and automated follow-up sequences using PostgreSQL (with Neon support)
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LinkedIn Lead Automation MCP Serversearch for marketing directors in San Francisco with SaaS experience"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LinkedIn Lead Automation MCP Server
Production-grade LinkedIn Lead Automation MCP (Model Context Protocol) Server with real-time search, analysis, scoring, messaging, and automated follow-up sequences.
Features
π Lead Discovery: Search LinkedIn profiles by keywords, location, and filters
π Profile Analysis: Extract and analyze complete LinkedIn profile data
π― AI-Powered Scoring: Intelligent lead scoring (0-100) based on profile data
π¬ Message Generation: Hyper-personalized message generation using AI
π¨ Automated Messaging: Send connection requests and direct messages
π Follow-up Sequences: Automated multi-stage follow-up campaigns
π API Key Management: Secure tier-based access control
π Usage Tracking: Monitor API usage and enforce tier limits
ποΈ PostgreSQL Support: Built with Neon PostgreSQL for production use
Architecture
MCP Server (
src/index.js): Stdio-based MCP protocol serverHTTP API (
src/http-server.js): RESTful HTTP API wrapperBackground Worker (
src/worker.js): Automated follow-up sequence processorDatabase (
src/database-pg.js): PostgreSQL database layerLinkedIn Automation (
src/linkedin.js): Chrome DevTools Protocol integrationAI Service (
src/ai.js): Anthropic Claude integration for scoring and messaging
Prerequisites
Node.js 18+
PostgreSQL (Neon or any PostgreSQL 14+)
Chrome/Chromium browser with remote debugging enabled
Anthropic API Key (for AI features)
Installation
# Clone the repository
git clone https://github.com/vikram-agentic/linkedin-mcp.git
cd linkedin-mcp
# Install dependencies
npm install
# Create .env file
cp .env.example .envConfiguration
Create a .env file with the following variables:
# Database (Neon PostgreSQL)
DATABASE_URL=postgresql://user:password@host/database?sslmode=require
# AI Service (Anthropic)
ANTHROPIC_API_KEY=your_anthropic_api_key
# Server Configuration
PORT=3001
# Chrome DevTools Protocol (optional, for browser automation)
CDP_URL=http://localhost:9222Database Setup
Create a Neon PostgreSQL database (or use any PostgreSQL 14+)
Run the schema in Neon SQL Editor:
# Use schema-neon.sql for Neon PostgreSQL
cat database/schema-neon.sqlCopy and paste the SQL from database/schema-neon.sql into Neon SQL Editor and execute it.
Usage
Start MCP Server (Stdio)
npm startThis starts the MCP server using stdio transport. Connect via MCP clients like Claude Desktop.
Start HTTP API Server
npm run httpThis starts the HTTP API server on port 3001 (or PORT from .env).
Start Background Worker
npm run workerThis starts the automated follow-up sequence processor.
API Endpoints
Health Check
GET /healthGenerate API Key
POST /api/generate-key
Body: { "tier": "starter" | "professional" | "agency" | "enterprise" }Connect Browser
POST /api/browser/connect
Body: { "cdp_url": "http://localhost:9222" }Setup LinkedIn Session
POST /api/session/setup
Body: { "api_key": "...", "li_at_cookie": "..." }Search Leads
POST /api/leads/search
Body: { "api_key": "...", "keywords": "...", "location": "...", "limit": 25 }Analyze Profile
POST /api/leads/analyze
Body: { "api_key": "...", "profile_url": "..." }Score Lead
POST /api/leads/score
Body: { "api_key": "...", "profile_url": "..." }Generate Message
POST /api/messages/generate
Body: {
"api_key": "...",
"profile_url": "...",
"value_proposition": "...",
"message_type": "connection" | "direct"
}Send Message
POST /api/messages/send
Body: {
"api_key": "...",
"profile_url": "...",
"message": "...",
"is_connection_request": false
}Create Follow-up Sequence
POST /api/sequences/create
Body: {
"api_key": "...",
"profile_url": "...",
"initial_message": "...",
"num_followups": 3
}Get Leads
GET /api/leads?api_key=...Get Usage Stats
GET /api/usage?api_key=...MCP Tools
When using as an MCP server, the following tools are available:
connect_browser: Connect to Chrome via CDPsetup_session: Authenticate LinkedIn sessionsearch_leads: Search for LinkedIn leadsanalyze_profile: Extract profile datascore_lead: AI-powered lead scoringgenerate_message: Generate personalized messagessend_message: Send messages to profilescreate_followup_sequence: Create automated sequencesgenerate_api_key: Generate API keys
Tier Limits
Tier | Profiles | Messages | Sequences |
Starter | 500/month | 200/month | 2 active |
Professional | 2,000/month | 1,000/month | 10 active |
Agency | 10,000/month | 5,000/month | Unlimited |
Enterprise | Unlimited | Unlimited | Unlimited |
Development
# Generate a test API key
npm run generate-key
# Run in development mode
npm startProduction Deployment
Set up PostgreSQL database (recommended: Neon)
Configure environment variables
Run database schema
Deploy using PM2 or similar:
pm2 start src/http-server.js --name linkedin-mcp-api
pm2 start src/worker.js --name linkedin-mcp-workerSecurity Notes
β οΈ Never commit - they contain sensitive credentials
π API keys are hashed using bcrypt
π All database queries use parameterized statements
π‘οΈ CORS is configured for production use
License
MIT License - see LICENSE file for details
Author
Agentic AI AMRO Ltd
Support
For issues and feature requests, please open an issue on GitHub.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.