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.
-
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
- Python 3.8+
- Playwright
- FastMCP library
- LinkedIn account
- Clone the repository:
git clone [repository-url]
cd mcp-linkedin-server- Create and activate a virtual environment:
python -m venv env
source env/bin/activate # On Windows: env\Scripts\activate- Install dependencies:
pip install -r requirements.txt
playwright install chromium- Set up environment variables:
Create a
.envfile 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- Start the MCP server:
python linkedin_browser_mcp.py- Available Tools: