Skip to main content
Glama

LinkedIn Model Context Protocol (MCP) Server

by Rayyan9477

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 OAuth 2.0 authentication with token refresh
  • Profile Management: Access and update LinkedIn profile information
  • Job Search: Advanced job search with filtering and pagination
  • Resume & Cover Letters: Generate tailored resumes and cover letters
  • Messaging: Send messages and connection requests
  • Analytics: Track job applications and engagement metrics
  • Async API: Built with asyncio for high performance
  • Modular Design: Clean, maintainable code with separation of concerns

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.

Project Structure

linkedin_mcp/ ├── api/ │ ├── clients/ # API client implementations │ │ ├── __init__.py # Client factory functions │ │ ├── linkedin.py # LinkedIn API client │ │ └── openai.py # OpenAI integration │ │ │ ├── models/ # Data models and schemas │ │ ├── __init__.py # Model exports │ │ ├── common.py # Common data models │ │ ├── enums.py # Enumerations │ │ ├── requests.py # Request models │ │ └── responses.py # Response models │ │ │ └── services/ # Business logic │ └── ... │ ├── core/ # Core application logic │ ├── __init__.py │ ├── exceptions.py # Custom exceptions │ ├── mcp_handler.py # MCP protocol handler │ └── protocol.py # Protocol definitions │ ├── utils/ # Utility functions │ ├── __init__.py │ ├── auth.py # Authentication helpers │ ├── rate_limiter.py # Rate limiting │ └── retry.py # Retry mechanisms │ ├── examples/ # Example scripts │ └── basic_usage.py # Basic client usage example │ ├── .env.example # Example environment variables ├── README.md # This file └── requirements.txt # Project dependencies

Getting Started

Prerequisites

Installation

  1. Clone the repository
    git clone https://github.com/yourusername/linkedin-mcp.git cd linkedin-mcp
  2. Create and activate a virtual environment
    # Linux/macOS python -m venv venv source venv/bin/activate # Windows python -m venv venv .\venv\Scripts\activate
  3. Install dependencies
    pip install -r requirements.txt
  4. Set up environment variables
    cp .env.example .env
    Edit the .env file with your LinkedIn API credentials and other settings.

Configuration

Create a .env file in the project root with the following variables (see .env.example for details):

# LinkedIn API Credentials (required) LINKEDIN_CLIENT_ID=your_client_id_here LINKEDIN_CLIENT_SECRET=your_client_secret_here LINKEDIN_REDIRECT_URI=http://localhost:8080/callback # Optional: OpenAI API Key (for resume/cover letter generation) # OPENAI_API_KEY=your_openai_api_key_here # Optional: Logging LOG_LEVEL=INFO # 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

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

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. Project Structure
    2. Getting Started
      1. Prerequisites
      2. Installation
    3. 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

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A server that enhances AI assistants with the ability to update your JSON Resume by analyzing your coding projects, automatically extracting skills and generating professional descriptions.
              Last updated -
              3
              32
              39
              TypeScript
              The Unlicense
              • Apple
              • Linux
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that enables seamless interaction with LinkedIn for job applications, profile retrieval, feed browsing, and resume analysis through natural language commands.
              Last updated -
              10
              Python
            • -
              security
              F
              license
              -
              quality
              A server implementing the Model Context Protocol that enables users to retrieve LinkedIn profile information and activity data via EnrichB2B API, and generate text using OpenAI GPT-4 or Anthropic Claude models.
              Last updated -
              Python
              • Linux
            • -
              security
              A
              license
              -
              quality
              Enables AI assistants to interact with LinkedIn data through the Model Context Protocol, allowing profile searches, job discovery, messaging, and network analytics.
              Last updated -
              1
              TypeScript
              MIT License
              • Apple

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/Rayyan9477/linkedin_mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server