Skip to content

raghav18482/LinkedInMCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkedIn MCP Server

A Model Context Protocol (MCP) server implementation for interacting with LinkedIn data using Claude AI. This server provides tools to fetch LinkedIn profiles, search jobs, and generate PDF CVs using the LinkedIn API.

Features

  • Fetch detailed LinkedIn profile data
  • Search for jobs with advanced filters
  • Generate PDF CVs from LinkedIn profiles
  • Integration with Claude AI Desktop

Prerequisites

  • Python 3.8+
  • Claude AI Desktop
  • RapidAPI Key for LinkedIn APIs
  • MCP SDK

Installation

  1. First, install uv package manager by following the instructions at uv installation guide. Here are the quick install commands:

    For macOS and Linux:

    curl -LsSf https://astral.sh/uv/install.sh | sh

    For Windows:

    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  2. Clone the repository:

    git clone https://github.com/yourusername/LinkedInMCP.git
    cd LinkedInMCP
  3. Install dependencies using uv:

    uv sync

    This will automatically install all required dependencies from the project configuration.

  4. Create a .env file in the project root:

    RAPIDAPI_KEY=your_rapidapi_key_here
    
  5. Run the Project:

    uv run linkedIn.py
    

Docker Support

You can also run this project using Docker. This is the recommended way to ensure consistent behavior across different environments.

Prerequisites

  • Docker installed on your machine
  • Your .env file configured with the necessary API keys

Building and Running with Docker

  1. Build the Docker image:

    docker build -t projectmcp .
  2. Run the container:

    docker run -it --env-file .env projectmcp

    Options explained:

    • -it: Makes the container interactive
    • --env-file .env: Passes your environment variables from .env file
    • projectmcp: The name of the Docker image we built

    To run in detached (background) mode:

    docker run -d --env-file .env projectmcp

Claude AI Desktop Setup

To integrate with Claude AI Desktop, create or modify the configuration file at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the following configuration:

{
  "mcpServers": {
    "ProjectMCP": {
      "command": "/Users/username/.local/bin/uv",  // Path to your uv installation
      "args": [
        "--directory",
        "/path/to/ProjectMCP",
        "run",
        "linkedIn.py"
      ]
    }
  }
}

Note: Replace /Users/username/.local/bin/uv with your actual uv installation path. You can find this by running:

which uv  # On macOS/Linux
where uv  # On Windows

Available Tools

  1. get_profile: Fetch LinkedIn profile data

    • Input: LinkedIn profile URL
    • Output: JSON formatted profile data
  2. get_jobs: Search for jobs on LinkedIn

    • Inputs:
      • keywords (required)
      • geo_code (optional)
      • date_posted (optional)
      • company_id (optional)
  3. get_pdf_cv: Generate PDF CV from LinkedIn profile

    • Input: LinkedIn profile URL
    • Output: PDF file or success message

Running the Server

Currently, the server runs using STDIO transport:

python linkedIn.py

Transport Modes

This project currently uses STDIO transport, which is ideal for development and testing. Future implementations will include SSE (Server-Sent Events) transport.

STDIO vs SSE Transport:

  • STDIO Transport:

    • Simple command-line based communication
    • Ideal for development and testing
    • Direct integration with Claude AI Desktop
    • Limited to local machine communication
  • SSE Transport (Future Implementation):

    • Web-based communication protocol
    • Enables remote server deployment
    • Better for production environments
    • Supports multiple concurrent clients
    • Can be integrated with web frameworks like FastAPI or Starlette

Credits

Required Documentation:

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

Automate the Task with LLM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •