LinkedIn Profile Scraper MCP server

Integrates with LinkedIn Profile Scraper API to asynchronously retrieve profile data including skills, certifications, publications, and honors for recruitment tools or professional data analysis.
Back to servers
Provider
DrFranko0
Release date
Mar 17, 2025
Language
Python

The LinkedIn Profile Scraper is a specialized tool that leverages FastMCP and httpx to fetch LinkedIn profile data through the RapidAPI LinkedIn Profile Scraper API. This server allows you to efficiently retrieve LinkedIn profile information programmatically with support for selective data inclusion.

Installation

Prerequisites

  • A RapidAPI account with access to the LinkedIn Profile Scraper API
  • A valid RAPIDAPI_KEY
  • Python installed on your system

Setup Instructions

  1. Clone the repository to your local machine:

    git clone https://github.com/username/linkedin-profile-scraper.git
    cd linkedin-profile-scraper
    
  2. Install the required dependencies:

    pip install -r requirements.txt
    
  3. Set up your environment variables:

    export RAPIDAPI_KEY="your_rapidapi_key_here"
    

    For Windows users:

    set RAPIDAPI_KEY=your_rapidapi_key_here
    

Usage

Basic Usage

To start the LinkedIn Profile Scraper server:

python main.py

API Endpoints

The server provides endpoints for fetching LinkedIn profile data:

Fetch Profile Data

POST /api/fetch-profile

Request Body Example:

{
  "profile_url": "https://www.linkedin.com/in/username",
  "include_skills": true,
  "include_certifications": true
}

Parameters:

  • profile_url (required): Full URL to the LinkedIn profile
  • include_skills (optional): Set to true to include skills in the response
  • include_certifications (optional): Set to true to include certifications

Example API Call

Using curl:

curl -X POST http://localhost:8000/api/fetch-profile \
  -H "Content-Type: application/json" \
  -d '{
    "profile_url": "https://www.linkedin.com/in/username",
    "include_skills": true,
    "include_certifications": true
  }'

Using Python with requests:

import requests

response = requests.post(
    "http://localhost:8000/api/fetch-profile",
    json={
        "profile_url": "https://www.linkedin.com/in/username",
        "include_skills": True,
        "include_certifications": True
    }
)

data = response.json()
print(data)

Configuration Options

You can customize the server behavior by modifying the following environment variables:

  • PORT: Server port (default: 8000)
  • LOG_LEVEL: Logging level (default: INFO)
  • MAX_WORKERS: Maximum number of concurrent requests (default: 5)

Example:

export PORT=9000
export LOG_LEVEL=DEBUG
export MAX_WORKERS=10
python main.py

Troubleshooting

Common Issues

  • API Key Issues: Ensure your RAPIDAPI_KEY is correctly set and has access to the LinkedIn Profile Scraper API
  • Rate Limiting: If you encounter rate limiting, reduce the MAX_WORKERS value or implement backoff strategies
  • Connection Errors: Check your internet connection and verify the RapidAPI service status

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later