Skip to content
Back to search

linkedin-mcp-server

πŸ”— A Model Context Protocol (MCP) server for LinkedIn β€” search people, companies, and jobs, scrape profiles, and get structured data via any MCP-compatible AI client.

Safety scan

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

Checked today
Badge for your README
findsafeskills safety rating

Markdown

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

HTML

<a href="/listings/eliasbiondo--linkedin-mcp-server"><img src="/api/listings/eliasbiondo--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.

1. Clone and install

git clone https://github.com/eliasbiondo/linkedin-mcp-server.git
cd linkedin-mcp-server
uv sync

2. Install browser

This project uses [Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright) (a patched fork of Playwright) for browser automation. You need to install the browser binaries before first use:

uv run patchright install

> **Windows users:** If the command above fails with `program not found`, run instead: > > ```powershell > uv run python -m patchright install > ```

3. Authenticate with LinkedIn

uv run linkedin-mcp-server --login

A browser window will open. Log in to LinkedIn and the session will be persisted locally at `~/.linkedin-mcp-server/browser-data`.

4. Run the server

**stdio transport** (default β€” for Claude Desktop, Cursor, and similar clients):

uv run linkedin-mcp-server

**HTTP transport** (for remote clients, the MCP Inspector, etc.):

uv run linkedin-mcp-server --transport streamable-http --host 0.0.0.0 --port 8000

---

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.

README.md Β· README Β· 273 lines

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

  1. # LinkedIn MCP Server
  2. A [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server for LinkedIn. Search people, companies, and jobs, scrape profiles, and retrieve structured JSON data from any MCP-compatible AI client.
  3. https://github.com/user-attachments/assets/50cd8629-41ee-4261-9538-40dc7d30294e
  4. Built with [FastMCP](https://github.com/PrefectHQ/fastmcp), [Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright), and a clean hexagonal architecture.
  5. ---
  6. ## Features
  7. | Category | Tools |
  8. | ----------- | ---------------------------------------- |
  9. | People | `get_person_profile` Β· `search_people` |
  10. | Companies | `get_company_profile` Β· `get_company_posts` |
  11. | Jobs | `get_job_details` Β· `search_jobs` |
  12. | Browser | `close_browser` |
  13. ### Person Profile Sections
  14. The `get_person_profile` tool supports granular section scraping. Request only the sections you need:
  15. - **Main profile** (always included) β€” name, headline, location, followers, connections, about, profile image
  16. - **Experience** β€” title, company, dates, duration, description, company logo
  17. - **Education** β€” school, degree, dates, description, school logo
  18. - **Contact info** β€” email, phone, websites, birthday, LinkedIn URL
  19. - **Interests** β€” people, companies, and groups followed
  20. - **Honors and awards** β€” title, issuer, description
  21. - **Languages** β€” language name and proficiency level
  22. - **Posts** β€” recent activity with reactions and timestamps
  23. - **Recommendations** β€” received and given, with author details
  24. ### Company Profile Sections
  25. - **About** (always included) β€” overview, website, industry, size, headquarters, specialties, logo
  26. - **Posts** β€” recent feed posts with engagement metrics
  27. - **Jobs** β€” current open positions
  28. ### Job Search Filters
  29. The `search_jobs` tool supports the following filters:
  30. | Filter | Values |
  31. | ------------------ | ------------------------------------------------------------------------- |
  32. | `date_posted` | `past_hour`, `past_24_hours`, `past_week`, `past_month` |
  33. | `job_type` | `full_time`, `part_time`, `contract`, `temporary`, `internship`, `other` |
  34. | `experience_level` | `entry`, `associate`, `mid_senior`, `director`, `executive` |
  35. | `work_type` | `on_site`, `remote`, `hybrid` |
  36. | `easy_apply` | `true` / `false` |
  37. | `sort_by` | `date`, `relevance` |
  38. ---
  39. ## Prerequisites
  40. - Python 3.12 or later
  41. - [uv](https://docs.astral.sh/uv/) package manager
  42. - A LinkedIn account for authentication
  43. ---
  44. ## Quick Start
  45. ### 1. Clone and install
  46. ```bash
  47. git clone https://github.com/eliasbiondo/linkedin-mcp-server.git
  48. cd linkedin-mcp-server
  49. uv sync
  50. ```
  51. ### 2. Install browser
  52. This project uses [Patchright](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright) (a patched fork of Playwright) for browser automation. You need to install the browser binaries before first use:
  53. ```bash
  54. uv run patchright install
  55. ```
  56. > **Windows users:** If the command above fails with `program not found`, run instead:
  57. >
  58. > ```powershell
  59. > uv run python -m patchright install
  60. > ```
  61. ### 3. Authenticate with LinkedIn
  62. ```bash
  63. uv run linkedin-mcp-server --login
  64. ```
  65. A browser window will open. Log in to LinkedIn and the session will be persisted locally at `~/.linkedin-mcp-server/browser-data`.
  66. ### 4. Run the server
  67. **stdio transport** (default β€” for Claude Desktop, Cursor, and similar clients):
  68. ```bash
  69. uv run linkedin-mcp-server
  70. ```
  71. **HTTP transport** (for remote clients, the MCP Inspector, etc.):
  72. ```bash
  73. uv run linkedin-mcp-server --transport streamable-http --host 0.0.0.0 --port 8000
  74. ```
  75. ---
  76. ## Client Integration
  77. ### Claude Desktop / Cursor
  78. Add to your MCP configuration file:
  79. ```json
  80. {
  81. "mcpServers": {
  82. "linkedin": {
  83. "command": "uv",
  84. "args": [
  85. "--directory", "/path/to/linkedin-mcp-server",
  86. "run", "linkedin-mcp-server"
  87. ]
  88. }
  89. }
  90. }
  91. ```
  92. ### MCP Inspector
  93. ```bash
  94. npx @modelcontextprotocol/inspector
  95. ```
  96. Then connect to `http://localhost:8000/mcp` if using HTTP transport.
  97. ---
  98. ## Configuration
  99. Configuration follows a strict precedence chain: **CLI args > environment variables > `.env` file > defaults**.
  100. ### CLI Arguments
  101. | Argument | Description | Default |
  102. | --------------- | ----------------------------------- | ----------- |
  103. | `--transport` | `stdio` or `streamable-http` | `stdio` |
  104. | `--host` | Host for HTTP transport | `127.0.0.1` |
  105. | `--port` | Port for HTTP transport | `8000` |
  106. | `--log-level` | `DEBUG`, `INFO`, `WARNING`, `ERROR` | `WARNING` |
  107. | `--headless` | Run browser in headless mode | `true` |
  108. | `--no-headless` | Show browser window (visible mode) | β€” |
  109. | `--login` | Open browser for LinkedIn login | β€” |
  110. | `--logout` | Clear stored credentials | β€” |
  111. | `--status` | Check session status | β€” |
  112. ### Environment Variables
  113. Create a `.env` file in the project root:
  114. ```env
  115. # Server
  116. LINKEDIN_TRANSPORT=stdio
  117. LINKEDIN_HOST=127.0.0.1
  118. LINKEDIN_PORT=8000
  119. LINKEDIN_LOG_LEVEL=WARNING
  120. # Browser
  121. LINKEDIN_HEADLESS=true
  122. LINKEDIN_SLOW_MO=0
  123. LINKEDIN_TIMEOUT=10000
  124. LINKEDIN_VIEWPORT_WIDTH=1280
  125. LINKEDIN_VIEWPORT_HEIGHT=720
  126. LINKEDIN_CHROME_PATH=
  127. LINKEDIN_USER_AGENT=
  128. LINKEDIN_USER_DATA_DIR=~/.linkedin-mcp-server/browser-data
  129. ```
  130. ---
  131. ## Architecture
  132. The project follows a hexagonal (ports and adapters) architecture with strict layer separation:
  133. ```
  134. src/linkedin_mcp_server/
  135. β”œβ”€β”€ domain/ # Core business logic β€” zero external dependencies
  136. β”‚ β”œβ”€β”€ models/ # Data models (Person, Company, Job, Search)
  137. β”‚ β”œβ”€β”€ parsers/ # HTML to structured data parsers
  138. β”‚ β”œβ”€β”€ exceptions.py # Domain exceptions
  139. β”‚ └── value_objects.py # Immutable configuration and content objects
  140. β”œβ”€β”€ ports/ # Abstract interfaces
  141. β”‚ β”œβ”€β”€ auth.py # Authentication port
  142. β”‚ β”œβ”€β”€ browser.py # Browser automation port
  143. β”‚ └── config.py # Configuration port
  144. β”œβ”€β”€ application/ # Use cases β€” orchestration layer
  145. β”‚ β”œβ”€β”€ scrape_person.py
  146. β”‚ β”œβ”€β”€ scrape_company.py
  147. β”‚ β”œβ”€β”€ scrape_job.py
  148. β”‚ β”œβ”€β”€ search_people.py
  149. β”‚ β”œβ”€β”€ search_jobs.py
  150. β”‚ └── manage_session.py
  151. β”œβ”€β”€ adapters/ # Concrete implementations
  152. β”‚ β”œβ”€β”€ driven/ # Infrastructure adapters (browser, auth, config)
  153. β”‚ └── driving/ # Interface adapters (CLI, MCP tools, serialization)
  154. └── container.py # Dependency injection composition root
  155. ```
  156. ### Design Decisions
  157. - **Ports and adapters** β€” Domain logic is fully decoupled from infrastructure. The browser engine, MCP framework, and configuration source can all be swapped independently.
  158. - **Dependency injection** β€” A single `Container` class acts as the composition root and is the only place that imports concrete adapter classes.
  159. - **Structured JSON output** β€” LinkedIn HTML is parsed into typed Python dataclasses, then serialized to JSON for reliable LLM consumption.
  160. - **Session persistence** β€” Browser state is saved to disk, so authentication is required only once.
  161. ---
  162. ## Development
  163. ### Setup
  164. ```bash
  165. uv sync --group dev
  166. uv run pre-commit install
  167. ```
  168. ### Running tests
  169. ```bash
  170. uv run pytest
  171. ```
  172. With coverage:
  173. ```bash
  174. uv run pytest --cov=linkedin_mcp_server
  175. ```
  176. ### Linting and formatting
  177. This project uses [Ruff](https://docs.astral.sh/ruff/) for both linting and formatting. Pre-commit hooks will run these automatically on each commit.
  178. ```bash
  179. # Lint
  180. uv run ruff check .
  181. # Lint and auto-fix
  182. uv run ruff check . --fix
  183. # Format
  184. uv run ruff format .
  185. ```
  186. ---
  187. ## License
  188. This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
  189. ---
  190. ## Contributing
  191. Contributions are welcome. Please read the [contributing guide](CONTRIBUTING.md) for details on the development workflow and submission process.
  192. ---
  193. ## Disclaimer
  194. This tool is intended for personal and educational use. Scraping LinkedIn may violate their Terms of Service. Use responsibly and at your own risk. The authors are not responsible for any misuse or consequences arising from the use of this software.

Ratings and comments

Sign in to rate this skill.

Sign in

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