Skip to content
Back to search

linkedin-mcp-server

Open-source MCP server for LinkedIn. Give Claude and any MCP-compatible AI agent access to profiles, companies, jobs, and messages.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/stickerdaniel/linkedin-mcp-server with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/stickerdaniel/linkedin-mcp-server'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/stickerdaniel--linkedin-mcp-server/badge.svg)](/listings/stickerdaniel--linkedin-mcp-server)

HTML

<a href="/listings/stickerdaniel--linkedin-mcp-server"><img src="/api/listings/stickerdaniel--linkedin-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

| Tool | Description | |------|-------------| | `get_person_profile` | Read profile sections such as experience, education, skills, projects, and posts. | | `get_my_profile` | Read your own profile, with the same section selection as other profiles. | | `connect_with_person` | Send a connection request with an optional note, or accept an incoming one. | | `get_sidebar_profiles` | Find recommended profile links, including people you may know. | | `get_inbox` | List recent inbox conversations, with links to open individual threads. | | `get_conversation` | Read a conversation's messages using a LinkedIn username or thread ID. | | `search_conversations` | Search messages by keyword and return links to matching conversation threads. | | `send_message` | Send after confirmation; profile targets may open a new DM ([#483](https://github.com/stickerdaniel/linkedin-mcp-server/issues/483)). | | `get_company_profile` | Read company information, with optional sections for posts and open jobs. | | `get_company_posts` | Read recent posts from a company's feed, with links to the original posts. | | `search_companies` | Find companies by keyword and return links to their LinkedIn profiles. | | `get_company_employees` | Find company employees, optionally filtered by name, title, or skill. | | `search_jobs` | Find job postings by keyword and location, with job IDs for reading details. | | `get_saved_jobs` | List your saved job postings, with job IDs for looking up their details. | | `search_people` | Find people by keyword, location, connection degree, and current company. | | `get_job_details` | Read a job posting's description, requirements, and company details. | | `get_job_apply_url` | Check whether a job uses Easy Apply or links to an employer's application. | | `get_feed` | Read recent posts from your home feed, with links to the original posts. | | `search_posts` | Search posts by keyword, optionally limited to the past day, week, or month. | | `close_session` | Close the shared browser session without deleting your saved login. |

<br/> <br/>

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 17 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "linkedin-mcp-server",
  3. "owner": {
  4. "name": "Daniel Sticker",
  5. "url": "https://daniel.sticker.name/"
  6. },
  7. "metadata": {
  8. "description": "The LinkedIn MCP Server plugin: a local, browser-backed MCP server and its skill."
  9. },
  10. "plugins": [
  11. {
  12. "name": "linkedin-mcp-server",
  13. "source": "./plugins/linkedin-mcp-server",
  14. "description": "Research LinkedIn through a local, browser-backed MCP server."
  15. }
  16. ]
  17. }
README.md · README · 978 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # MCP Server for LinkedIn
  2. <!-- mcp-name: io.github.stickerdaniel/linkedin-mcp-server -->
  3. <p align="left">
  4. <a href="https://pypi.org/project/mcp-server-linkedin/" target="_blank"><img src="https://img.shields.io/pypi/v/mcp-server-linkedin?color=blue" alt="PyPI"></a>
  5. <a href="https://github.com/stickerdaniel/linkedin-mcp-server/actions/workflows/ci.yml" target="_blank"><img src="https://github.com/stickerdaniel/linkedin-mcp-server/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI Status"></a>
  6. <a href="https://github.com/stickerdaniel/linkedin-mcp-server/actions/workflows/release.yml" target="_blank"><img src="https://github.com/stickerdaniel/linkedin-mcp-server/actions/workflows/release.yml/badge.svg?branch=main" alt="Release"></a>
  7. <a href="https://github.com/stickerdaniel/linkedin-mcp-server/blob/main/LICENSE" target="_blank"><img src="https://img.shields.io/badge/License-Apache%202.0-%233fb950?labelColor=32383f" alt="License"></a>
  8. </p>
  9. Give your AI agents access to LinkedIn through your own browser session. Read profiles, research companies, find jobs, and manage conversations and connection requests.
  10. > Independent open-source project. Not affiliated with LinkedIn or Microsoft. LinkedIn is a trademark of LinkedIn Corporation.
  11. <br/>
  12. <details open>
  13. <summary><strong>LinkedIn MCP Sponsor</strong></summary>
  14. <br/>
  15. <a href="https://golink.onl/linkupapi-banner" target="_blank">
  16. <picture>
  17. <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/df9f3784-4db3-4a30-a908-ca9aae32f54c">
  18. <img src="https://github.com/user-attachments/assets/e3a019f0-0dbe-4b91-8e41-684d5ea69893" alt="LinkupAPI, the outreach API for your AI agents" width="100%">
  19. </picture>
  20. </a>
  21. > Running LinkedIn agents in production? [**LinkupAPI**](https://golink.onl/linkupapi-link) is the hosted outreach API built for scale, across LinkedIn Classic, Sales Navigator, and Recruiter, plus email, WhatsApp, and iMessage.
  22. [Try LinkupAPI free →](https://golink.onl/linkupapi-free)
  23. <br/>
  24. <a href="https://golink.onl/cadenza-banner" target="_blank">
  25. <picture>
  26. <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/e7dc04a7-4b2c-4f8f-bffa-77895f02a9b4">
  27. <img src="https://github.com/user-attachments/assets/8b8ffaf4-ac80-4943-bb14-88562d636a35" alt="Cadenza, hosted LinkedIn MCP for your AI assistant" width="100%">
  28. </picture>
  29. </a>
  30. > [**Cadenza**](https://golink.onl/cadenza-link) is the single hosted MCP server for all your LinkedIn needs. It covers Classic, Sales Navigator, and Recruiter with 100+ actions, each within limits you set. Works on web, desktop, and mobile.
  31. Use code <strong>FOUNDING20</strong> for 20% off your first year. <a href="https://golink.onl/cadenza-cta">Try Cadenza →</a>
  32. <br/>
  33. <a href="https://golink.onl/unipile-banner" target="_blank">
  34. <picture>
  35. <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/c2e7f3b4-6812-4f28-8728-10f882a44e0e">
  36. <img src="https://github.com/user-attachments/assets/89ab8932-ae79-41c2-8416-a699e924218b" alt="Unipile, one API for every LinkedIn feature" width="100%">
  37. </picture>
  38. </a>
  39. > This MCP server is supported by [**Unipile**](https://golink.onl/unipile-link). Unipile is the fully managed cloud option for developers: a hosted LinkedIn API for Classic, Sales Navigator, and Recruiter that handles auth, sessions, and infrastructure for you.
  40. [Try Unipile free for 7 days →](https://golink.onl/unipile-free-trial)
  41. <br/>
  42. <a href="https://zernio.link/sticker-daniel-banner" target="_blank">
  43. <picture>
  44. <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/f8b34875-c2b7-4466-b430-51fda4875720">
  45. <img src="https://github.com/user-attachments/assets/ef30cb05-80a7-4b03-a9d4-186c6db2fe43" alt="Zernio, official APIs for every social channel" width="100%">
  46. </picture>
  47. </a>
  48. > [**Zernio**](https://zernio.link/sticker-daniel-link) gives your agents official APIs for every social channel. Post, reply, and run ads on Instagram, TikTok, X, YouTube, Threads, and more, through one API or MCP server.
  49. [Try Zernio free →](https://zernio.link/sticker-daniel-free)
  50. </details>
  51. ---
  52. <a id="installation-methods"></a>
  53. ## Installation Methods - LinkedIn MCP Server
  54. [![uvx](https://img.shields.io/badge/uvx-Quick_Install-de5fe9?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDEiIGhlaWdodD0iNDEiIHZpZXdCb3g9IjAgMCA0MSA0MSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTS01LjI4NjE5ZS0wNiAwLjE2ODYyOUwwLjA4NDMwOTggMjAuMTY4NUwwLjE1MTc2MiAzNi4xNjgzQzAuMTYxMDc1IDM4LjM3NzQgMS45NTk0NyA0MC4xNjA3IDQuMTY4NTkgNDAuMTUxNEwyMC4xNjg0IDQwLjA4NEwzMC4xNjg0IDQwLjA0MThMMzEuMTg1MiA0MC4wMzc1QzMzLjM4NzcgNDAuMDI4MiAzNS4xNjgzIDM4LjIwMjYgMzUuMTY4MyAzNlYzNkwzNy4wMDAzIDM2TDM3LjAwMDMgMzkuOTk5Mkw0MC4xNjgzIDM5Ljk5OTZMMzkuOTk5NiAtOS45NDY1M2UtMDdMMjEuNTk5OCAwLjA3NzU2ODlMMjEuNjc3NCAxNi4wMTg1TDIxLjY3NzQgMjUuOTk5OEwyMC4wNzc0IDI1Ljk5OThMMTguMzk5OCAyNS45OTk4TDE4LjQ3NzQgMTYuMDMyTDE4LjM5OTggMC4wOTEwNTkzTC01LjI4NjE5ZS0wNiAwLjE2ODYyOVoiIGZpbGw9IiNERTVGRTkiLz4KPC9zdmc+Cg==)](#setup-with-uvx-recommended)
  55. [![Install MCP Bundle](https://img.shields.io/badge/Claude_Desktop_MCPB-d97757?style=for-the-badge&logo=anthropic)](#claude-desktop-mcp-bundle-formerly-dxt)
  56. [![Codex Plugin](https://img.shields.io/badge/Codex-Plugin-24292f?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI%2BPHBhdGggZmlsbD0iI2ZmZmZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04LjA4Ni40NTdhNi4xMDUgNi4xMDUgMCAwMTMuMDQ2LS40MTVjMS4zMzMuMTUzIDIuNTIxLjcyIDMuNTY0IDEuN2EuMTE3LjExNyAwIDAwLjEwNy4wMjljMS40MDgtLjM0NiAyLjc2Mi0uMjI0IDQuMDYxLjM2NmwuMDYzLjAzLjE1NC4wNzZjMS4zNTcuNzAzIDIuMzMgMS43NyAyLjkxOCAzLjE5OC4yNzguNjc5LjQxOCAxLjM4OC40MjEgMi4xMjZhNS42NTUgNS42NTUgMCAwMS0uMTggMS42MzEuMTY3LjE2NyAwIDAwLjA0LjE1NSA1Ljk4MiA1Ljk4MiAwIDAxMS41NzggMi44OTFjLjM4NSAxLjkwMS0uMDEgMy42MTUtMS4xODMgNS4xNGwtLjE4Mi4yMmE2LjA2MyA2LjA2MyAwIDAxLTIuOTM0IDEuODUxLjE2Mi4xNjIgMCAwMC0uMTA4LjEwMmMtLjI1NS43MzYtLjUxMSAxLjM2NC0uOTg3IDEuOTkyLTEuMTk5IDEuNTgyLTIuOTYyIDIuNDYyLTQuOTQ4IDIuNDUxLTEuNTgzLS4wMDgtMi45ODYtLjU4Ny00LjIxLTEuNzM2YS4xNDUuMTQ1IDAgMDAtLjE0LS4wMzJjLS41MTguMTY3LTEuMDQuMTkxLTEuNjA0LjE4NWE1LjkyNCA1LjkyNCAwIDAxLTIuNTk1LS42MjIgNi4wNTggNi4wNTggMCAwMS0yLjE0Ni0xLjc4MWMtLjIwMy0uMjY5LS40MDQtLjUyMi0uNTUxLS44MjFhNy43NCA3Ljc0IDAgMDEtLjQ5NS0xLjI4MyA2LjExIDYuMTEgMCAwMS0uMDE3LTMuMDY0LjE2Ni4xNjYgMCAwMC4wMDgtLjA3NC4xMTUuMTE1IDAgMDAtLjAzNy0uMDY0IDUuOTU4IDUuOTU4IDAgMDEtMS4zOC0yLjIwMiA1LjE5NiA1LjE5NiAwIDAxLS4zMzMtMS41ODkgNi45MTUgNi45MTUgMCAwMS4xODgtMi4xMzJjLjQ1LTEuNDg0IDEuMzA5LTIuNjQ4IDIuNTc3LTMuNDkzLjI4Mi0uMTg4LjU1LS4zMzQuODAyLS40MzguMjg2LS4xMi41NzMtLjIyLjg2MS0uMzA0YS4xMjkuMTI5IDAgMDAuMDg3LS4wODdBNi4wMTYgNi4wMTYgMCAwMTUuNjM1IDIuMzFDNi4zMTUgMS40NjQgNy4xMzIuODQ2IDguMDg2LjQ1N3ptLS44MDQgNy44NWEuODQ4Ljg0OCAwIDAwLTEuNDczLjg0MmwxLjY5NCAyLjk2NS0xLjY4OCAyLjg0OGEuODQ5Ljg0OSAwIDAwMS40Ni44NjRsMS45NC0zLjI3MmEuODQ5Ljg0OSAwIDAwLjAwNy0uODU0bC0xLjk0LTMuMzkzem01LjQ0NiA2LjI0YS44NDkuODQ5IDAgMDAwIDEuNjk1aDQuODQ4YS44NDkuODQ5IDAgMDAwLTEuNjk2aC00Ljg0OHoiLz48L3N2Zz4%3D)](#codex-plugin)
  57. [![Claude Code Plugin](https://img.shields.io/badge/Claude_Code-Plugin-d97757?style=for-the-badge&logo=claude&logoColor=d97757)](#claude-code-plugin)
  58. [![Cursor Plugin](https://img.shields.io/badge/Cursor-Plugin-000000?style=for-the-badge&logo=cursor)](#cursor-plugin)
  59. [![Docker](https://img.shields.io/badge/Docker-Universal_MCP-008fe2?style=for-the-badge&logo=docker&logoColor=008fe2)](#setup-with-docker)
  60. | Tool | Description |
  61. |------|-------------|
  62. | `get_person_profile` | Read profile sections: experience, education, skills, projects, volunteering, posts. |
  63. | `get_my_profile` | Read your own profile, with the same section selection as other profiles. |
  64. | `connect_with_person` | Send a connection request with an optional note, or accept an incoming one. |
  65. | `get_sidebar_profiles` | Find recommended profile links, including people you may know. |
  66. | `get_inbox` | List recent inbox conversations, with links to open individual threads. |
  67. | `get_conversation` | Read a conversation's messages using a LinkedIn username or thread ID. |
  68. | `search_conversations` | Search messages by keyword and return links to matching conversation threads. |
  69. | `archive_conversation` | Archive a conversation by thread ID; a repeat call reports it already archived. |
  70. | `send_message` | Message a profile after confirmation. Threads use `reply_to_conversation`. |
  71. | `reply_to_conversation` | Reply inside an existing thread or InMail by thread ID. Sends after confirmation. |
  72. | `get_company_profile` | Read company information, with optional sections for posts and open jobs. |
  73. | `get_company_posts` | Read recent posts from a company's feed, with links to the original posts. |
  74. | `search_companies` | Find companies by keyword and return links to their LinkedIn profiles. |
  75. | `get_company_employees` | Find company employees, optionally filtered by name, title, or skill. |
  76. | `search_jobs` | Find job postings by keyword and location, with job IDs for reading details. |
  77. | `get_saved_jobs` | List your saved job postings, with job IDs for looking up their details. |
  78. | `dismiss_job` | Dismiss a job from job search so later searches no longer show it. Irreversible. |
  79. | `search_people` | Find people by keyword, location, degree, company, and mutual connections. |
  80. | `get_job_details` | Read a job posting's description, requirements, and company details. |
  81. | `get_job_apply_url` | Check whether a job uses Easy Apply or links to an employer's application. |
  82. | `get_easy_apply_form` | Read an Easy Apply form's fields, options and prefilled values. Never submits. |
  83. | `get_feed` | Read recent posts from your home feed, with links to the original posts. |
  84. | `search_posts` | Search posts by keyword, optionally filtered by recency or content type. |
  85. | `get_session_status` | Check your saved login and browser state without opening a browser. |
  86. | `close_session` | Close the shared browser session without deleting your saved login. |
  87. <br/>
  88. <br/>
  89. ## Setup with uvx (Recommended)
  90. **Prerequisites:** [Install uv](https://docs.astral.sh/uv/getting-started/installation/).
  91. ### Installation
  92. **Add to your MCP client's `mcpServers` configuration**
  93. ```json
  94. {
  95. "mcpServers": {
  96. "mcp-server-linkedin": {
  97. "command": "uvx",
  98. "args": ["mcp-server-linkedin@latest"],
  99. "env": { "UV_HTTP_TIMEOUT": "300" }
  100. }
  101. }
  102. }
  103. ```
  104. The `@latest` tag turns on automatic updates, which keep the server working with LinkedIn's current page structure. The server starts quickly and prepares the shared Patchright Chromium browser cache in the background under `~/.linkedin-mcp/patchright-browsers`. On the first tool call that needs authentication, it reuses a LinkedIn session from a signed-in local browser if it finds one, and otherwise opens a LinkedIn login browser window.
  105. AI agent? Get a quick confirmation from the user before enabling automatic updates.
  106. > [!NOTE]
  107. > Early tool calls may return a setup/authentication-in-progress error until browser setup or login finishes. If you prefer to create a session explicitly, run `uvx mcp-server-linkedin@latest --login`.
  108. ### Setup Help
  109. <details>
  110. <summary><b>🔧 Configuration</b></summary>
  111. <details>
  112. <summary>Transport modes</summary>
  113. - **Default (stdio)**: Standard communication for local MCP servers
  114. - **Streamable HTTP**: For a web-based MCP server
  115. - If no transport is specified, the server defaults to `stdio`
  116. - An interactive terminal without explicit transport shows a chooser prompt
  117. </details>
  118. <details>
  119. <summary>CLI options</summary>
  120. **Session:**
  121. - `--login` - Open a browser to sign in and save the session
  122. - `--import-from-browser [BROWSER]` - Reuse a session from a locally signed-in Chromium browser (`chrome`, `chromium`, `brave`, `edge`, `arc`, `vivaldi`, `helium`, `yandex`, `whale`, `coccoc`, `opera`, `opera_gx`, `auto`). Bare flag picks `auto`, the most recently used browser with a live LinkedIn session.
  123. - `--auto-import` / `--no-auto-import` - Import a session from a signed-in local browser on the first tool call that needs one, before falling back to manual login (default: on). Skipped in Docker, behind a proxy, and on a non-loopback HTTP bind. On macOS the keychain may prompt once.
  124. - `--logout` - Clear the stored session
  125. - `--login-viewer` - Docker only: show the `--login` browser at a token-protected URL on port 6080 (see [Authentication](#authentication))
  126. - `--user-data-dir PATH` - Browser profile directory (default: ~/.linkedin-mcp/profile). Rotating or clearing a session deletes this directory *and its parent*, which holds the stored cookies and derived profiles.
  127. - `--claim-profile-root` - Take over a profile directory the server will not claim on its own, such as one whose parent already holds other files. Needed once per directory.
  128. **Transport:**
  129. - `--transport {stdio,streamable-http}` - Force the transport mode (default: stdio)
  130. - `--host HOST` / `--port PORT` / `--path PATH` - HTTP server address (defaults: 127.0.0.1, 8000, /mcp)
  131. **Timeouts:**
  132. - `--timeout MS` - Timeout for a single page operation (default: 5000)
  133. - `--tool-timeout SECONDS` - Timeout for a whole tool call (default: 180). Raise it for calls that read many pages, slow networks, or a cold-start browser.
  134. - `--login-timeout SECONDS` - How long the login browser waits for you to finish signing in (default: 1800; 0 = no limit). `--login-viewer` ends the session after 30 minutes either way.
  135. - `--login-inline-wait SECONDS` - How long a tool call waits for a login to finish before telling the model to retry (default: 25, max 45; 0 = return at once)
  136. **Shared browser:**
  137. - `--browser-wait SECONDS` - How long to wait for another server process to hand over the shared browser (default: 25, max 45; 0 = report busy at once). Only matters with several MCP clients running at once.
  138. - `--browser-min-hold SECONDS` - Shortest time this process keeps the shared browser before handing it over (default: 20). Clamped to 3 seconds below `--browser-wait`, so raise that one along with it. Higher means fewer browser restarts but longer waits for other clients.
  139. - `--browser-idle-timeout SECONDS` - Close an idle browser and release the profile after this long without a tool call (default: 600; 0 = keep it open)
  140. **Browser:**
  141. - `--no-headless` - Show the browser window (useful for debugging)
  142. - `--chrome-path PATH` - Path to a Chrome/Chromium executable
  143. - `--proxy-server URL` - Route browser traffic through a proxy, as `scheme://host:port`. Set it up **before** `--login`; see [Using a proxy](#using-a-proxy).
  144. **Other:**
  145. - `--log-level {DEBUG,INFO,WARNING,ERROR}` - Logging level (default: WARNING)
  146. </details>
  147. <details>
  148. <summary>Import a session from your everyday browser</summary>
  149. If you are already signed into LinkedIn in Chrome, Chromium, Brave, Edge, Arc, Vivaldi, Helium, Yandex, Naver Whale, Cốc Cốc, Opera, or Opera GX, you can skip the manual `--login` step and reuse that session:
  150. ```bash
  151. # Auto-pick the most recently used browser with a live LinkedIn session
  152. uvx mcp-server-linkedin@latest --import-from-browser
  153. # Or target a specific browser
  154. uvx mcp-server-linkedin@latest --import-from-browser brave
  155. ```
  156. This reads the browser's LinkedIn cookies, validates them against your feed, and saves them to `~/.linkedin-mcp/profile/`, the same place `--login` writes to. Notes:
  157. - With several signed-in browsers, the most recently used live LinkedIn session is tried first. If LinkedIn rejects it (revoked or remote-logged-out), the next most recent is tried automatically; the first the server accepts is imported. There is no prompt to pick. Pass a browser name to target one specifically.
  158. - On macOS the OS keychain may prompt to allow access to the browser's Safe Storage. Close the source browser first for the most reliable read.
  159. - Cookies protected by Chrome 127+ app-bound encryption (`v20`) cannot be decrypted without OS elevation; in that case use `--login` instead.
  160. - Imported cookies match a real login's on-disk set. The local server reads them back in full from the saved profile; the Docker bridge narrows to the same minimal auth subset it uses for a normal session.
  161. </details>
  162. <details>
  163. <summary>HTTP mode and debugging</summary>
  164. **Basic Usage Examples:**
  165. ```bash
  166. # Run with debug logging
  167. uvx mcp-server-linkedin@latest --log-level DEBUG
  168. ```
  169. **HTTP Mode Example (for web-based MCP clients):**
  170. ```bash
  171. uvx mcp-server-linkedin@latest --transport streamable-http --host 127.0.0.1 --port 8080 --path /mcp
  172. ```
  173. Runtime server logs are emitted by FastMCP/Uvicorn.
  174. Tool calls are serialized to protect the shared LinkedIn browser session, both
  175. within one server process and across separate ones. If you run several MCP
  176. clients at once, each starts its own server process, and only one of them uses
  177. the browser at a time; the others wait briefly and take over as soon as it
  178. finishes a call. A client that waits too long gets a "browser is busy" message
  179. and can simply retry. Use `--log-level DEBUG` to see the wait/acquire/release
  180. logs.
  181. This covers processes on the same machine and in the same runtime. It does not
  182. extend between the host and a Docker container sharing the same
  183. `~/.linkedin-mcp` directory, so do not run `--login` or `--logout` on the host
  184. while a container is running.
  185. **Test with mcp inspector:**
  186. 1. Install and run mcp inspector ```bunx @modelcontextprotocol/inspector```
  187. 2. Click pre-filled token url to open the inspector in your browser
  188. 3. Select `Streamable HTTP` as `Transport Type`
  189. 4. Set `URL` to `http://localhost:8080/mcp`
  190. 5. Connect
  191. 6. Test tools
  192. </details>
  193. </details>
  194. <details>
  195. <summary><b>❗ Troubleshooting</b></summary>
  196. <details>
  197. <summary>Installation issues</summary>
  198. - Ensure you have uv installed: `curl -LsSf https://astral.sh/uv/install.sh | sh`
  199. - Check uv version: `uv --version` (should be 0.4.0 or higher)
  200. - On first run, `uvx` downloads all Python dependencies. On slow connections, uv's default 30s HTTP timeout may be too short. The recommended config above already sets `UV_HTTP_TIMEOUT=300` (seconds) to avoid this.
  201. - *Windows, `DLL load failed while importing _greenlet`*: move to greenlet 3.5.5 or newer, whose published Windows wheels carry the C++ runtime inside the extension again. A fresh `uvx` run resolves that on its own; an environment that pins its dependencies needs `uv lock --upgrade-package greenlet`. Only greenlet 3.3.1 through 3.5.4 need `MSVCP140.dll`, which neither the python.org installer nor the `uv`-managed builds carry, and a greenlet built from source can need it at any version. Where the version cannot be moved, the [Microsoft Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist) supplies that DLL. Reported as [greenlet#525](https://github.com/python-greenlet/greenlet/issues/525), fixed in [greenlet#526](https://github.com/python-greenlet/greenlet/pull/526).
  202. </details>
  203. <details>
  204. <summary>Session issues</summary>
  205. - Browser profile is stored at `~/.linkedin-mcp/profile/`
  206. - Managed browser downloads are cached at `~/.linkedin-mcp/patchright-browsers/`
  207. - *The browser cache keeps growing*: a server upgrade can bring a new Chromium revision, and Patchright keeps the old one for as long as any installed version still references it. `uvx` keeps one archive per version you have ever run, so every one of them holds such a reference and the old revisions stay. The server logs a warning naming the revisions it is holding and how much space they take. To reclaim it, stop every LinkedIn MCP Server instance, delete `~/.linkedin-mcp/patchright-browsers/`, and let the next launch download the current browser.
  208. </details>
  209. <details>
  210. <summary>Login issues</summary>
  211. - Make sure you have only one active LinkedIn session at a time
  212. - LinkedIn may require a login confirmation in the LinkedIn mobile app for `--login`
  213. - LinkedIn may show a captcha challenge during login. Run `uvx mcp-server-linkedin@latest --login` which opens a browser where you can solve it manually.
  214. </details>
  215. <details>
  216. <summary>Timeout issues</summary>
  217. - *Page operations failing* (elements not found, navigation hangs): increase the browser page-op timeout: `--timeout 10000` or `TIMEOUT=10000` (milliseconds, default 5000).
  218. - *Entire tool calls timing out* (e.g. multi-section profiles, cold-start Chromium, slow containers): increase the per-tool execution timeout: `--tool-timeout 300` or `TOOL_TIMEOUT=300` (seconds, default 180).
  219. - *First tool call with no session*: if a locally logged-in browser has a live LinkedIn session, the server auto-imports it (see `AUTO_IMPORT_FROM_BROWSER` / `--auto-import`) instead of forcing a manual login. On macOS the keychain may prompt once for Safe Storage access. If no importable browser session exists, it falls back to opening a login window and waits up to `LOGIN_INLINE_WAIT` seconds (default 25, max 45; `--login-inline-wait`) so a quick sign-in resolves in one call. If the wait elapses, the tool returns a pending signal and the model retries in about 30 seconds. Neither the auto-import nor the inline wait applies under Docker or when the server is bound to a non-loopback HTTP host. Create the session on the host with `--login`, or use the explicit Docker `--login --login-viewer` command.
  220. - Users on slow connections may need higher values for either.
  221. </details>
  222. <details>
  223. <summary>Told to run <code>--login</code> on the host when you already did</summary>
  224. - If tool calls answer "No valid LinkedIn session is available in Docker" on a machine that is *not* a container, the runtime was misdetected. This happened on Linux hosts running a Docker daemon for unrelated services. Set `LINKEDIN_MCP_CONTAINER=false` to override the detection; `true` forces the opposite.
  225. </details>
  226. <details>
  227. <summary>Custom Chrome path</summary>
  228. - If Chrome is installed in a non-standard location, use `--chrome-path /path/to/chrome`
  229. - Can also set via environment variable: `CHROME_PATH=/path/to/chrome`
  230. - On macOS and Linux the browser must be at least as new as the one that last opened your profile, and the server refuses the launch otherwise. (Not on Windows: a browser there cannot be asked its version without starting one, so the check is off.) An older browser can silently drop stores a newer one wrote, the saved session among them, and the failure then looks exactly like an expired login. The message names both versions. Going back to the bundled Chromium after running a newer Chrome once is the usual way to meet this; either run the newer browser again, whichever one that was, or run `--login`, which moves the stored session aside and signs in fresh with the browser you have. `--logout` also clears it but discards the old session instead of keeping it recoverable, and it asks for confirmation on the terminal, so it is not usable from a server an MCP client started.
  231. - Only Chrome, Chromium and Chrome for Testing are compared this way. Forks number themselves differently (Vivaldi is on 7.x, Edge's build number sits far below Chrome's under the same major), so pointing `CHROME_PATH` at one turns the check off rather than producing a refusal nothing could satisfy.
  232. </details>
  233. </details>
  234. <br/>
  235. <br/>
  236. ## Claude Desktop MCP Bundle (formerly DXT)
  237. **Prerequisites:** [Claude Desktop](https://claude.ai/download).
  238. ### Installation
  239. 1. Download the latest `.mcpb` artifact from [releases](https://github.com/stickerdaniel/linkedin-mcp-server/releases/latest)
  240. 2. Click the downloaded `.mcpb` file to install it into Claude Desktop
  241. 3. Call any LinkedIn tool
  242. On startup, the MCP Bundle prepares the shared Patchright Chromium browser cache in the background. On the first tool call that needs authentication, the server reuses a LinkedIn session from a signed-in local browser if it finds one, and otherwise opens a LinkedIn login browser window.
  243. > [!NOTE]
  244. > Early tool calls may return a setup/authentication-in-progress error until browser setup or login finishes. Retry the tool call once the browser download or sign-in completes.
  245. ### Setup Help
  246. <details>
  247. <summary><b>❗ Troubleshooting</b></summary>
  248. <details>
  249. <summary>First-time setup behavior</summary>
  250. - Claude Desktop starts the bundle immediately; browser setup continues in the background
  251. - If the Patchright Chromium browser is still downloading, retry the tool after a short wait
  252. - Managed browser downloads are shared under `~/.linkedin-mcp/patchright-browsers/`
  253. - *The browser cache keeps growing*: Patchright keeps an old Chromium revision for as long as any installed version still references it, so an upgrade can leave both on disk. The server logs a warning naming what it holds. To reclaim the space, stop every LinkedIn MCP Server instance, delete `~/.linkedin-mcp/patchright-browsers/`, and let the next launch download the current browser.
  254. - *Windows, the bundle exits with `DLL load failed while importing _greenlet`*: install the [Microsoft Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist), or reinstall a bundle pinning greenlet 3.5.5 or newer, whose published Windows wheels carry the C++ runtime inside the extension again. A bundle pinning greenlet 3.3.1 through 3.5.4 needs `MSVCP140.dll` from that redistributable, which neither the python.org installer nor the `uv`-managed builds carry, and a greenlet built from source can need it at any version. The server names this itself on startup, and only after checking that the loader cannot produce that DLL. Reported as [greenlet#525](https://github.com/python-greenlet/greenlet/issues/525), fixed in [greenlet#526](https://github.com/python-greenlet/greenlet/pull/526).
  255. </details>
  256. <details>
  257. <summary>Login issues</summary>
  258. - Make sure you have only one active LinkedIn session at a time
  259. - LinkedIn may require a login confirmation in the LinkedIn mobile app for `--login`
  260. - LinkedIn may show a captcha challenge during login. Run `uvx mcp-server-linkedin@latest --login` which opens a browser where you can solve captchas manually. See the [uvx setup](#setup-with-uvx-recommended) for prerequisites.
  261. </details>
  262. <details>
  263. <summary>Timeout issues</summary>
  264. - *Page operations failing* (elements not found, navigation hangs): increase the browser page-op timeout: `--timeout 10000` or `TIMEOUT=10000` (milliseconds, default 5000).
  265. - *Entire tool calls timing out* (e.g. multi-section profiles, cold-start Chromium, slow containers): increase the per-tool execution timeout: `--tool-timeout 300` or `TOOL_TIMEOUT=300` (seconds, default 180).
  266. - *First tool call with no session*: if a locally logged-in browser has a live LinkedIn session, the server auto-imports it (see `AUTO_IMPORT_FROM_BROWSER` / `--auto-import`) instead of forcing a manual login. On macOS the keychain may prompt once for Safe Storage access. If no importable browser session exists, it falls back to opening a login window and waits up to `LOGIN_INLINE_WAIT` seconds (default 25, max 45; `--login-inline-wait`) so a quick sign-in resolves in one call. If the wait elapses, the tool returns a pending signal and the model retries in about 30 seconds. Neither the auto-import nor the inline wait applies under Docker or when the server is bound to a non-loopback HTTP host. Create the session on the host with `--login`, or use the explicit Docker `--login --login-viewer` command.
  267. - Users on slow connections may need higher values for either.
  268. </details>
  269. <details>
  270. <summary>Use your own Chrome</summary>
  271. - Set **Chrome executable** in the extension's settings to a Chrome, Chromium or Chrome for Testing binary, such as `/usr/bin/google-chrome`. Leave it blank to keep the bundled Chromium. It sets `CHROME_PATH`, described under *Custom Chrome path* in the uvx setup help.
  272. - This is the fix when tool calls refuse to open the profile because a newer browser last opened it: point the setting at that newer browser instead of signing in again.
  273. </details>
  274. <details>
  275. <summary>Told to run <code>--login</code> on the host when you already did</summary>
  276. - If tool calls answer "No valid LinkedIn session is available in Docker" on a machine that is *not* a container, the runtime was misdetected. This happened on Linux hosts running a Docker daemon for unrelated services. Set `LINKEDIN_MCP_CONTAINER=false` to override the detection; `true` forces the opposite.
  277. </details>
  278. </details>
  279. <br/>
  280. <br/>
  281. ## Codex Plugin
  282. **Prerequisites:** [Codex](https://github.com/openai/codex) and [uv](https://docs.astral.sh/uv/getting-started/installation/).
  283. ### Installation
  284. **Run in a terminal**
  285. ```bash
  286. codex plugin marketplace add stickerdaniel/linkedin-mcp-server
  287. codex plugin add linkedin-mcp-server@linkedin-mcp-server
  288. ```
  289. The plugin runs the latest server release. On the first tool call that needs authentication, the server reuses a LinkedIn session from a signed-in local browser or opens a login window.
  290. > [!NOTE]
  291. > Early tool calls may return a setup/authentication-in-progress error until browser setup or login finishes. Retry the tool call once the browser download or sign-in completes.
  292. <br/>
  293. <br/>
  294. ## Claude Code Plugin
  295. **Prerequisites:** [Claude Code](https://code.claude.com/docs) and [uv](https://docs.astral.sh/uv/getting-started/installation/).
  296. ### Installation
  297. **Run in a terminal**
  298. ```bash
  299. claude plugin marketplace add stickerdaniel/linkedin-mcp-server
  300. claude plugin install linkedin-mcp-server@linkedin-mcp-server
  301. ```
  302. The plugin runs the latest server release. On the first tool call that needs authentication, the server reuses a LinkedIn session from a signed-in local browser or opens a login window.
  303. > [!NOTE]
  304. > Early tool calls may return a setup/authentication-in-progress error until browser setup or login finishes. Retry the tool call once the browser download or sign-in completes.
  305. <br/>
  306. <br/>
  307. ## Cursor Plugin
  308. **Prerequisites:** [Cursor](https://cursor.com/) and [uv](https://docs.astral.sh/uv/getting-started/installation/) on your `PATH`.
  309. ### Installation
  310. **From the Cursor Marketplace:** open **Customize** in the sidebar, search for **LinkedIn MCP**, and choose **Install**. The plugin bundles the LinkedIn skill.
  311. **One-click MCP install** (server only, without the skill):
  312. [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=linkedin&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyJtY3Atc2VydmVyLWxpbmtlZGluQGxhdGVzdCIsIi0tdHJhbnNwb3J0Iiwic3RkaW8iXSwiZW52Ijp7IlVWX0hUVFBfVElNRU9VVCI6IjMwMCJ9fQ%3D%3D)
  313. Both run the latest server release. On the first tool call that needs authentication, the server reuses a LinkedIn session from a signed-in local browser or opens a login window.
  314. > [!NOTE]
  315. > Early tool calls may return a setup/authentication-in-progress error until browser setup or login finishes. Retry the tool call once the browser download or sign-in completes.
  316. <br/>
  317. <br/>
  318. ## Setup with Docker
  319. <details>
  320. <summary><strong>I know what I'm doing</strong></summary>
  321. **Prerequisites:** Make sure [Docker](https://www.docker.com/get-started/) is installed and running.
  322. ### Authentication
  323. Log in once. The container opens a LinkedIn login browser that you drive from your own browser tab.
  324. macOS / Linux:
  325. ```bash
  326. # Create the directory first so the container can save your session into it
  327. mkdir -p ~/.linkedin-mcp
  328. docker run -it --rm \
  329. -v ~/.linkedin-mcp:/home/pwuser/.linkedin-mcp \
  330. -p 127.0.0.1:6080:6080 \
  331. stickerdaniel/linkedin-mcp-server:latest \
  332. --login --login-viewer
  333. ```
  334. PowerShell (Windows):
  335. ```powershell
  336. $sessionDir = Join-Path $env:USERPROFILE ".linkedin-mcp"
  337. New-Item -ItemType Directory -Force -Path $sessionDir | Out-Null
  338. docker run -it --rm `
  339. -v "${sessionDir}:/home/pwuser/.linkedin-mcp" `
  340. -p 127.0.0.1:6080:6080 `
  341. stickerdaniel/linkedin-mcp-server:latest `
  342. --login --login-viewer
  343. ```
  344. Open the full URL the command prints (it carries the access token) and sign in. Ctrl+V (Cmd+V on a Mac) pastes plain ASCII text, such as a password from your password manager, into the login browser. The viewer closes itself afterwards; let the command exit on its own so the session is stored completely. It gives up after 30 minutes.
  345. Keep the same host directory mounted at `/home/pwuser/.linkedin-mcp` on every later `docker run`, otherwise the server cannot find the session.
  346. **Add to your MCP client's `mcpServers` configuration**
  347. **macOS / Linux (absolute path in JSON):**
  348. ```json
  349. {
  350. "mcpServers": {
  351. "mcp-server-linkedin": {
  352. "command": "docker",
  353. "args": [
  354. "run", "--rm", "-i",
  355. "-v", "/absolute/path/to/.linkedin-mcp:/home/pwuser/.linkedin-mcp",
  356. "stickerdaniel/linkedin-mcp-server:latest"
  357. ]
  358. }
  359. }
  360. }
  361. ```
  362. Spell that first path out in full. A client runs `docker` directly rather than through a shell, so a leading `~` reaches Docker unexpanded and it refuses the mount.
  363. **PowerShell (Windows):** use a forward-slash JSON path. A backslash path like
  364. `C:\Users\Alice\.linkedin-mcp` fails JSON parsing because `\U` is an invalid
  365. escape. Use `C:/Users/Alice/.linkedin-mcp` instead, replacing `Alice` with your
  366. username.
  367. ```json
  368. {
  369. "mcpServers": {
  370. "mcp-server-linkedin": {
  371. "command": "docker",
  372. "args": [
  373. "run", "--rm", "-i",
  374. "-v", "C:/Users/Alice/.linkedin-mcp:/home/pwuser/.linkedin-mcp",
  375. "stickerdaniel/linkedin-mcp-server:latest"
  376. ]
  377. }
  378. }
  379. }
  380. ```
  381. > [!NOTE]
  382. > In PowerShell, `~` is not expanded inside a composite Docker `-v` argument.
  383. > Use `C:/Users/<you>/.linkedin-mcp` or build the path with
  384. > `$env:USERPROFILE\.linkedin-mcp` before passing it to Docker.
  385. > [!NOTE]
  386. > Sessions expire over time. When tool calls start asking for authentication, repeat the login command above, or run `uvx mcp-server-linkedin@latest --login` on the host.
  387. ### Setup Help
  388. <details>
  389. <summary><b>🔧 Configuration</b></summary>
  390. <details>
  391. <summary>Transport modes</summary>
  392. - **Default (stdio)**: Standard communication for local MCP servers
  393. - **Streamable HTTP**: For a web-based MCP server
  394. - If no transport is specified, the server defaults to `stdio`
  395. - An interactive terminal without explicit transport shows a chooser prompt
  396. </details>
  397. <details>
  398. <summary>CLI options</summary>
  399. **Session:**
  400. - `--auto-import` / `--no-auto-import` - Import a session from a signed-in local browser on the first tool call that needs one, before falling back to manual login (ignored in Docker). On macOS the keychain may prompt once.
  401. - `--logout` - Clear the stored session and every profile derived from it
  402. - `--login-viewer` - With `--login`, show the login browser at a token-protected URL on port 6080. Needs the profile mount from [Authentication](#authentication).
  403. - `--user-data-dir PATH` - Browser profile directory (default: ~/.linkedin-mcp/profile). Rotating or clearing a session deletes this directory *and its parent*, which holds the stored cookies and derived profiles.
  404. - `--claim-profile-root` - Take over a profile directory the server will not claim on its own, such as one whose parent already holds other files. Needed once per directory.
  405. **Transport:**
  406. - `--transport {stdio,streamable-http}` - Force the transport mode (default: stdio)
  407. - `--host HOST` / `--port PORT` / `--path PATH` - HTTP server address (defaults: 127.0.0.1, 8000, /mcp)
  408. **Timeouts:**
  409. - `--timeout MS` - Timeout for a single page operation (default: 5000)
  410. - `--tool-timeout SECONDS` - Timeout for a whole tool call (default: 180). Raise it for calls that read many pages, slow networks, or a cold-start browser.
  411. - `--login-timeout SECONDS` - How long the login browser waits for you to finish signing in (default: 1800; 0 = no limit). `--login-viewer` ends the session after 30 minutes either way.
  412. - `--login-inline-wait SECONDS` - How long a tool call waits for a login to finish before telling the model to retry (default: 25, max 45; 0 = return at once)
  413. **Shared browser:**
  414. - `--browser-wait SECONDS` - How long to wait for another server process to hand over the shared browser (default: 25, max 45; 0 = report busy at once). Only matters with several MCP clients running at once.
  415. - `--browser-min-hold SECONDS` - Shortest time this process keeps the shared browser before handing it over (default: 20). Clamped to 3 seconds below `--browser-wait`, so raise that one along with it. Higher means fewer browser restarts but longer waits for other clients.
  416. - `--browser-idle-timeout SECONDS` - Close an idle browser and release the profile after this long without a tool call (default: 600; 0 = keep it open)
  417. **Browser:**
  418. - `--chrome-path PATH` - Path to a Chrome/Chromium executable (rarely needed in Docker)
  419. - `--proxy-server URL` - Route browser traffic through a proxy, as `scheme://host:port`. Set it up **before** `--login`; see [Using a proxy](#using-a-proxy).
  420. **Other:**
  421. - `--log-level {DEBUG,INFO,WARNING,ERROR}` - Logging level (default: WARNING)
  422. > [!NOTE]
  423. > Plain `--login` still has no visible window in Docker. Add `--login-viewer` and publish `127.0.0.1:6080:6080` only for the one-shot login command. Docker is already headed by default, so `--no-headless` changes nothing. The experimental `--daemon` is ignored in Docker because its owner can outlive the virtual display.
  424. </details>
  425. <details>
  426. <summary>HTTP mode</summary>
  427. **HTTP Mode Example (for web-based MCP clients):**
  428. Bash / macOS / Linux:
  429. ```bash
  430. docker run -it --rm \
  431. -v ~/.linkedin-mcp:/home/pwuser/.linkedin-mcp \
  432. -p 127.0.0.1:8080:8080 \
  433. stickerdaniel/linkedin-mcp-server:latest \
  434. --transport streamable-http --host 0.0.0.0 --port 8080 --path /mcp
  435. ```
  436. PowerShell (Windows):
  437. ```powershell
  438. $sessionDir = Join-Path $env:USERPROFILE ".linkedin-mcp"
  439. docker run -it --rm `
  440. -v "${sessionDir}:/home/pwuser/.linkedin-mcp" `
  441. -p 127.0.0.1:8080:8080 `
  442. stickerdaniel/linkedin-mcp-server:latest `
  443. --transport streamable-http --host 0.0.0.0 --port 8080 --path /mcp
  444. ```
  445. Both halves of that are needed, and they do different jobs. `--host 0.0.0.0`
  446. makes the server reachable *inside* the container: a process bound to
  447. `127.0.0.1` in there cannot be reached through a published port at all. The
  448. `127.0.0.1:` in front of `-p` is what limits it *outside*, to this machine.
  449. Drop that prefix and Docker publishes on every interface, which puts an
  450. endpoint with no authentication on your network. The server cannot tell the two
  451. apart, so it warns either way.
  452. Loopback publishing limits this to the machine, not to the container. Other
  453. containers on the same host can still reach it through `host.docker.internal`
  454. wherever that name resolves, which is the default on Docker Desktop and
  455. OrbStack but not on native Linux Docker.
  456. Runtime server logs are emitted by FastMCP/Uvicorn.
  457. The HTTP server answers requests addressed to `localhost` or to the address it
  458. is bound to, and refuses others with `421`. That is what stops a website you
  459. merely visit from pointing a domain at this server and using your LinkedIn
  460. session through your own browser.
  461. Reaching the server by any other name is refused, including a machine name on
  462. your network and the public name in front of a reverse proxy. Either have the
  463. proxy rewrite the upstream `Host` to the backend address, or name the host you
  464. serve it under:
  465. ```bash
  466. FASTMCP_HTTP_ALLOWED_HOSTS='["mcp.example"]'
  467. ```
  468. That permits exactly that name and keeps refusing everything else. The endpoint
  469. still has no authentication, so anything reachable beyond your own machine
  470. belongs behind something that provides it.
  471. **Test with mcp inspector:**
  472. 1. Install and run mcp inspector ```bunx @modelcontextprotocol/inspector```
  473. 2. Click pre-filled token url to open the inspector in your browser
  474. 3. Select `Streamable HTTP` as `Transport Type`
  475. 4. Set `URL` to `http://localhost:8080/mcp`
  476. 5. Connect
  477. 6. Test tools
  478. </details>
  479. </details>
  480. <details>
  481. <summary><b>❗ Troubleshooting</b></summary>
  482. <details>
  483. <summary>Docker issues</summary>
  484. - Make sure [Docker](https://www.docker.com/get-started/) is installed
  485. - Check if Docker is running: `docker ps`
  486. - *Permission errors on `~/.linkedin-mcp`*: an older rootful Docker run may have created the directory as root. Fix it with `sudo chown -R "$(id -u):$(id -g)" ~/.linkedin-mcp`.
  487. </details>
  488. <details>
  489. <summary>Login issues</summary>
  490. - Make sure you have only one active LinkedIn session at a time
  491. - LinkedIn may require a login confirmation in the LinkedIn mobile app for `--login`
  492. - LinkedIn may show a captcha challenge during login. Run `uvx mcp-server-linkedin@latest --login` which opens a browser where you can solve captchas manually. See the [uvx setup](#setup-with-uvx-recommended) for prerequisites.
  493. - If Docker auth becomes stale after you re-login on the host, restart Docker once so it can fresh-bridge from the new source session generation.
  494. </details>
  495. <details>
  496. <summary>Timeout issues</summary>
  497. - *Page operations failing* (elements not found, navigation hangs): increase the browser page-op timeout: `--timeout 10000` or `TIMEOUT=10000` (milliseconds, default 5000).
  498. - *Entire tool calls timing out* (e.g. multi-section profiles, cold-start Chromium, slow containers): increase the per-tool execution timeout: `--tool-timeout 300` or `TOOL_TIMEOUT=300` (seconds, default 180).
  499. - *First tool call with no session*: if a locally logged-in browser has a live LinkedIn session, the server auto-imports it (see `AUTO_IMPORT_FROM_BROWSER` / `--auto-import`) instead of forcing a manual login. On macOS the keychain may prompt once for Safe Storage access. If no importable browser session exists, it falls back to opening a login window and waits up to `LOGIN_INLINE_WAIT` seconds (default 25, max 45; `--login-inline-wait`) so a quick sign-in resolves in one call. If the wait elapses, the tool returns a pending signal and the model retries in about 30 seconds. Neither the auto-import nor the inline wait applies under Docker or when the server is bound to a non-loopback HTTP host. Create the session on the host with `--login`, or use the explicit Docker `--login --login-viewer` command.
  500. - Users on slow connections may need higher values for either.
  501. </details>
  502. <details>
  503. <summary>Told to run <code>--login</code> on the host when you already did</summary>
  504. - If tool calls answer "No valid LinkedIn session is available in Docker" on a machine that is *not* a container, the runtime was misdetected. This happened on Linux hosts running a Docker daemon for unrelated services. Set `LINKEDIN_MCP_CONTAINER=false` to override the detection; `true` forces the opposite.
  505. </details>
  506. <details>
  507. <summary>Custom Chrome path</summary>
  508. - If Chrome is installed in a non-standard location, use `--chrome-path /path/to/chrome`
  509. - Can also set via environment variable: `CHROME_PATH=/path/to/chrome`
  510. - On macOS and Linux the browser must be at least as new as the one that last opened your profile, and the server refuses the launch otherwise. (Not on Windows: a browser there cannot be asked its version without starting one, so the check is off.) An older browser can silently drop stores a newer one wrote, the saved session among them, and the failure then looks exactly like an expired login. The message names both versions. Going back to the bundled Chromium after running a newer Chrome once is the usual way to meet this; either run the newer browser again, whichever one that was, or run `--login`, which moves the stored session aside and signs in fresh with the browser you have. `--logout` also clears it but discards the old session instead of keeping it recoverable, and it asks for confirmation on the terminal, so it is not usable from a server an MCP client started.
  511. - Only Chrome, Chromium and Chrome for Testing are compared this way. Forks number themselves differently (Vivaldi is on 7.x, Edge's build number sits far below Chrome's under the same major), so pointing `CHROME_PATH` at one turns the check off rather than producing a refusal nothing could satisfy.
  512. - In the documented Docker setup this check does not apply. The container never opens the profile you created with `--login`; it derives its own from your cookies, and by default rebuilds that from scratch on every start, so there is nothing for an older image to downgrade. With `EXPERIMENTAL_PERSIST_DERIVED_RUNTIME` the derived profile is kept, and an image tag that moves backwards then throws it away and re-derives it, again with nothing for you to do. The check matters on the host, where the server opens that profile directly. Not during `--login` itself, which moves the old profile aside before it starts a browser and so can never trip it.
  513. </details>
  514. </details>
  515. </details>
  516. <br/>
  517. <br/>
  518. ## Using a proxy
  519. LinkedIn scores the address a session signs in from. Your account's usual IP address is the safe one. You should use a proxy in your country when the server cannot use it: a VPS, another country, or a second account that must not share the first one's address.
  520. With a paid provider, use a sticky residential session that holds one address (never per-request rotation). A WireGuard full tunnel or Tailscale exit node on your home network works when the server should use your usual home address.
  521. ### Setup Help
  522. <details>
  523. <summary><b>🔧 Configuration</b></summary>
  524. - Set the proxy up **before** `--login`. Moving an existing session to a new address triggers a LinkedIn checkpoint. That includes a session from `--import-from-browser`, which was created on your real address.
  525. - `--proxy-server scheme://host:port` or `PROXY_SERVER`, with `http`, `https`, `socks4` or `socks5`. Only browser traffic is routed, not the MCP transport.
  526. - Pass credentials through `PROXY_USERNAME` and `PROXY_PASSWORD`, or include them in `PROXY_SERVER` using the combined `http://user:pass@host:port` form. The combined form is not accepted by the `--proxy-server` CLI option.
  527. - `PROXY_BYPASS=localhost,127.0.0.1,::1` reaches local targets directly. With a proxy set, Chromium routes `localhost` through it too.
  528. </details>
  529. <details>
  530. <summary><b>❗ Troubleshooting</b></summary>
  531. - Chromium cannot authenticate to a SOCKS proxy, so credentials require an `http(s)` endpoint. If your provider only offers authenticated SOCKS5, run a local relay that holds the credentials and point the server at that.
  532. - A wrong proxy password shows up as a timeout or a failed sign-in, because Chromium retries the authentication challenge until the page times out. If sessions stop working right after you add a proxy, check the proxy credentials first.
  533. - Auto-import is skipped while a proxy is configured: the imported session would move from your real address to the proxy. Use `--login`.
  534. - Inside a container `127.0.0.1` is the container itself, so a relay on the host is `host.docker.internal`; native Linux Docker also needs `--add-host=host.docker.internal:host-gateway`.
  535. </details>
  536. <br/>
  537. <br/>
  538. ## Setup from Source (Develop & Contribute)
  539. Contributions are welcome. See [CONTRIBUTING.md](https://github.com/stickerdaniel/linkedin-mcp-server/blob/main/.github/CONTRIBUTING.md) for architecture guidelines and checklists. Search existing issues first, then use the [issue forms](https://github.com/stickerdaniel/linkedin-mcp-server/issues/new/choose) for anything new. AI agents follow the [issue-packet skill](https://github.com/stickerdaniel/linkedin-mcp-server/blob/main/.agents/skills/issue-packet/SKILL.md).
  540. **Prerequisites:** [Git](https://git-scm.com/downloads) and [uv](https://docs.astral.sh/uv/) installed
  541. ### Installation
  542. **Run in a terminal**
  543. ```bash
  544. # 1. Clone repository
  545. git clone https://github.com/stickerdaniel/linkedin-mcp-server
  546. cd linkedin-mcp-server
  547. # 2. Install UV package manager (if not already installed)
  548. curl -LsSf https://astral.sh/uv/install.sh | sh
  549. # 3. Install dependencies
  550. uv sync
  551. uv sync --group dev
  552. # 4. Install pre-commit hooks
  553. uv run pre-commit install
  554. # 5. Start the server
  555. uv run -m linkedin_mcp_server
  556. ```
  557. ### Setup Help
  558. <details>
  559. <summary><b>🔧 Configuration</b></summary>
  560. <details>
  561. <summary>CLI options</summary>
  562. **Session:**
  563. - `--login` - Open a browser to sign in and save the session
  564. - `--import-from-browser [BROWSER]` - Reuse a session from a locally signed-in Chromium browser (`chrome`, `chromium`, `brave`, `edge`, `arc`, `vivaldi`, `helium`, `yandex`, `whale`, `coccoc`, `opera`, `opera_gx`, `auto`). Bare flag picks `auto`, the most recently used browser with a live LinkedIn session.
  565. - `--auto-import` / `--no-auto-import` - Import a session from a signed-in local browser on the first tool call that needs one, before falling back to manual login (default: on). Skipped in Docker, behind a proxy, and on a non-loopback HTTP bind. On macOS the keychain may prompt once.
  566. - `--status` - Check whether the stored session is valid, then exit
  567. - `--logout` - Clear the stored session
  568. - `--user-data-dir PATH` - Browser profile directory (default: ~/.linkedin-mcp/profile). Rotating or clearing a session deletes this directory *and its parent*, which holds the stored cookies and derived profiles.
  569. - `--claim-profile-root` - Take over a profile directory the server will not claim on its own, such as one whose parent already holds other files. Needed once per directory.
  570. **Transport:**
  571. - `--transport {stdio,streamable-http}` - Force the transport mode (default: stdio)
  572. - `--host HOST` / `--port PORT` / `--path PATH` - HTTP server address (defaults: 127.0.0.1, 8000, /mcp)
  573. **Timeouts:**
  574. - `--timeout MS` - Timeout for a single page operation (default: 5000)
  575. - `--tool-timeout SECONDS` - Timeout for a whole tool call (default: 180). Raise it for calls that read many pages, slow networks, or a cold-start browser.
  576. - `--login-timeout SECONDS` - How long the login browser waits for you to finish signing in (default: 1800; 0 = no limit). `--login-viewer` ends the session after 30 minutes either way.
  577. - `--login-inline-wait SECONDS` - How long a tool call waits for a login to finish before telling the model to retry (default: 25, max 45; 0 = return at once)
  578. **Shared browser:**
  579. - `--browser-wait SECONDS` - How long to wait for another server process to hand over the shared browser (default: 25, max 45; 0 = report busy at once). Only matters with several MCP clients running at once.
  580. - `--browser-min-hold SECONDS` - Shortest time this process keeps the shared browser before handing it over (default: 20). Clamped to 3 seconds below `--browser-wait`, so raise that one along with it. Higher means fewer browser restarts but longer waits for other clients.
  581. - `--browser-idle-timeout SECONDS` - Close an idle browser and release the profile after this long without a tool call (default: 600; 0 = keep it open)
  582. **Browser:**
  583. - `--no-headless` - Show the browser window (useful for debugging)
  584. - `--slow-mo MS` - Delay between browser actions (default: 0, useful for debugging)
  585. - `--viewport WxH` - Viewport size (default: 1280x720). Applies to windowless mode only; a headed launch uses the real window size.
  586. - `--chrome-path PATH` - Path to a Chrome/Chromium executable
  587. - `--installer-temp-dir PATH` - Existing directory for browser installation temporary files (environment: `INSTALLER_TEMP_DIR`).
  588. - `--proxy-server URL` - Route browser traffic through a proxy, as `scheme://host:port`. Set it up **before** `--login`; see [Using a proxy](#using-a-proxy).
  589. **Other:**
  590. - `--log-level {DEBUG,INFO,WARNING,ERROR}` - Logging level (default: WARNING)
  591. - `--help` - Show help
  592. > **Note:** Most CLI options have environment variable equivalents. See `.env.example` for details.
  593. </details>
  594. <details>
  595. <summary>HTTP mode and Claude Desktop</summary>
  596. **HTTP Mode Example (for web-based MCP clients):**
  597. ```bash
  598. uv run -m linkedin_mcp_server --transport streamable-http --host 127.0.0.1 --port 8000 --path /mcp
  599. ```
  600. **Claude Desktop:**
  601. ```json
  602. {
  603. "mcpServers": {
  604. "mcp-server-linkedin": {
  605. "command": "uv",
  606. "args": ["--directory", "/path/to/linkedin-mcp-server", "run", "-m", "linkedin_mcp_server"]
  607. }
  608. }
  609. }
  610. ```
  611. `stdio` is used by default for this config.
  612. </details>
  613. </details>
  614. <details>
  615. <summary><b>❗ Troubleshooting</b></summary>
  616. <details>
  617. <summary>Login issues</summary>
  618. - Make sure you have only one active LinkedIn session at a time
  619. - LinkedIn may require a login confirmation in the LinkedIn mobile app for `--login`
  620. - LinkedIn may show a captcha challenge during login. The `--login` command opens a browser where you can solve it manually.
  621. </details>
  622. <details>
  623. <summary>Tool issues</summary>
  624. - Use `--no-headless` to watch the browser when a tool returns wrong or missing data
  625. - Add `--log-level DEBUG` to see more detailed logging
  626. </details>
  627. <details>
  628. <summary>Session issues</summary>
  629. - Browser profile is stored at `~/.linkedin-mcp/profile/`
  630. - Managed browser downloads are cached at `~/.linkedin-mcp/patchright-browsers/`, shared with the `uvx` and MCP Bundle installations
  631. - *The browser cache keeps growing*: Patchright keeps an old Chromium revision for as long as any installed version still references it, and a `uv` archive or a second worktree is such a reference. The server logs a warning naming what it holds. To reclaim the space, stop every LinkedIn MCP Server instance, delete `~/.linkedin-mcp/patchright-browsers/`, and let the next launch download the current browser.
  632. - Use `--logout` to clear the profile and start fresh
  633. </details>
  634. <details>
  635. <summary>Python/Patchright issues</summary>
  636. - Check Python version: `python --version` (should be 3.12.4+)
  637. - Reinstall Patchright: `uv run patchright install chromium`
  638. - Reinstall dependencies: `uv sync --reinstall`
  639. </details>
  640. <details>
  641. <summary>Timeout issues</summary>
  642. - *Page operations failing* (elements not found, navigation hangs): increase the browser page-op timeout: `--timeout 10000` or `TIMEOUT=10000` (milliseconds, default 5000).
  643. - *Entire tool calls timing out* (e.g. multi-section profiles, cold-start Chromium, slow containers): increase the per-tool execution timeout: `--tool-timeout 300` or `TOOL_TIMEOUT=300` (seconds, default 180).
  644. - *First tool call with no session*: if a locally logged-in browser has a live LinkedIn session, the server auto-imports it (see `AUTO_IMPORT_FROM_BROWSER` / `--auto-import`) instead of forcing a manual login. On macOS the keychain may prompt once for Safe Storage access. If no importable browser session exists, it falls back to opening a login window and waits up to `LOGIN_INLINE_WAIT` seconds (default 25, max 45; `--login-inline-wait`) so a quick sign-in resolves in one call. If the wait elapses, the tool returns a pending signal and the model retries in about 30 seconds. Neither the auto-import nor the inline wait applies under Docker or when the server is bound to a non-loopback HTTP host. Create the session on the host with `--login`, or use the explicit Docker `--login --login-viewer` command.
  645. - Users on slow connections may need higher values for either.
  646. </details>
  647. <details>
  648. <summary>Told to run <code>--login</code> on the host when you already did</summary>
  649. - If tool calls answer "No valid LinkedIn session is available in Docker" on a machine that is *not* a container, the runtime was misdetected. This happened on Linux hosts running a Docker daemon for unrelated services. Set `LINKEDIN_MCP_CONTAINER=false` to override the detection; `true` forces the opposite.
  650. </details>
  651. <details>
  652. <summary>Custom Chrome path</summary>
  653. - If Chrome is installed in a non-standard location, use `--chrome-path /path/to/chrome`
  654. - Can also set via environment variable: `CHROME_PATH=/path/to/chrome`
  655. - On macOS and Linux the browser must be at least as new as the one that last opened your profile, and the server refuses the launch otherwise. (Not on Windows: a browser there cannot be asked its version without starting one, so the check is off.) An older browser can silently drop stores a newer one wrote, the saved session among them, and the failure then looks exactly like an expired login. The message names both versions. Going back to the bundled Chromium after running a newer Chrome once is the usual way to meet this; either run the newer browser again, whichever one that was, or run `--login`, which moves the stored session aside and signs in fresh with the browser you have. `--logout` also clears it but discards the old session instead of keeping it recoverable, and it asks for confirmation on the terminal, so it is not usable from a server an MCP client started.
  656. - Only Chrome, Chromium and Chrome for Testing are compared this way. Forks number themselves differently (Vivaldi is on 7.x, Edge's build number sits far below Chrome's under the same major), so pointing `CHROME_PATH` at one turns the check off rather than producing a refusal nothing could satisfy.
  657. </details>
  658. </details>
  659. <br/>
  660. <br/>
  661. > [!IMPORTANT]
  662. > **FAQ**
  663. >
  664. > **Is this safe to use? Will I get banned?**
  665. > This tool controls a real browser session; it doesn't exploit undocumented APIs or bypass authentication. LinkedIn's User Agreement prohibits automated access, and accounts using automated tools can be restricted or banned. Use at your own risk; there is no guarantee of account safety. If you encounter any issues, let me know in the [Discussions](https://github.com/stickerdaniel/linkedin-mcp-server/discussions).
  666. >
  667. > **What if my agents execute too many actions?**
  668. > Tool calls run sequentially through a queue. You are responsible for the volume of automation you run; use it sparingly and prompt your agents responsibly.
  669. ## Contributors
  670. Thanks to everyone who has contributed code, bug reports and fixes.
  671. <a href="https://github.com/stickerdaniel/linkedin-mcp-server/graphs/contributors">
  672. <img alt="Contributors to linkedin-mcp-server" src="https://contrib.rocks/image?repo=stickerdaniel/linkedin-mcp-server" />
  673. </a>
  674. ## Acknowledgements
  675. Built with [FastMCP](https://gofastmcp.com/) and [Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python).
  676. Use in accordance with [LinkedIn's User Agreement](https://www.linkedin.com/legal/user-agreement). Automated access may violate LinkedIn's terms and can lead to account restrictions. This tool is for personal use only and comes with no warranty of any kind.
  677. ## License
  678. This project is licensed under the Apache 2.0 license.
  679. Building on this project is welcome! See the [license](https://github.com/stickerdaniel/linkedin-mcp-server/blob/main/LICENSE) for terms and the [`NOTICE`](https://github.com/stickerdaniel/linkedin-mcp-server/blob/main/NOTICE) for attribution.
  680. <br>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.