Get the FREE Ultimate OpenClaw Setup Guide →

Linkedin

A lightweight MCP server for LinkedIn automation. Supports profile, job, company and post scraping. Enables post creation, reactions and media upload for agent workflows

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio selvin-paul-raj-linkedin-mcp-server uv run linkedin-mcp \
  --env LINKEDIN_COOKIE="li_at=YOUR_COOKIE_VALUE" \
  --env LINKEDIN_CLIENT_ID="YOUR_CLIENT_ID" \
  --env LINKEDIN_API_VERSION="202510" \
  --env LINKEDIN_ACCESS_TOKEN="YOUR_ACCESS_TOKEN" \
  --env LINKEDIN_CLIENT_SECRET="YOUR_CLIENT_SECRET"

How to use

This MCP server provides a full LinkedIn automation toolkit. It enables both browser-based scraping (to extract complete LinkedIn profiles, company pages, job listings, and posts) and API-based content management (creating, updating, deleting posts, uploading media, and managing reactions), all accessible through the MCP interface. The server exposes a variety of tools for reading, scraping, posting, media handling, and reactions, and is designed to work with Claude Desktop or any MCP-compatible client. To get started, run the server via the MCP runner (uv) and then invoke the available tools through the standard MCP tooling or your client of choice. The project ships with a complete set of tools such as read_linkedin_post, get_person_profile, get_company_profile, create_linkedin_post, upload_linkedin_image, add_linkedin_reaction, and more, all documented in TOOLS_REFERENCE.md.

How to install

Prerequisites:

  • Python 3.12+ installed on your system
  • Git installed
  • Internet access to install dependencies

Installation steps:

  1. Clone the repository git clone https://github.com/selvin-paul-raj/Linkedin-MCP-Server.git cd Linkedin-MCP-Server

  2. Create an environment configuration file (example provided by repository) cp .env.example .env

    Edit .env to include required credentials (see README for details)

  3. Install the package in editable mode pip install -e .

  4. Prepare to run

    • Ensure required environment variables are set in .env or via the MCP config env (LINKEDIN_COOKIE, LINKEDIN_CLIENT_ID, etc.)
    • You can also follow the Claude Desktop integration snippet to configure your client
  5. Run the MCP server uv run linkedin-mcp

Optional debugging or HTTP mode: uv run main.py --debug --no-headless --no-lazy-init uv run main.py --transport streamable-http

Additional notes

Tips and common issues:

  • If you encounter a 426 Client Error: Upgrade Required, ensure LINKEDIN_API_VERSION is set to a supported version (e.g., 202510).
  • The LinkedIn cookie (li_at) must be fresh; update it if you see COOKIE required errors.
  • API token errors (401) usually mean the access token expired; refresh tokens as needed.
  • For ChromeDriver related problems, updating selenium and webdriver-manager can help (pip install --upgrade selenium webdriver-manager).
  • The server uses environment-based configuration; prefer .env for sensitive credentials and keep it out of version control.
  • API versioning: check the latest LinkedIn API version and adjust LINKS if necessary, then restart the server to apply changes.
  • When using Claude Desktop, ensure claude_desktop_config.json points to the correct directory and command (uv run linkedin-mcp) and that environment variables are provided.
  • Tests are available and can be run with uv run pytest tests/ -v; run unit tests separately from integration tests to isolate issues.

Related MCP Servers

Sponsor this space

Reach thousands of developers