Skip to main content
Glama
LinkedIn Profile Scraper MCP Server

LinkedIn Profile Scraper MCP Server

by Ayesha0300

LinkedIn Profile Scraper MCP Server

This MCP server uses the Fresh LinkedIn Profile Data API to fetch LinkedIn profile information. It is implemented as a model context protocol (MCP) server and exposes a single tool, get_profile, which accepts a LinkedIn profile URL and returns the profile data in JSON format.

Features

  • Fetch Profile Data: Retrieves LinkedIn profile information including skills and other settings (with most additional details disabled).

  • Asynchronous HTTP Requests: Uses httpx for non-blocking API calls.

  • Environment-based Configuration: Reads the RAPIDAPI_KEY from your environment variables using dotenv.

Related MCP server: linkedin-mcp-server

Prerequisites

  • Python 3.7+ – Ensure you are using Python version 3.7 or higher.

  • MCP Framework: Make sure the MCP framework is installed.

  • Required Libraries: Install httpx, python-dotenv, and other dependencies.

  • RAPIDAPI_KEY: Obtain an API key from RapidAPI and add it to a .env file in your project directory (or set it in your environment).

Installation

  1. Clone the Repository:

    git clone https://github.com/AIAnytime/Awesome-MCP-Server
    cd linkedin_profile_scraper
  2. Install Dependencies:

    uv add mcp[cli] httpx requests
  3. Set Up Environment Variables:

    Create a .env file in the project directory with the following content:

    RAPIDAPI_KEY=your_rapidapi_key_here

Running the Server

To run the MCP server, execute:

uv run linkedin.py

The server will start and listen for incoming requests via standard I/O.

MCP Client Configuration

To connect your MCP client to this server, add the following configuration to your config.json. Adjust the paths as necessary for your environment:

{
  "mcpServers": {
    "linkedin_profile_scraper": {
      "command": "C:/Users/aiany/.local/bin/uv",
      "args": [
        "--directory",
        "C:/Users/aiany/OneDrive/Desktop/YT Video/linkedin-mcp/project",
        "run",
        "linkedin.py"
      ]
    }
  }
}

Code Overview

  • Environment Setup: The server uses dotenv to load the RAPIDAPI_KEY required to authenticate with the Fresh LinkedIn Profile Data API.

  • API Call: The asynchronous function get_linkedin_data makes a GET request to the API with specified query parameters.

  • MCP Tool: The get_profile tool wraps the API call and returns formatted JSON data, or an error message if the call fails.

  • Server Execution: The MCP server is run with the stdio transport.

Troubleshooting

  • Missing RAPIDAPI_KEY: If the key is not set, the server will raise a ValueError. Make sure the key is added to your .env file or set in your environment.

  • API Errors: If the API request fails, the tool will return a message indicating that the profile data could not be fetched.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Available Tools

1 tool
get_profileB

Get LinkedIn profile data for a given profile URL.

Args:
    linkedin_url: The LinkedIn profile URL.

Inputs: linkedin_url (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined and distinct by default.

    Naming Consistency5/5

    The single tool name follows a clear verb_noun pattern (get_profile), and with only one tool, consistency is inherently perfect as there are no other tools to compare against.

    Tool Count2/5

    A single tool is too few for a server labeled as a 'LinkedIn Profile Scraper MCP Server,' which suggests a broader scope. This minimal set feels thin and underdeveloped for scraping tasks that might include multiple operations like search, batch processing, or data extraction beyond single profiles.

    Completeness2/5

    The tool surface is severely incomplete for a LinkedIn scraper. It only allows fetching a single profile by URL, missing essential operations such as searching for profiles, handling authentication, pagination, or extracting additional data like connections or posts, which are typical in scraping workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A Node.js-based Model Context Protocol server that exposes Proxycurl's LinkedIn data API, allowing MCP-compatible clients to access LinkedIn profile data, company information, and search for employees.
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for LinkedIn API integration. Enables authentication, profile access, connections, search, messaging, and feed management via OAuth2.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server that lets you analyze your own LinkedIn profile with a local LLM (LM Studio). It uses Playwright to reuse your browser session, fetch profile data as JSON, and provides tools for session management and profile analysis.
      1
      MIT