convez.ai
MCP ServerIntegração & APIsIntermediário
devag7

LinkedIn MCP Server

devag7/linkedin-mcp

36 ferramentas LinkedIn para Claude e IA — profiles, jobs, messaging, network

Ver no GitHub
BomPluginScore · de 0 a 100

Servidor MCP TypeScript que fornece acesso programático completo ao LinkedIn com 36 ferramentas: perfis, mensagens, vagas, empresas e feed. Funciona com Claude, Cursor e qualquer cliente MCP compatível, sem dependências externas e pronto para deploy remoto.

Instalação

$npx convez-ai devag7/linkedin-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
12
Forks
4
Acompanhando
1
Saúde
85%
Último commit
há 1 semana
Versão
v4.4.0
Issues abertas
3
Contribuidores
1

Casos de uso

  • Automação de pesquisa de perfis e prospecção B2B
  • Integração de dados LinkedIn com assistentes IA para análise de redes
  • Automação de mensagens e gerenciamento de contatos em larga escala

Veredito

MCP server bem-engineered com autenticação segura, rate limiting e cache. Limitação importante: Cloudflare bot-management bloqueia a API em muitas redes — validar compatibilidade antes de usar em produção.

README

A tradução para o português deste README ainda está na fila.

🔗 LinkedIn MCP

A comprehensive LinkedIn MCP server for AI assistants

npm version MIT License TypeScript Node.js MCP CI GitHub stars

Give Claude, Cursor, and any MCP-compatible AI assistant access to LinkedIn — profiles, messaging, jobs, companies, and more.

npx -y linkedin-mcp-tools --login   # One-time setup

Quick Start · 36 Tools · Setup Guide · Authentication · Compare


✨ Why LinkedIn MCP?

FeatureDescription
🚀Remote-FirstZero install — add a URL to your Claude config and go. No Python, no Docker required.
🔧36 ToolsProfiles, messaging, jobs, companies, network, feed, and more.
🔒SecureCookie + CSRF authentication, rate limiting, configurable CORS.
⚡Lightweight~65KB bundle. TypeScript, official MCP SDK.
🏗️Well-EngineeredLRU cache, token-bucket rate limiting, exponential backoff, structured errors.

⚠️ Important Limitation: LinkedIn's Voyager API is protected by Cloudflare bot-management. On many networks/IPs, Cloudflare returns 302 redirect loops that cannot be resolved with plain HTTP — even with a valid cookie and full cookie jar. If you experience "Too many redirects" errors, this is a Cloudflare block, not a bug. See Known Limitations for details.


🚀 Quick Start

Method 1: Remote URL (Recommended)

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "linkedin": {
      "url": "https://your-deployed-url.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

Method 2: npx (No Install)

First, save your credentials once:

npx -y linkedin-mcp-tools --login

Then add to Claude config (no env vars needed!):

{
  "mcpServers": {
    "linkedin": {
      "command": "npx",
      "args": ["-y", "linkedin-mcp-tools"]
    }
  }
}

Method 3: Clone & Run

git clone https://github.com/devag7/linkedin-mcp.git
cd linkedin-mcp
npm install
npm run dev

🛠 Available Tools

👤 Profile Tools

ToolDescription
get_profileGet any LinkedIn profile with full details (experience, education, skills)
get_my_profileGet the authenticated user's own profile
get_profile_skillsGet detailed skills with endorsement counts
get_profile_recommendationsGet recommendations given and received
get_profile_activityGet a user's recent posts and activity
get_sidebar_profilesGet "People also viewed" profile suggestions
search_peopleSearch people with advanced filters (location, company, title)

💬 Messaging Tools

ToolDescription
get_inboxList inbox conversations with read/unread filters
get_conversationRead a specific conversation thread
search_conversationsSearch messages by keyword
send_messageSend a message (supports multiline, rich text)
reply_to_threadReply to an existing conversation by thread ID
mark_conversation_readMark a conversation as read

🏢 Company Tools

ToolDescription
get_companyGet company profile, description, and details
get_company_postsGet recent posts from a company's feed
get_company_employeesList employees with filters
search_companiesSearch companies by keyword and industry
get_company_jobsGet open job positions at a company

💼 Job Tools

ToolDescription
search_jobsSearch jobs with keyword, location, and experience filters
get_job_detailsGet detailed information about a job posting
get_saved_jobsGet the user's saved/bookmarked jobs
get_job_applicantsGet applicant information (recruiter accounts)

🤝 Network Tools

ToolDescription
connect_with_personSend a connection request with optional personalized note
get_connectionsList 1st-degree connections, sorted by recently added
get_pending_invitationsView sent and received connection invitations
withdraw_invitationCancel a sent connection invitation
accept_invitationAccept a received connection invitation
get_network_statsGet network growth metrics and connection statistics

📰 Feed & Content Tools

ToolDescription
get_feedGet posts from the home feed
create_postCreate a new text post
react_to_postReact to a post (like, celebrate, support, etc.)
comment_on_postAdd a comment to a post
search_postsSearch posts by keyword or hashtag

🔧 Utility Tools

ToolDescription
whoamiGet server info, auth status, and capabilities
health_checkCheck server health and LinkedIn connectivity
get_notificationsGet recent LinkedIn notifications

🔐 Authentication

One-Time Setup (Recommended)

Run the interactive login once — credentials are saved and reused automatically:

npx linkedin-mcp-tools --login

This guides you through pasting your LinkedIn cookie or OAuth token, and saves it to ~/.linkedin-mcp/credentials.json. You never need to set env vars again.

# Check your current auth status
npx linkedin-mcp-tools --status

# Clear saved credentials
npx linkedin-mcp-tools --logout

Cookie Auth (Works with All 36 Tools)

  1. Log in to LinkedIn in your browser
  2. Open DevTools (F12) → Application → Cookies → linkedin.com
  3. Copy the li_at cookie value
  4. Copy the JSESSIONID cookie value (required — used as CSRF token)
  5. Run linkedin-mcp --login and paste when prompted

Note: Both li_at and JSESSIONID are required. The JSESSIONID provides CSRF protection that LinkedIn's API requires for authenticated requests.

OAuth 2.0 (Experimental)

OAuth support is experimental and intended for future official REST API tools. Currently, all 36 tools use LinkedIn's internal Voyager API which requires cookie auth.

  1. Create an app at LinkedIn Developer Portal
  2. Get your access token
  3. Run linkedin-mcp --login and select OAuth option

Environment Variables (Alternative)

For CI/Docker, you can use env vars instead (they override saved credentials):

export LINKEDIN_COOKIE="your_li_at_cookie_value"
export LINKEDIN_CSRF_TOKEN="your_jsessionid_value"  # Required for cookie auth
# or
export LINKEDIN_ACCESS_TOKEN="your_oauth_token"

⚡ Comparison with Alternatives

FeatureLinkedIn MCPstickerdaniel/linkedin-mcp-server
ArchitectureAPI-based (Voyager)Browser-based (Patchright + Chromium)
Cloudflare bypass⚠️ Blocked on many IPs — Cloudflare 302 loops✅ Real browser passes Cloudflare
TransportRemote HTTP + stdiostdio + experimental HTTP
Installnpx linkedin-mcp-toolsPython + uv + Chromium (~500MB)
LanguageTypeScript (official MCP SDK)Python (fastmcp — 3rd party)
Tools36 (when Cloudflare allows)17
Auth MethodsCookie + CSRF (li_at + JSESSIONID)Browser login
Rate Limiting✅ Built-in token bucket❌ None
Response Caching✅ LRU with TTL❌ None
Retry Logic✅ Exponential backoff❌ None
Bundle Size~65KB~500MB+ (includes Chromium)

Trade-off: This project is lightweight and well-engineered but relies on plain HTTP to LinkedIn's Voyager API. The browser-based alternative is heavier but bypasses Cloudflare because it uses a real browser. Choose based on whether Cloudflare blocks your network.


⚠️ Known Limitations

1. Cloudflare Bot-Management (Critical)

LinkedIn's Voyager API is protected by Cloudflare. On many networks and IP addresses, Cloudflare returns HTTP 302 redirect loops with Set-Cookie: __cf_bm that cannot be resolved with plain HTTP — even with:

  • A valid li_at cookie
  • A proper JSESSIONID (CSRF token)
  • A full cookie jar capturing and replaying __cf_bm

Result: All data tools return "Too many redirects (5)" instead of data.

Why: Cloudflare's bot detection evaluates TLS fingerprint, JavaScript execution, and browser behavior. Plain Node fetch() (and curl) cannot satisfy these checks.

Workarounds:

  • Try from a different network/IP (residential IPs sometimes pass)
  • Use the browser-based alternative (stickerdaniel/linkedin-mcp-server) which uses a real browser
  • Deploy behind a residential proxy

2. OAuth Backs 0 Tools

All 36 tools use LinkedIn's internal Voyager API (voyagerGet/voyagerPost). The restGet/restPost methods (for OAuth's official REST API) have zero call sites. OAuth configuration is accepted but produces no working tools.

3. Raw Response Format

Voyager API responses are returned as-is: { data, included[] } with URN references unresolved. Responses can be large and are not optimized for LLM consumption.


⚙️ Environment Variables

VariableRequiredDefaultDescription
LINKEDIN_ACCESS_TOKENOne of these—LinkedIn OAuth access token
LINKEDIN_COOKIEOne of these—LinkedIn li_at session cookie
LINKEDIN_CSRF_TOKENYes (with cookie)—LinkedIn JSESSIONID cookie — required for CSRF protection
PORTNo3000HTTP server port
TRANSPORTNostdioTransport mode: stdio or http
LOG_LEVELNoinfoLog level: debug, info, warn, error
CACHE_TTLNo300Cache TTL in seconds
RATE_LIMIT_RPMNo30Max requests per minute
REQUEST_TIMEOUTNo30000Request timeout in milliseconds
CORS_ORIGINNolocalhostAllowed CORS origin for HTTP transport

🛠 Development

# Clone the repo
git clone https://github.com/devag7/linkedin-mcp.git
cd linkedin-mcp

# Install dependencies
npm install

# Run in development mode (stdio)
npm run dev

# Run in HTTP mode
npm run dev -- --transport http --port 3000

# Run tests
npm test

# Type checking
npm run typecheck

# Lint
npm run lint

# Build for production
npm run build

🤝 Contributing

Contributions are welcome! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License — see the LICENSE file for details.


⚠️ Disclaimer

This project is not officially affiliated with LinkedIn. Use responsibly and in accordance with LinkedIn's Terms of Service. The authors are not responsible for any misuse or account restrictions.


📚 Related Resources


⭐ Star this repo to support the project!

If LinkedIn MCP saves you time, show your support with a star. It helps others discover the most comprehensive LinkedIn MCP server available.

Star History Chart

Made with ❤️ by Dev Agarwalla

Ver o original no GitHub

Bom para

Relacionados