Skip to main content
Glama

LinkedIn Browser MCP Server

by alinaqi

LinkedIn Browser MCP Server

A FastMCP-based server for LinkedIn automation and data extraction using browser automation. This server provides a set of tools for interacting with LinkedIn programmatically while respecting LinkedIn's terms of service and rate limits.

Features

  • Secure Authentication
    • Environment-based credential management
    • Session persistence with encrypted cookie storage
    • Rate limiting protection
    • Automatic session recovery
  • Profile Operations
    • View and extract profile information
    • Search for profiles based on keywords
    • Browse LinkedIn feed
    • Profile visiting capabilities
  • Post Interactions
    • Like posts
    • Comment on posts
    • Read post content and engagement metrics

Prerequisites

  • Python 3.8+
  • Playwright
  • FastMCP library
  • LinkedIn account

Installation

  1. Clone the repository:
git clone [repository-url] cd mcp-linkedin-server
  1. Create and activate a virtual environment:
python -m venv env source env/bin/activate # On Windows: env\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt playwright install chromium
  1. Set up environment variables: Create a .env file in the root directory with:
LINKEDIN_USERNAME=your_email@example.com LINKEDIN_PASSWORD=your_password COOKIE_ENCRYPTION_KEY=your_encryption_key # Optional: will be auto-generated if not provided

Usage

  1. Start the MCP server:
python linkedin_browser_mcp.py
  1. Available Tools:
  • login_linkedin_secure: Securely log in using environment credentials
  • browse_linkedin_feed: Browse and extract posts from feed
  • search_linkedin_profiles: Search for profiles matching criteria
  • view_linkedin_profile: View and extract data from specific profiles
  • interact_with_linkedin_post: Like, comment, or read posts

Example Usage

from fastmcp import FastMCP # Initialize client client = FastMCP.connect("http://localhost:8000") # Login result = await client.login_linkedin_secure() print(result) # Search profiles profiles = await client.search_linkedin_profiles( query="software engineer", count=5 ) print(profiles) # View profile profile_data = await client.view_linkedin_profile( profile_url="https://www.linkedin.com/in/username" ) print(profile_data)

Security Features

  • Encrypted cookie storage
  • Rate limiting protection
  • Secure credential management
  • Session persistence
  • Browser automation security measures

Best Practices

  1. Rate Limiting: The server implements rate limiting to prevent excessive requests:
    • Maximum 5 login attempts per hour
    • Automatic session reuse
    • Cookie persistence to minimize login needs
  2. Error Handling: Comprehensive error handling for:
    • Network issues
    • Authentication failures
    • LinkedIn security challenges
    • Invalid URLs or parameters
  3. Session Management:
    • Automatic cookie encryption
    • Session persistence
    • Secure storage practices

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

MIT

Disclaimer

This tool is for educational purposes only. Ensure compliance with LinkedIn's terms of service and rate limiting guidelines when using this software.

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

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

브라우저 자동화를 통해 프로그래밍 방식의 LinkedIn 자동화와 데이터 추출을 가능하게 하는 FastMCP 기반 서버로, LinkedIn의 속도 제한을 준수하면서 프로필 작업과 게시물 상호작용을 위한 안전한 인증 및 도구를 제공합니다.

  1. 특징
    1. 필수 조건
      1. 설치
        1. 용법
          1. 사용 예
        2. 보안 기능
          1. 모범 사례
            1. 기여하다
              1. 특허
                1. 부인 성명

                  Related MCP Servers

                  • -
                    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 -
                    19
                    Python
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A Model Context Protocol (MCP) server that automates generating LinkedIn post drafts from YouTube videos. This server provides high-quality, editable content drafts based on YouTube video transcripts.
                    Last updated -
                    6
                    16
                    JavaScript
                    MIT License
                    • Apple
                  • A
                    security
                    F
                    license
                    A
                    quality
                    MCP server that fetches LinkedIn profile information using the Fresh LinkedIn Profile Data API, allowing users to retrieve profile data in JSON format by providing a LinkedIn profile URL.
                    Last updated -
                    1
                    Python
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A FastMCP server that enables browser automation through natural language commands, allowing Language Models to browse the web, fill out forms, click buttons, and perform other web-based tasks via a simple API.
                    Last updated -
                    3
                    Python

                  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/alinaqi/mcp-linkedin-server'

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