Skip to main content
Glama
ahmedekramalsada

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 UI

Related MCP server: LinkedIn MCP Server

Guía de configuración

1. Crear una aplicación de LinkedIn

  1. Ve a LinkedIn Developers

  2. Haz clic en Create App (Crear aplicación)

  3. Rellena: Nombre de la aplicación, página de LinkedIn, logotipo

  4. 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)

  5. 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)

  6. 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 .env

Rellena 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.service

Archivo 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.target
sudo systemctl enable linkedin-mcp
sudo systemctl start linkedin-mcp
sudo systemctl status linkedin-mcp

4. Autenticar LinkedIn

  1. Abre: http://TU_IP_EC2:3000

  2. Haz clic en Connect LinkedIn (Conectar LinkedIn)

  3. Autoriza la aplicación en LinkedIn

  4. 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

linkedin_get_profile

Obtener tu nombre, titular, correo electrónico, foto

linkedin_create_post

Publicar texto, artículos, enlaces

linkedin_get_my_posts

Listar tus publicaciones recientes

linkedin_delete_post

Eliminar una publicación por URN

linkedin_get_post_analytics

Obtener 'me gusta'/comentarios/compartidos

linkedin_like_post

Dar 'me gusta' a cualquier publicación

linkedin_comment_on_post

Comentar en una publicación

linkedin_get_connections

Listar tu red

linkedin_search_people

Buscar personas por palabras clave

linkedin_get_auth_status

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 r_network_size

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 secreto

  • Los tokens OAuth se almacenan localmente en data/tokens.json: no subas este archivo al repositorio

  • Los 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.

A
license - permissive license
Not graded
quality - not tested
C
maintenance

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

  • A
    license
    A
    quality
    D
    maintenance
    Enables 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.
    17
    11
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    Enables AI agents to manage LinkedIn profiles, posts, connections, skills, education, and certifications through the LinkedIn API.
    18
    176
    64
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    Enables AI agents with read/write access to LinkedIn API, including profile, posts, media, organizations, comments, reactions, and analytics.
    20
    14
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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