LinkedIn Automation MCP Server
Leverages Google Gemini models for AI-driven content creation, analysis, and recommendation features, including post generation, trend analysis, and multi-lingual support.
Provides access to OpenAI's GPT-4 models for generating, rewriting, translating, and optimizing LinkedIn content, as well as powering other AI-assisted tasks like lead scoring and engagement strategies.
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 Automation MCP ServerFind tech leads in San Francisco"
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 Automation MCP Server
Overview
Enterprise-grade MCP (Model Context Protocol) server that enables AI assistants to manage LinkedIn workflows through secure, composable tools. Combines AI-powered content generation, lead management, profile optimization, message outreach, analytics, scheduling, and industry research into a single extensible platform.
Related MCP server: LinkedIn MCP Server
Features
Category | Tools |
Content Generation | Generate posts, rewrite content, hooks, CTAs, carousels, articles, polls, translations, hashtags, repurpose content across 10 content types and 10 tones |
Profile Optimization | Full profile analysis, headline/About generation, SEO scoring, skill recommendations, banner suggestions |
Lead Management | Find prospects by industry/company/location/title, score leads, save/export (CSV/JSON), paginated retrieval |
Message Outreach | Connection requests, follow-ups, thank-you, meeting requests, sales outreach, recruitment, networking messages |
Engagement Strategy | Post recommendations, comment generation, engagement strategies, conversation starters, industry trend analysis |
Analytics & Insights | Performance metrics, post analysis, top content, growth trends, AI recommendations, best posting times |
Content Calendar | Create calendars, schedule posts, publish, save drafts, recurring posts, timezone-aware scheduling |
Industry Research | Trend research, content ideas, competitor analysis, trending hashtags |
Multi-AI Provider | OpenAI GPT-4, Anthropic Claude 3, Google Gemini — switchable per request |
Vector Memory | Qdrant-based semantic storage for writing style, brand voice, company knowledge, successful posts, RAG |
Quick Start
git clone <repo>
cd linkedin-automation-mcp
npm install
cp .env.example .env
# Edit .env with your API keys
npm run devArchitecture
The server follows Clean Architecture with strict separation of concerns across six layers:
┌─────────────────────────────────────────────────────────────────────┐
│ AI Client (Claude, Cursor, etc.) │
└──────────────────────────────┬──────────────────────────────────────┘
│ MCP Protocol (stdio)
▼
┌──────────────────────────────────────────────────────────────────────┐
│ MCP Server Layer │
│ @modelcontextprotocol/sdk StdioServerTransport │
│ Tool registry, request routing, schema validation │
├──────────────────────────────────────────────────────────────────────┤
│ Tools Layer │
│ Content Profile Lead Message Engagement Analytics │
│ Calendar Research │
├──────────────────────────────────────────────────────────────────────┤
│ Services Layer │
│ Business logic, orchestration, validation, AI prompt building │
├──────────────────────────────────────────────────────────────────────┤
│ Provider Layer │
│ OpenAIProvider AnthropicProvider GeminiProvider LinkedIn │
├──────────────────────────────────────────────────────────────────────┤
│ Data Layer │
│ PostgreSQL (Drizzle ORM) Redis Qdrant Vector DB │
└──────────────────────────────────────────────────────────────────────┘Tech Stack
Category | Technology |
Runtime | Node.js 18+, TypeScript 5.3 |
MCP |
|
HTTP | Express 4.18, Helmet, CORS, Compression |
Validation | Zod 3.22 |
Database | PostgreSQL 16 (Drizzle ORM 0.29) |
Vector DB | Qdrant 1.8 |
Cache | Redis 7 (ioredis) |
AI | OpenAI, Anthropic, Google Gemini |
Auth | JWT, bcryptjs, LinkedIn OAuth |
Logging | Winston 3.11 |
Scheduling | node-cron 3.0 |
Testing | Jest 29, Supertest, Nock |
Linting | ESLint 8, Prettier 3 |
CI | Husky 8, lint-staged |
Project Structure
linkedin-automation-mcp/
├── src/
│ ├── index.ts # Server entry point
│ ├── config/
│ │ └── index.ts # Environment configuration
│ ├── types/
│ │ └── index.ts # TypeScript enums, interfaces, types
│ ├── database/
│ │ ├── schema.ts # Drizzle ORM schema (14 tables)
│ │ ├── connection.ts # PostgreSQL connection pool
│ │ ├── migrations/ # Database migrations
│ │ ├── index.ts # Database exports
│ │ └── seed.ts # Seed data
│ ├── providers/
│ │ ├── ai-provider.ts # AI provider interface
│ │ ├── openai-provider.ts # OpenAI GPT-4 implementation
│ │ ├── anthropic-provider.ts # Anthropic Claude 3 implementation
│ │ ├── gemini-provider.ts # Google Gemini implementation
│ │ └── linkedin-provider.ts # LinkedIn API client
│ ├── services/
│ │ ├── content-service.ts # Content generation business logic
│ │ ├── profile-service.ts # Profile optimization logic
│ │ ├── lead-service.ts # Lead management logic
│ │ ├── message-service.ts # Message generation logic
│ │ ├── engagement-service.ts # Engagement strategy logic
│ │ ├── analytics-service.ts # Analytics business logic
│ │ ├── research-service.ts # Research & trends logic
│ │ └── scheduler-service.ts # Cron-based scheduling
│ ├── tools/
│ │ ├── content-tools.ts # 10 content MCP tools
│ │ ├── profile-tools.ts # 6 profile MCP tools
│ │ ├── lead-tools.ts # 5 lead MCP tools
│ │ ├── message-tools.ts # 7 message MCP tools
│ │ ├── engagement-tools.ts # 5 engagement MCP tools
│ │ ├── analytics-tools.ts # 6 analytics MCP tools
│ │ ├── calendar-tools.ts # 7 calendar MCP tools
│ │ ├── research-tools.ts # 4 research MCP tools
│ │ ├── utils.ts # Tool utility functions
│ │ └── index.ts # Tool registry
│ ├── agents/
│ │ └── index.ts # AI agent orchestrator
│ ├── memory/
│ │ └── index.ts # Qdrant vector memory
│ ├── prompts/
│ │ └── index.ts # AI prompt templates
│ ├── middleware/
│ │ ├── auth.ts # JWT authentication
│ │ ├── error-handler.ts # Centralized error handling
│ │ ├── rate-limit.ts # Rate limiting
│ │ ├── validation.ts # Zod validation middleware
│ │ ├── async-handler.ts # Async route handler
│ │ └── log-request.ts # Request logging
│ ├── routes/
│ │ ├── auth-routes.ts # Authentication endpoints
│ │ ├── post-routes.ts # Post management endpoints
│ │ ├── profile-routes.ts # Profile optimization endpoints
│ │ ├── lead-routes.ts # Lead management endpoints
│ │ ├── message-routes.ts # Message endpoints
│ │ ├── analytics-routes.ts # Analytics endpoints
│ │ ├── calendar-routes.ts # Calendar endpoints
│ │ └── index.ts # Route aggregator
│ └── utils/
│ ├── logger.ts # Winston logger
│ ├── cache.ts # In-memory cache
│ ├── encryption.ts # AES-256-GCM encryption
│ ├── helpers.ts # Utility helpers
│ ├── rate-limiter.ts # Rate limiter helpers
│ ├── retry.ts # Retry logic
│ └── validators.ts # Zod validation schemas
├── dashboard/ # Admin dashboard (Vite + React)
├── scripts/ # Utility scripts
├── __tests__/ # Test files
├── docker-compose.yml # Docker Compose (app, postgres, qdrant, redis)
├── Dockerfile # Multi-stage build
├── .env.example # Environment variables template
├── tsconfig.json # TypeScript configuration
├── jest.config.js # Unit test configuration
├── jest.e2e.config.js # E2E test configuration
└── package.jsonMCP Tools
The server exposes 50 MCP tools across 8 categories:
Content Tools (10)
Tool | Description | Key Inputs |
| Generate a LinkedIn post with full customization | type, tone, audience, industry, topic |
| Rewrite/improve existing content | content, tone, readabilityLevel |
| Generate relevant LinkedIn hashtags | topic, industry, count, trending |
| Generate an engaging post hook | topic, tone |
| Generate a compelling call-to-action | topic, goal |
| Translate post preserving tone/hashtags | content, targetLanguage |
| Generate carousel outline with slides | topic, slides |
| Generate long-form LinkedIn article | title, topic, wordCount |
| Generate poll with question and options | topic, options |
| Repurpose blog/video/podcast to LinkedIn post | sourceContent, sourceType |
Profile Tools (6)
Tool | Description | Key Inputs |
| Full profile optimization analysis | headline, about, skills, industry, targetRole |
| Generate optimized headline (<220 chars) | current, targetRole, industry, keywords |
| Generate/optimize About section | current, targetRole, industry, keyPoints |
| SEO effectiveness analysis | headline, about, skills, experience |
| Skill recommendations for target role | currentSkills, targetRole, industry |
| LinkedIn banner design suggestions | industry, branding |
Lead Tools (5)
Tool | Description | Key Inputs |
| Search for prospects by criteria | industry, company, location, jobTitle, keywords |
| Score/qualify leads by fit and intent | prospectIds |
| Save leads to database | leads array |
| Retrieve saved leads with filters | userId, status, industry, page, limit |
| Export leads as CSV or JSON | userId, format |
Message Tools (7)
Tool | Description | Key Inputs |
| Personalized connection request (<300 chars) | prospectName, senderName, context |
| Follow-up referencing previous conversation | previousMessage, context |
| Thank-you message for relationships | context |
| Meeting invitation | meetingPurpose |
| Value-first sales outreach | product, valueProposition |
| Recruitment/InMail for talent | role, company |
| Networking message based on shared interests | commonInterest |
Engagement Tools (5)
Tool | Description | Key Inputs |
| Recommend posts to engage with | userId, industry, interests |
| Generate value-adding comment | postContent, tone |
| Like/follow engagement strategy | industry, goals |
| Generate conversation starters | topic, industry |
| Analyze trends and content opportunities | industry |
Analytics Tools (6)
Tool | Description | Key Inputs |
| Get analytics for account/date range | accountId, startDate, endDate, metrics |
| Analyze individual post performance | postId |
| Get top-performing content | accountId, limit |
| Follower/engagement growth trends | accountId, period |
| AI-powered actionable recommendations | analyticsId |
| Best times to post for engagement | accountId |
Calendar Tools (7)
Tool | Description | Key Inputs |
| Create content calendar with slots | name, frequency, slots, startDate, endDate |
| Schedule post for future publishing | postId, scheduledAt, timezone |
| Publish post immediately | postId, accountId |
| Save post as draft | content, type, tone |
| Get content calendar with scheduled posts | userId, startDate, endDate |
| Get saved drafts with pagination | userId, page, limit |
| Cancel scheduled post | postId |
Research Tools (4)
Tool | Description | Key Inputs |
| Research industry trends and content strategy | industry, topics, contentTypes |
| Generate content ideas for industry | industry, topics, contentTypes |
| Analyze competitor LinkedIn strategies | industry, topics |
| Get trending hashtags for industry | industry, topics |
Docker Setup
# Build and start all services
docker-compose up -d
# View logs
docker-compose logs -f app
# Stop all services
docker-compose down
# Rebuild after changes
docker-compose build appThe Docker Compose setup includes:
app — Node.js MCP server on port 3001
dashboard — Admin dashboard on port 5173
postgres — PostgreSQL 16 on port 5432
qdrant — Vector database on port 6333
redis — Cache on port 6379
Environment Variables
Variable | Description | Default |
| HTTP server port |
|
| Environment (development/production) |
|
| REST API base path |
|
| PostgreSQL connection string |
|
| Redis connection string |
|
| Qdrant vector DB URL |
|
| OpenAI API key | — |
| Anthropic API key | — |
| Google Gemini API key | — |
| Default AI provider |
|
| LinkedIn OAuth client ID | — |
| LinkedIn OAuth client secret | — |
| JWT signing secret | — |
| JWT token expiry |
|
| Refresh token secret | — |
| AES-256 encryption key (32 chars) | — |
| Rate limit window |
|
| Max requests per window |
|
| Allowed CORS origins |
|
| Logging level |
|
| Scheduler cron expression |
|
| Max daily scheduled posts |
|
| Cache TTL |
|
| Enable AI writer feature |
|
| Enable calendar feature |
|
| Enable lead generation |
|
| Enable analytics |
|
| Enable outreach |
|
API Endpoints
Method | Path | Description |
|
| Register new user |
|
| Login |
|
| Refresh access token |
|
| Logout |
|
| Get current user |
|
| LinkedIn OAuth authorize |
|
| LinkedIn OAuth callback |
|
| Generate post |
|
| Rewrite post |
|
| Schedule post |
|
| Publish post |
|
| Save draft |
|
| List posts |
|
| List drafts |
|
| Get post |
|
| Delete post |
|
| Optimize profile |
|
| Generate headline |
|
| Generate About section |
|
| SEO analysis |
|
| Recommend skills |
|
| Search leads |
|
| Score leads |
|
| Save leads |
|
| List leads |
|
| Export leads |
|
| Delete lead |
|
| Generate message |
|
| Generate connection request |
|
| Generate follow-up |
|
| Send message |
|
| List messages |
|
| Get analytics |
|
| Analyze post |
|
| Top content |
|
| Growth trends |
|
| Get recommendations |
|
| Best posting time |
|
| Create calendar |
|
| List calendars |
|
| Schedule post |
|
| Publish post |
|
| Save draft |
|
| List drafts |
|
| Cancel scheduled post |
|
| Health check |
Dashboard
The admin dashboard is a Vite + React application in the dashboard/ directory.
# Start dashboard in development mode
npm run dashboard:dev
# Build dashboard for production
npm run dashboard:buildTesting
# Run unit tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage
# Run end-to-end tests
npm run test:e2eDeployment
Production Build
npm run build
npm startDocker Production
docker-compose -f docker-compose.yml up -dEnvironment Configuration
Copy
.env.exampleto.envSet
NODE_ENV=productionConfigure strong
JWT_SECRETandENCRYPTION_KEYSet database credentials
Configure AI provider API keys
Set LinkedIn OAuth credentials
CI/CD Pipeline
# Suggested pipeline stages
- lint: npm run lint
- typecheck: npm run typecheck
- test: npm run test:coverage
- build: npm run build
- docker: docker-compose build
- deploy: docker-compose up -dLicense
MIT License — see LICENSE
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/abdulsammad-lgtm/LinkedIn-Automation-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server