Universal LinkedIn MCP Server
A Model Context Protocol (MCP) server that connects AI assistants (Claude, Grok, Cursor, Windsurf, Antigravity) to your LinkedIn account using your local Google Chrome browser, encrypted session storage, and strict /in/me account-boundary guardrails.
Prerequisites
- Google Chrome installed on your machine.
- Python 3.10+ (python.org/downloads).
uvpackage runner:- Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" - macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Windows (PowerShell):
Step 1: One-Time Login
Log in once interactively so your encrypted session is saved to ~/.linkedin_mcp:
uvx --from git+https://github.com/davidchimbueze/linkedin-mcp python -c "import asyncio; from linkedin_mcp.tools.auth import linkedin_start_login; asyncio.run(linkedin_start_login())"
- A Google Chrome window opens to LinkedIn's login page.
- Sign in and complete any 2FA or verification prompt.
- Once your feed loads, your encrypted session is saved and the browser closes automatically.
Step 2: Connect Your AI Client
Option A: Desktop AI Clients (stdio via uvx)
Add the following linkedin server entry to your client's MCP config:
{
"mcpServers": {
"linkedin": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/davidchimbueze/linkedin-mcp",
"linkedin-mcp"
]
}
}
}
Where to paste this config:
- Claude Desktop:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- Windows:
- Antigravity: Settings → MCP (
mcp_config.json) - Cursor:
.cursor/mcp.json(project) or global MCP settings - Windsurf:
~/.codeium/windsurf/mcp_config.json
Claude Code CLI:
claude mcp add linkedin -- uvx --from git+https://github.com/davidchimbueze/linkedin-mcp linkedin-mcp
Option B: Cloud Web AI (Grok.com / Streamable HTTP)
Remote web clients need a public HTTPS URL with Bearer token authentication:
git clone https://github.com/davidchimbueze/linkedin-mcp.git
cd linkedin-mcp
- Windows (PowerShell):
powershell -ExecutionPolicy Bypass -File .\run_for_grok.ps1
- macOS / Linux:
# Terminal 1: Start Streamable HTTP server uv run linkedin-mcp --transport streamable-http --port 8765 # Terminal 2: Expose via Cloudflare Tunnel cloudflared tunnel --url http://127.0.0.1:8765
In grok.com/connectors, add a Custom MCP Server using the tunnel URL and the Bearer token printed in your terminal (stored in ~/.linkedin_mcp/auth_token):
- URL:
https://<your-tunnel>.trycloudflare.com/mcp?token=<YOUR_AUTH_TOKEN>(or passAuthorization: Bearer <YOUR_AUTH_TOKEN>)
Option C: Local Development
git clone https://github.com/davidchimbueze/linkedin-mcp.git
cd linkedin-mcp
uv sync
Point your MCP client to your local checkout:
{
"mcpServers": {
"linkedin": {
"command": "uv",
"args": ["--directory", "<ABSOLUTE_PATH_TO_LINKEDIN_MCP>", "run", "linkedin-mcp"]
}
}
}
Configuration (Optional Environment Variables)
| Variable | Default | Description |
|---|---|---|
LINKEDIN_MCP_DATA_DIR |
~/.linkedin_mcp |
Directory for encrypted session, keys, and rate limits. |
LINKEDIN_HEADLESS |
true |
Run Chrome headlessly (false to watch browser actions). |
LINKEDIN_BROWSER_CHANNEL |
chrome |
Browser channel passed to Playwright. |
LINKEDIN_BROWSER_IDLE_TIMEOUT_S |
300 |
Seconds before idle warm browser context closes. |
LINKEDIN_TIMEZONE_ID |
(host default) | Optional browser timezone override. |
LINKEDIN_MCP_AUTH_TOKEN |
(auto-generated) | Bearer token required for HTTP/SSE transports. |
LINKEDIN_MCP_ALLOWED_ORIGINS |
https://grok.com,https://x.com |
Comma-separated allowed CORS origins. |
LINKEDIN_MAX_DAILY_INVITES |
20 |
Daily cap for send_connection_request. |
LINKEDIN_MAX_DAILY_MESSAGES |
30 |
Daily cap for send_message. |
LINKEDIN_MAX_DAILY_POSTS |
10 |
Daily cap for posts, polls, and reposts. |
LINKEDIN_MAX_DAILY_COMMENTS |
25 |
Daily cap for comment_on_post. |
Available MCP Tools (39 Tools)
All tools enforce @require_auth and operate strictly within your authenticated account.
| Category | Tool Name | Key Arguments | Description |
|---|---|---|---|
| Auth & Session | check_login_status |
(none) | Checks session validity, active identity, and sliding-window health. |
start_login |
timeout_seconds |
Opens Chrome for interactive sign-in and 2FA. | |
logout |
(none) | Clears stored session credentials, cookies, and cached identity. | |
refresh_session |
(none) | Runs a silent heartbeat to renew LinkedIn's 30-day session window. | |
| Self-Profile | get_my_profile |
(none) | Reads your authenticated profile details. |
(Locked to /in/me) |
update_my_headline |
headline |
Updates your profile headline. |
update_my_about |
summary |
Updates your About summary. | |
add_education |
school, degree, field_of_study, start_year, end_year Show all 10 argsschool, degree, field_of_study, start_month, start_year, end_month, end_year, grade, activities, description |
Adds an education entry. | |
add_experience |
title, company, employment_type, location, description Show all 11 argstitle, company, employment_type, location, location_type, is_current, start_month, start_year, end_month, end_year, description |
Adds a work experience entry. | |
add_skill |
skill_name |
Adds a skill to your profile. | |
add_project |
title, description, url, start_year, end_year |
Adds a project to your profile. | |
update_job_preferences |
job_titles, location_types, locations, employment_types |
Updates "Open to work" preferences. | |
update_my_services |
services_to_add, services_to_remove, description |
Updates your Services section. | |
| Browsing & Search | search_people |
keywords, location, current_company, limit |
Searches LinkedIn members with connection degree badges. |
view_profile |
profile_url |
Reads a member's profile (read-only). | |
view_company |
company_url |
Reads a LinkedIn Company Page (overview, industry, size, HQ). | |
| Jobs & Careers | search_jobs |
keywords, location, remote_filter, experience_level, limit |
Searches LinkedIn Jobs with workplace and level filters. |
get_job_details |
job_url |
Extracts full job description and metadata. | |
save_job |
job_url |
Bookmarks a job to your Saved Jobs list. | |
| Feed, Posts & Polls | get_feed |
limit |
Reads recent posts from your home feed. |
read_post |
post_url, include_comments, comment_limit |
Reads a post or Pulse article by URL (read-only). | |
search_posts |
keywords, sort_by, limit |
Searches LinkedIn posts by keyword or hashtag. | |
create_post |
text, media_path, dry_run |
Publishes a post (supports image/PDF attachment and dry_run). |
|
create_poll |
question, options, duration, dry_run |
Publishes a poll (2–4 options, supports dry_run). |
|
comment_on_post |
post_url, comment_text, dry_run |
Comments on a post (supports dry_run). |
|
react_to_post |
post_url, reaction_type |
Reacts to a post (like, celebrate, support, love, insightful, funny). |
|
repost_with_thoughts |
post_url, commentary, dry_run |
Reposts with commentary (supports dry_run). |
|
| Analytics | get_post_analytics |
limit |
Fetches impressions, reactions, and comments for your recent posts. |
get_profile_views |
(none) | Fetches profile view counts and viewer demographics. | |
| Messaging | list_conversations |
limit |
Lists recent inbox conversation threads. |
get_conversation_messages |
recipient_name, limit |
Reads message history for a specific conversation. | |
send_message |
recipient_profile_url, message_text, dry_run |
Sends a direct message (supports dry_run). |
|
| Network | send_connection_request |
profile_url, custom_note, dry_run |
Sends a connection invite (supports dry_run). |
get_pending_invitations |
(none) | Lists pending incoming connection invitations. | |
manage_invitation |
sender_name, action |
Accepts or ignores a pending invitation. | |
withdraw_connection_request |
profile_url |
Withdraws a pending outgoing invitation. | |
endorse_skill |
profile_url, skill_name |
Endorses a skill on a 1st-degree connection's profile. | |
| Agentic Skills | get_network_briefing |
limit |
Generates a digest of inbox, invitations, analytics, and feed trends. |
analyze_profile_strength |
(none) | Audits profile completeness and suggests improvements. |
Security & Privacy
- No Password Storage: Authentication is interactive via Chrome; passwords are never read or stored.
- Encrypted Local State:
storage_state.jsonis encrypted at rest with Fernet (~/.linkedin_mcp/.session.key). - Authenticated Remote Access: HTTP/SSE transports require a Bearer token and restrict CORS origins.
- Safety Guardrails: Self-profile edits are hard-locked to
/in/me/, high-risk actions supportdry_run=Trueand daily rate limits, and external read responses include untrusted-content notices.
Testing
uv run python -m unittest discover tests
Changelog & License
- See CHANGELOG.md for release notes (
v0.2.0and earlier). - Licensed under the MIT License. Authored by Chimbueze (David) Okoroji.
Metadata
Release files for davidchimbueze-linkedin-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| davidchimbueze_linkedin_mcp-0.2.0.tar.gz | 126.9 kB | Without provenance | Details for davidchimbueze_linkedin_mcp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| davidchimbueze_linkedin_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for davidchimbueze_linkedin_mcp-0.2.0-py3-none-any.whl |
Total release size: 192.4 kB
Release files / davidchimbueze_linkedin_mcp-0.2.0.tar.gz
| Download URL | davidchimbueze_linkedin_mcp-0.2.0.tar.gz |
|---|---|
| Size | 126.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80bfe8c9711d509d6e8b8758814f085927c18ab4404603e0d18b10d33c7e2838
|
|
BLAKE2b-256 checksum How to use checksums |
f0e1d2d38017e8d5273cc24bcd5aca42b0aad5faf86afc1de5484b5e5a5dc556
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / davidchimbueze_linkedin_mcp-0.2.0-py3-none-any.whl
| Download URL | davidchimbueze_linkedin_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 65.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbb5564c973fcb5e3afdadd20e1f8816964c21970df56454935e86c114325d8a
|
|
BLAKE2b-256 checksum How to use checksums |
95e5e190b3da7d88e248fb0c954d24acc2468ba2a984ecc19adfef799c3d92bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for davidchimbueze-linkedin-mcp 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.