LinkedIn

by alinaqi

18 stars
Not rated
GitHub

About

Integrates with LinkedIn to enable automated profile browsing, searching, and post interactions using Playwright for browser automation and secure session management.

Details

Author
alinaqi
Repository
alinaqi/mcp-linkedin-server
GitHub stars
18
Categories
Productivity, Developer Tools, Design, File Management, AI, Community, Media, Search, Infrastructure, Project Management, Automation, Frontend

- Secure Authentication
- Environment-based credential management
- Session persistence with encrypted cookie storage
- Rate limiting protection
- Automatic session recovery

- Profile Operations
- View and extract profile information
- Search for profiles based on keywords
- Browse LinkedIn feed
- Profile visiting capabilities

- Post Interactions
- Like posts
- Comment on posts
- Read post content and engagement metrics

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name LinkedIn
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

1. Start the MCP server:

python linkedin_browser_mcp.py

2. Available Tools:

- login_linkedin_secure: Securely log in using environment credentials
- browse_linkedin_feed: Browse and extract posts from feed
- search_linkedin_profiles: Search for profiles matching criteria
- view_linkedin_profile: View and extract data from specific profiles
- interact_with_linkedin_post: Like, comment, or read posts

```python
from fastmcp import FastMCP

login_linkedin_secure

Securely log in using environment credentials.

browse_linkedin_feed

Browse and extract posts from the LinkedIn feed.

search_linkedin_profiles

Search for profiles matching specified criteria.

view_linkedin_profile

View and extract data from specific LinkedIn profiles.

interact_with_linkedin_post

Like, comment on, or read content from LinkedIn posts.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "linkedin": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

LinkedIn Browser MCP Server

A FastMCP-based server for LinkedIn automation and data extraction using browser automation. This server provides a set of tools for interacting with LinkedIn programmatically while respecting LinkedIn's terms of service and rate limits.

Features

- Secure Authentication
- Environment-based credential management
- Session persistence with encrypted cookie storage
- Rate limiting protection
- Automatic session recovery

- Profile Operations
- View and extract profile information
- Search for profiles based on keywords
- Browse LinkedIn feed
- Profile visiting capabilities

- Post Interactions
- Like posts
- Comment on posts
- Read post content and engagement metrics

Prerequisites

- Python 3.8+
- Playwright
- FastMCP library
- LinkedIn account

Installation

1. Clone the repository:

git clone [repository-url]
cd mcp-linkedin-server

2. Create and activate a virtual environment:

python -m venv env
source env/bin/activate # On Windows: env\Scripts\activate

3. Install dependencies:

pip install -r requirements.txt
playwright install chromium

4. Set up environment variables:
Create a .env file in the root directory with:

LINKEDIN_USERNAME=your_email@example.com
LINKEDIN_PASSWORD=your_password
COOKIE_ENCRYPTION_KEY=your_encryption_key # Optional: will be auto-generated if not provided

Usage

1. Start the MCP server:

python linkedin_browser_mcp.py

2. Available Tools:

- login_linkedin_secure: Securely log in using environment credentials
- browse_linkedin_feed: Browse and extract posts from feed
- search_linkedin_profiles: Search for profiles matching criteria
- view_linkedin_profile: View and extract data from specific profiles
- interact_with_linkedin_post: Like, comment, or read posts

Example Usage

```python
from fastmcp import FastMCP

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.