Skip to main content
Glama
LinkedIn MCP

LinkedIn MCP

by rcreech93

LinkedIn MCP

This is a simple implementation of an MCP LinkedIn server using a Selenium and Chromedriver based scraper in the background.

At the moment it only support profile scraping and profile search.

Pre-requisites

Please install uv.

Create a virtual environment and sync the libraries.

uv venv
uv sync

Then install Chromedriver: https://developer.chrome.com/docs/chromedriver/get-started

The whole parsing of the LinkedIn webpage is based on Chromedriver.

Related MCP server: LinkedIn MCP Server

Environment

Make sure you have all of these variables in your .env file:

LINKEDIN_USER_1=<user>
LINKEDIN_PASSWORD_1=<pass>

LINKEDIN_USER_2=<user>
LINKEDIN_PASSWORD_2=<pass>

COOKIE_DIR=/var/linkedin/cookies

MCP_HOST=0.0.0.0
MCP_PORT=8050
# Either sse or stdio or streamable-http
MCP_TRANSPORT=streamable-http
MCP_TIMEOUT=150

You can use multiple LinkedIn username and password combinations.

Run in dev mode with MCP Inspector

mcp dev ./src/linkedin_mcp/server/server.py

Run with stdio

python ./src/linkedin_mcp/client/client_stdio.py

Run the server

uv run ./src/linkedin_mcp/server/server.py

Note: If you're experiencing issues with code changes not being picked up, clear the Python cache first:

# Windows PowerShell
.\clear_cache.ps1

# Or manually:
Get-ChildItem -Path . -Filter __pycache__ -Recurse -Directory | Remove-Item -Recurse -Force

Then restart the server. Alternatively, use Python's -B flag to skip bytecode generation:

uv run python -B ./src/linkedin_mcp/server/server.py

Integration with Gemini CLI

This is a modified .settings.json of the Gemini CLI with which you can use for connecting and using the MCP:

{
  "general": {
    "preferredEditor": "vscode"
  },
  "security": {
    "auth": {
      "selectedType": "gemini-api-key"
    }
  },
  "ui": {
    "theme": "Default"
  },
  "mcpServers": {
    "linkedin-scraper": {
      "httpUrl": "http://0.0.0.0:8050/mcp/",
      "transport": "streamable-http"
    }
  }
}

Available Tools

2 tools
linkedin_profileA
Extract a LinkedIn profile using web scraping with Selenium.

Args:
    profile: The LinkedIn profile URL or username
    extract_educations: If True, extract educations
    extract_skills: If True, extract skills
    extract_interests: If True, extract the profile interests

Returns:
    The LinkedIn profile as a dictionary

Example output in case of success:
    {
        "given_name": "Gil",
        "surname": "Fernandes",
        "email": "gil-palma-fernandes@linkedin.com",
        "cv": "A Software Engineer and data scientist with over 25 years of professional experience in different companies. I spent a good part of my professional career working in projects related to the aviation industry and the rest as developer in Talend and Java based projects.

In 2019 I commenced my learning on Artificial Intelligence and Deep Learning and related technologies and participated in several Kaggle competitions. I dedicate my weekends to my pet projects for UK charities which promote well-being and meditation.", "summary": "", "industry_name": "Software Engineer at Onepoint Consulting", "geo_location": "London Area, United Kingdom", "linkedin_profile_url": "https://www.linkedin.com/in/gil-palma-fernandes", "experiences": [ { "institution_name": "Onepoint Consulting · Full-time", "linkedin_url": "https://www.linkedin.com/company/309728/", "website": "", "industry": "", "type": "", "headquarters": "", ...

Example output in case of error:
{
    "error": "Error extracting profile: Error extracting profile"
}

Inputs: profile (required), extract_skills, extract_interests, extract_educations.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct purposes: one extracts a full profile from a URL or username, while the other searches for profiles by name. There is no overlap or ambiguity in their intended use.

    Naming Consistency3/5

    The tool names do not follow a consistent verb_noun pattern. 'linkedin_profile' is a noun phrase, while 'profile_search' places the verb at the end. This is a minor inconsistency, but both names are descriptive and readable.

    Tool Count3/5

    With only 2 tools, the server feels slightly thin for a comprehensive LinkedIn integration. However, the two tools cover the core search-and-retrieve workflow, so the count is borderline appropriate for a focused profile-scraping server.

    Completeness4/5

    The tool set covers the main workflow of finding a profile via search and then retrieving its full details. Missing features like connections or posts are not critical for the apparent purpose of profile extraction, so the coverage is solid with only minor gaps.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      An MCP server for LinkedIn automation that enables users to search for jobs, retrieve profile details, manage connections, and read or send messages. It leverages Playwright and Browserbase to interact with LinkedIn through an existing authenticated browser session.
      6
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Fully featured MCP server that provides automation tools for LinkedIn, supporting browser-based scraping and API-based operations for content management, media uploads, and reactions.
      6
      4
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server for programmable LinkedIn automation via Playwright, offering 20 tools for profile management, messaging, feed interaction, and job searching through real browser automation.
      -