LinkedIn Model Context Protocol (MCP) Server

by Rayyan9477
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Utilizes .ENV files for configuration management, allowing users to securely store LinkedIn credentials and API settings.

  • References GitHub for the Model Context Protocol specification that the server implements.

  • Uses OpenAI's API for resume and cover letter generation capabilities, as indicated by the configuration requirement for an OpenAI API key.

LinkedIn Model Context Protocol (MCP) Server

A powerful Model Context Protocol server for LinkedIn interactions that enables AI assistants to search for jobs, generate resumes and cover letters, and manage job applications programmatically.

Features

  • Authentication: Secure LinkedIn authentication with session management
  • Profile Management: Access and update LinkedIn profile information
  • Job Search: Search for jobs with flexible filtering options
  • Resume Generation: Create customized resumes from LinkedIn profiles
  • Cover Letter Generation: Generate tailored cover letters for specific job applications
  • Job Applications: Submit and track job applications

Architecture

This project implements the Model Context Protocol (MCP) specification, allowing AI assistants to interact with LinkedIn through standardized JSON-RPC style requests and responses.

Components:

  • MCP Handler: Routes requests to appropriate service handlers
  • API Modules: Specialized modules for LinkedIn interactions (auth, job search, profile, etc.)
  • Core Protocol: Defines request/response structures and data models
  • Utilities: Configuration management and helper functions

Installation

# Clone the repository git clone https://github.com/yourusername/linkedin-mcp.git cd linkedin-mcp # Create and activate a virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt

Configuration

Create a .env file in the project root with the following variables:

# LinkedIn Credentials LINKEDIN_USERNAME=your_email@example.com LINKEDIN_PASSWORD=your_password # API Settings OPENAI_API_KEY=your_openai_api_key SESSION_DIR=sessions DATA_DIR=data

Usage

Starting the Server

python server.py

Example MCP Requests

Authentication

{ "jsonrpc": "2.0", "id": 1, "method": "linkedin.login", "params": { "username": "user@example.com", "password": "password123" } }

Searching for Jobs

{ "jsonrpc": "2.0", "id": 2, "method": "linkedin.searchJobs", "params": { "filter": { "keywords": "software engineer", "location": "New York, NY", "distance": 25 }, "page": 1, "count": 20 } }

Generating a Resume

{ "jsonrpc": "2.0", "id": 3, "method": "linkedin.generateResume", "params": { "profileId": "user123", "template": "standard", "format": "pdf" } }

Available Methods

MethodDescription
linkedin.loginAuthenticate with LinkedIn
linkedin.logoutEnd the current session
linkedin.checkSessionCheck if the current session is valid
linkedin.getFeedGet LinkedIn feed posts
linkedin.getProfileGet LinkedIn profile information
linkedin.getCompanyGet company profile information
linkedin.searchJobsSearch for jobs with filters
linkedin.getJobDetailsGet detailed information about a job
linkedin.getRecommendedJobsGet job recommendations
linkedin.generateResumeGenerate a resume from a LinkedIn profile
linkedin.generateCoverLetterGenerate a cover letter for a job application
linkedin.tailorResumeCustomize a resume for a specific job
linkedin.applyToJobApply to a job
linkedin.getApplicationStatusCheck application status
linkedin.getSavedJobsGet saved jobs
linkedin.saveJobSave a job for later

Development

Project Structure

linkedin-mcp/ ├── README.md ├── requirements.txt ├── server.py ├── data/ │ ├── applications/ │ ├── companies/ │ ├── cover_letters/ │ ├── jobs/ │ ├── profiles/ │ └── resumes/ ├── linkedin_mcp/ │ ├── api/ │ │ ├── auth.py │ │ ├── cover_letter_generator.py │ │ ├── job_application.py │ │ ├── job_search.py │ │ ├── profile.py │ │ └── resume_generator.py │ ├── core/ │ │ ├── mcp_handler.py │ │ └── protocol.py │ └── utils/ │ └── config.py ├── sessions/ └── templates/ ├── cover_letter/ │ └── standard.html └── resume/ └── standard.html

Running Tests

pytest

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • LinkedIn API documentation
  • Model Context Protocol specification
-
security - not tested
F
license - not found
-
quality - not tested

A server that enables AI assistants to interact with LinkedIn programmatically for job searching, resume/cover letter generation, and managing job applications through standardized JSON-RPC requests.

  1. Features
    1. Architecture
      1. Components:
    2. Installation
      1. Configuration
        1. Usage
          1. Starting the Server
          2. Example MCP Requests
        2. Available Methods
          1. Development
            1. Project Structure
            2. Running Tests
          2. License
            1. Acknowledgments
              ID: i11n33v75n