LinkedIn MCP Server
Servidor MCP de LinkedIn
Servidor MCP full-stack que permite a tu agente de IA (batabeto/OpenClaw) controlar LinkedIn como si fueras tú: publicar, comentar, dar 'me gusta' y gestionar tu red.
Arquitectura
AI Agent (batabeto) ──MCP/HTTP──► LinkedIn MCP Server ──REST──► LinkedIn API
│
OAuth2 + Token Store
│
Dashboard UIRelated MCP server: LinkedIn MCP Server
Guía de configuración
1. Crear una aplicación de LinkedIn
Ve a LinkedIn Developers
Haz clic en Create App (Crear aplicación)
Rellena: Nombre de la aplicación, página de LinkedIn, logotipo
En la pestaña Auth (Autenticación) → Añade
Authorized redirect URLs(URLs de redireccionamiento autorizadas):http://YOUR_EC2_IP:3000/auth/callback(o tu dominio si usas nginx)
En la pestaña Products (Productos) → Solicita:
Share on LinkedIn (otorga el alcance
w_member_social)Sign In with LinkedIn using OpenID Connect (otorga
openid profile email)
Copia tu Client ID y Client Secret
2. Instalación y configuración
git clone <your-repo> linkedin-mcp
cd linkedin-mcp
npm install
cp .env.example .env
nano .envRellena el archivo .env:
LINKEDIN_CLIENT_ID=your_client_id
LINKEDIN_CLIENT_SECRET=your_client_secret
BASE_URL=http://YOUR_EC2_IP:3000
PORT=3000
MCP_SECRET_KEY=$(openssl rand -hex 32)3. Ejecutar el servidor
# Production
npm start
# Development (auto-restart)
npm run dev
# As a systemd service (recommended for EC2)
sudo nano /etc/systemd/system/linkedin-mcp.serviceArchivo de servicio systemd:
[Unit]
Description=LinkedIn MCP Server
After=network.target
[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu/linkedin-mcp
ExecStart=/usr/bin/node server.js
Restart=always
RestartSec=5
EnvironmentFile=/home/ubuntu/linkedin-mcp/.env
[Install]
WantedBy=multi-user.targetsudo systemctl enable linkedin-mcp
sudo systemctl start linkedin-mcp
sudo systemctl status linkedin-mcp4. Autenticar LinkedIn
Abre:
http://TU_IP_EC2:3000Haz clic en Connect LinkedIn (Conectar LinkedIn)
Autoriza la aplicación en LinkedIn
Serás redirigido de vuelta: el estado mostrará ✅ Connected (Conectado)
5. Conectar con tu agente de IA
Para OpenClaw (batabeto):
Añade a la configuración MCP de tu agente:
{
"mcpServers": {
"linkedin": {
"url": "http://YOUR_EC2_IP:3000/mcp",
"transport": "http",
"headers": {
"Authorization": "Bearer YOUR_MCP_SECRET_KEY"
}
}
}
}Para Claude Desktop:
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": ["mcp-remote", "http://YOUR_EC2_IP:3000/mcp", "--header", "Authorization: Bearer YOUR_MCP_SECRET_KEY"]
}
}
}Herramientas disponibles
Herramienta | Descripción |
| Obtener tu nombre, titular, correo electrónico, foto |
| Publicar texto, artículos, enlaces |
| Listar tus publicaciones recientes |
| Eliminar una publicación por URN |
| Obtener 'me gusta'/comentarios/compartidos |
| Dar 'me gusta' a cualquier publicación |
| Comentar en una publicación |
| Listar tu red |
| Buscar personas por palabras clave |
| Comprobar si está autenticado |
Ejemplos de prompts para el agente
"Post on LinkedIn: Excited to share that I just deployed a full Kubernetes cluster
with ArgoCD GitOps! #DevOps #Kubernetes"
"Get my last 5 LinkedIn posts"
"Delete my LinkedIn post with ID urn:li:ugcPost:1234567890"
"Comment 'Great insight!' on post urn:li:ugcPost:9876543210"
"Check my LinkedIn connection status"Limitaciones de la API (LinkedIn)
La API pública de LinkedIn está restringida. Aquí tienes lo que funciona y lo que no:
Función | Estado | Notas |
Crear publicaciones | ✅ Funciona | Texto, artículos, enlaces |
Eliminar publicaciones | ✅ Funciona | Solo tus publicaciones |
Dar 'me gusta' | ✅ Funciona | Cualquier publicación visible |
Comentar | ✅ Funciona | Cualquier publicación visible |
Obtener tus publicaciones | ✅ Funciona | Vía API de publicaciones UGC |
Obtener conexiones | ⚠️ Requiere alcance | Se requiere |
Buscar personas | ❌ Restringido | Requiere Partner API |
Enviar mensajes | ❌ Restringido | Requiere Partner Program |
Publicar imágenes | 🔜 Posible | Requiere flujo de carga de medios |
Seguridad
El endpoint MCP está protegido por
MCP_SECRET_KEY: mantenlo en secretoLos tokens OAuth se almacenan localmente en
data/tokens.json: no subas este archivo al repositorioLos tokens de LinkedIn caducan en 60 días; los tokens de actualización duran 365 días
El servidor actualiza automáticamente los tokens cuando quedan menos de 5 días
Abrir puerto EC2
# In AWS Security Group, allow inbound:
# Port 3000, TCP, from your agent's IP (or 0.0.0.0/0 for testing)O utiliza nginx para hacer proxy de tudominio.com/mcp a localhost:3000/mcp.
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.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to manage professional networking on LinkedIn by providing tools for posting updates, searching for jobs, and analyzing profiles. It facilitates secure interaction with the LinkedIn platform through OAuth 2.0 authentication and the Model Context Protocol.1711MIT
- FlicenseAqualityDmaintenanceEnables LLMs and agents to interact with LinkedIn's REST API for managing profiles, creating posts, viewing connections, and overseeing organizations.52
- AlicenseBqualityCmaintenanceEnables AI agents to manage LinkedIn profiles, posts, connections, skills, education, and certifications through the LinkedIn API.1817664MIT
- AlicenseBqualityAmaintenanceEnables AI agents with read/write access to LinkedIn API, including profile, posts, media, organizations, comments, reactions, and analytics.2014MIT
Related MCP Connectors
Give AI agents the LinkedIn tools to find, qualify, engage, and follow up with prospects.
Let AI tools securely access your LinkedIn network and DMs
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
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/ahmedekramalsada/linkedin-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server