LinkedIn MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LinkedIn MCP Server Get my LinkedIn profile"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LinkedIn MCP Server
Complete LinkedIn automation toolkit. Scrape profiles, manage posts, read any LinkedIn content, and automate interactions via MCP (Model Context Protocol).
๐ Table of Contents
Overview
linkedin-mcp is a fully featured MCP server that provides automation tools for LinkedIn.
It supports browser-based scraping and API-based operations for content management, media uploads, and reactions.
Repository: Linkedin MCP Server
Features
๐ Scraping (Browser-Based)
Extract full LinkedIn profiles
Scrape company pages
Read job listings
Read ANY LinkedIn post
Extract images, videos, engagement metrics
๐ API-Based Post Management
Create, update, delete LinkedIn posts
Add or remove reactions
Upload images and documents
Supports all official LinkedIn REST API features
๐งฉ MCP Integration
Works with Claude Desktop and any MCP-compatible client
17 total tools included
๐งช Testing
50+ tests
Covers scraping, API, and MCP tools
Quickstart
Install
git clone https://github.com/selvin-paul-raj/Linkedin-MCP-Server.git
cd Linkedin-MCP-Server
# create environment config
cp .env.example .env
# install dependencies
pip install -e .Run
# Standard MCP server
uv run linkedin-mcp
# Debug mode (shows browser)
uv run main.py --debug --no-headless --no-lazy-init
# HTTP mode
uv run main.py --transport streamable-httpAuthentication
Related MCP server: LinkedIn MCP Pro Max
1. Scraping (LinkedIn Cookie)
Get your li_at cookie:
Log in to LinkedIn in Chrome
Press F12
Application โ Cookies โ https://www.linkedin.com
Copy the
li_atcookie valueAdd to
.env:
LINKEDIN_COOKIE=li_at=YOUR_COOKIE_VALUE2. API (OAuth Access Token)
Add these fields to .env:
LINKEDIN_CLIENT_ID=your_id
LINKEDIN_CLIENT_SECRET=your_secret
LINKEDIN_ACCESS_TOKEN=your_access_token
LINKEDIN_API_VERSION=202510Quick OAuth Link
https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=w_member_social%20r_liteprofile%20r_emailaddressExchange auth code:
curl -X POST https://www.linkedin.com/oauth/v2/accessToken \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=authorization_code" \
-d "code=YOUR_CODE" \
-d "redirect_uri=YOUR_REDIRECT_URI" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET"Usage
Read any LinkedIn post
{
"tool": "read_linkedin_post",
"input": "https://www.linkedin.com/posts/...activity-123456..."
}Create a post
{
"tool": "create_linkedin_post",
"input": {
"text": "Excited to announce our new product launch! ๐",
"visibility": "PUBLIC"
}
}Upload image
{
"tool": "upload_linkedin_image",
"input": { "image_url": "https://example.com/image.jpg" }
}Claude Desktop Integration
Add this to claude_desktop_config.json:
{
"mcpServers": {
"linkedin": {
"command": "uv",
"args": [
"--directory",
"D:\\MCP\\linkedin-mcp",
"run",
"linkedin-mcp"
],
"env": {
"LINKEDIN_COOKIE": "li_at=YOUR_COOKIE",
"LINKEDIN_ACCESS_TOKEN": "YOUR_TOKEN"
}
}
}
}Available Tools
๐ Content Reading
read_linkedin_post
๐ Scraping
get_person_profileget_company_profileget_job_detailssearch_jobssearch_recommended_jobsclose_session
๐ Post Management
create_linkedin_postupdate_linkedin_postdelete_linkedin_post
๐ผ๏ธ Media
upload_linkedin_imageget_linkedin_image
๐ Reactions
add_linkedin_reactionremove_linkedin_reactionget_linkedin_reactions
๐ค Profile & Auth
get_linkedin_profilevalidate_linkedin_credentials
More details. See TOOLS_REFERENCE.md.
Project Structure
linkedin-mcp/
โโโ linkedin_mcp_server/
โ โโโ server.py
โ โโโ cli.py
โ โโโ config/
โ โโโ drivers/
โ โโโ tools/
โโโ tests/
โ โโโ unit/
โ โโโ integration/
โโโ scripts/
โโโ .env.example
โโโ pyproject.toml
โโโ README.md
โโโ TOOLS_REFERENCE.mdTesting
# unit tests
uv run pytest tests/unit -v
# integration tests
uv run pytest tests/integration -v
# all tests
uv run pytest tests/ -vQuick API test:
uv run python scripts/test_api.pyTroubleshooting
โ "426 Client Error: Upgrade Required"
Fix:
LINKEDIN_API_VERSION=202510โ "LINKEDIN_COOKIE required"
Get fresh cookie from Chrome.
โ "401 Unauthorized"
Generate a new access token.
ChromeDriver issues
pip install --upgrade selenium webdriver-managerAPI Versioning
Current default:
202510Check latest: https://learn.microsoft.com/en-us/linkedin/marketing/versioning
Update:
LINKEDIN_API_VERSION=202511Restart the server.
Contributing
git clone https://github.com/selvin-paul-raj/Linkedin-MCP-Server.git
cd Linkedin-MCP-Server
uv sync
uv run pytest tests/ -v
uv run ruff format .
uv run pre-commit run --all-filesPull requests welcome.
License
MIT License.
See the LICENSE file.
Disclaimer
This tool is for educational and automation purposes. Follow LinkedIn TOS, API terms, and usage limits. Use responsibly.
Built with โค๏ธ for LinkedIn automation
Available Tools
6 toolsclose_sessionA
Close the current browser session and clean up resources.
Inputs: no named parameters. Returns: object
get_company_profileA
Get a specific company's LinkedIn profile.
Args: company_name (str): LinkedIn company name (e.g., "docker", "anthropic", "microsoft") get_employees (bool): Whether to scrape the company's employees (slower)
Returns: Dict[str, Any]: Structured data from the company's profile
Inputs: company_name (required), get_employees. Returns: object
get_job_detailsA
Get job details for a specific job posting on LinkedIn
Args: job_id (str): LinkedIn job ID (e.g., "4252026496", "3856789012")
Returns: Dict[str, Any]: Structured job data including title, company, location, posting date, application count, and job description (may be empty if content is protected)
Inputs: job_id (required). Returns: object
get_person_profileA
Get a specific person's LinkedIn profile.
Args: linkedin_username (str): LinkedIn username (e.g., "stickerdaniel", "anistji")
Returns: Dict[str, Any]: Structured data from the person's profile
Inputs: linkedin_username (required). Returns: object
get_recommended_jobsB
Get your personalized recommended jobs from LinkedIn
Returns: List[Dict[str, Any]]: List of recommended jobs
Inputs: no named parameters. Returns: result
search_jobsB
Search for jobs on LinkedIn using a search term.
Args: search_term (str): Search term to use for the job search.
Returns: List[Dict[str, Any]]: List of job search results
Inputs: search_term (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 6 tools
Each tool has a clear, distinct purpose: session management, company profiles, person profiles, job details, recommended jobs, and job search. No two tools overlap in functionality.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., get_company_profile, search_jobs), making them predictable and easy to understand.
With 6 tools, the set is well-scoped for a LinkedIn-focused server covering profiles and jobs without being overwhelming or sparse.
The tool surface covers basic read operations (profiles, jobs) but lacks common interaction capabilities like sending messages, posting updates, or managing connections, leaving notable gaps.
Maintenance
Related MCP Connectors
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
Hosted LinkedIn MCP server on your own account: 35 tools for search, profiles, inbox, posts, pages.
LinkedIn MCP with 47 tools: post, comment, DM and run comment-to-DM automations inside your limits.
A hosted LinkedIn MCP server for your own account. Paste one address into Claude, ChatGPT, Cursor or n8n to read your inbox, send messages and invitations, and search people. Free to start. Not made by LinkedIn.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA FastMCP-based server that enables programmatic LinkedIn automation and data extraction through browser automation, offering secure authentication and tools for profile operations and post interactions while respecting LinkedIn's rate limits.55-
- AlicenseAqualityDmaintenanceHigh-performance autonomous MCP server that turns LinkedIn into an API for AI workflows, enabling profile management, job search, content posting, and document generation.141MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for programmable LinkedIn automation via Playwright, offering 20 tools for profile management, messaging, feed interaction, and job searching through real browser automation.-
- FlicenseAqualityDmaintenanceMCP server for automating LinkedIn actions such as reading feeds, sending messages, creating posts, and managing connections. Uses browser automation with proxy and stealth support.21-