This release is a pre-release and may not be stable for production use.
LinkedIn MCP Server
A custom Model Context Protocol server that gives AI assistants control of your LinkedIn account through your own logged-in browser session.
Publish posts, read and edit your profile, search jobs, and apply via Easy Apply — all from a chat conversation with any MCP-compatible client (opencode, Claude, Cursor, and more).
⚠️ Disclaimer: This project automates your real LinkedIn account in a browser. LinkedIn's User Agreement (§8.2) prohibits bots, scraping, and automation. Use at your own risk; aggressive or mass automation can lead to account restriction. All browser actions run locally on your machine.
Quick Start (first-timers)
The 5-minute path from nothing to your first LinkedIn post via AI. Requires only uv, a terminal, and a LinkedIn account.
1. Install uv (skip if you already have it)
# Windows (PowerShell)
irm https://astral.sh/uv/install.ps1 | iex
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
2. Install the package and its browser
uv tool install linkedin-mcp-automation
linkedin-mcp --install-browsers
Alternatively install from source with
git clone https://github.com/developer-tusharchauhan/linkedin-mcp.git,uv syncinside the folder, and run viapython -m linkedin_mcp.serverinstead of thelinkedin-mcpcommand.
3. Register with your MCP client
| Client | How |
|---|---|
| opencode | Add to opencode.json: {"mcp": {"linkedin": {"type": "local", "command": ["linkedin-mcp"], "enabled": true}}} |
| Claude Desktop / Claude Code / Cursor | Add to your MCP config: {"mcpServers": {"linkedin": {"command": "linkedin-mcp"}}} |
| VS Code | Add to .vscode/mcp.json a server entry with "command": "linkedin-mcp" |
Source install instead? Use these config blocks (replace YOUR_PATH/linkedin-mcp)
{
"mcpServers": {
"linkedin": {
"command": "uv",
"args": ["--directory", "YOUR_PATH/linkedin-mcp", "run", "python", "-m", "linkedin_mcp.server"]
}
}
}
On Windows, if your client does not resolve
linkedin-mcp(e.g. binding to App Control policy), configurecommandaspython -m linkedin_mcp.serverafter a pip/venv install, or theuv --directory ... python -mform above for a source install.
4. Restart your MCP client, then in the chat:
Run the login tool.
A Chromium window opens — sign in to LinkedIn there (complete 2FA/captcha if asked). After that, session is saved and you can say things like:
- "Read my LinkedIn profile"
- "Publish this post on LinkedIn: I just shipped my first MCP server!"
- "Search for Data Engineer jobs posted this week, remote"
- "Check this job and dry-run the Easy Apply form: "
Seeing
Failed to spawnon a Windows machine? Your security policy blocks uv's script shims — thepython -mcommands above already work around it. Just restart the client.
Features
- Posting — publish posts to your LinkedIn feed, edit or delete existing posts
- Profile — read your full profile, edit headline / About, add experience & education entries
- Jobs — search jobs with keyword, location, date, and type filters; fetch full job details
- Easy Apply — dry-run form inspection first, consent-gated submission
- Session persistence — sign in once, reuse the session indefinitely
Tools
| Tool | Description |
|---|---|
login |
Open a headed browser window to sign in to LinkedIn and save the session |
check_session |
Check whether the persisted session is still valid |
create_post |
Publish a post to your feed |
edit_post |
Replace the text of one of your existing posts (matched by text) |
delete_post |
Delete one of your posts (matched by text; requires confirm) |
get_my_profile |
Read name, headline, about, experience, education, skills |
update_headline |
Replace your profile headline |
update_about |
Replace your About / Summary section |
update_experience |
Add a new experience (job) entry |
update_education |
Add a new education entry |
search_jobs |
Search LinkedIn jobs with filters |
get_job_details |
Fetch full details for a job URL |
easy_apply |
Inspect (dry-run) or submit an Easy Apply form |
Requirements
- uv (Python package manager)
- A LinkedIn account
Installation
Choose one — A is the fastest and requires no Git or source checkout.
Option A — Install from PyPI
# installs the linkedin-mcp command + deps (mcp, patchright)
uv tool install linkedin-mcp-automation
# one-time: download the Chromium browser that drives LinkedIn
linkedin-mcp --install-browsers
Then register the linkedin-mcp command with your MCP client (no path needed):
{ "mcpServers": { "linkedin": { "command": "linkedin-mcp" } } }
Prefer a venv over an isolated tool?
uv venvthenuv pip install linkedin-mcp-automation, and usepython -m linkedin_mcp.server(activate the venv for your MCP client) pluspython -m patchright install chromiumto set up the browser.
Option B — From source (contributors)
git clone https://github.com/developer-tusharchauhan/linkedin-mcp.git
cd linkedin-mcp
uv sync
uv run patchright install chromium
First run — sign in
The server ships with no credentials. On first use, call the login tool:
- A Chromium window opens.
- Sign in to LinkedIn (including 2FA / captcha if prompted).
- The session is saved to
~/.linkedin-mcp/profileand reused automatically.
Easy Apply auto-fill
Before submitting applications, create ~/.linkedin-mcp/answers.json mapping question labels to your answers. Keys are matched case-insensitively against form labels:
{
"phone": "+44 7xxx xxx xxxx",
"city": "London",
"years of python experience": "3",
"willing to relocate": "yes"
}
Registering with an MCP client
Installed from PyPI (Option A)? The command is just linkedin-mcp:
{
"mcpServers": {
"linkedin": { "command": "linkedin-mcp" }
}
}
For opencode:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"linkedin": { "type": "local", "command": ["linkedin-mcp"], "enabled": true }
}
}
Running from source (Option B)? Point at the checkout — works from any directory:
{
"mcpServers": {
"linkedin": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/linkedin-mcp", "run", "python", "-m", "linkedin_mcp.server"]
}
}
}
Windows / corporate machines: some security policies (App Control / AppLocker) block generated
.exeshims (likelinkedin-mcp). If you seeFailed to spawn, switch to thepython -mform — a venv pip install makespython -m linkedin_mcp.serverwork from any directory — and restart your MCP client.
Releasing a new version
The repo includes a GitHub Actions workflow (.github/workflows/release.yml) that builds and publishes to PyPI automatically when a v* tag is pushed.
- Create a PyPI account and your project (
linkedin-mcp-automation). - On the PyPI project page → Publishing → add a Trusted Publisher:
- GitHub owner:
developer-tusharchauhan - Repository:
linkedin-mcp - Workflow name:
release.yml - Environment:
release
- GitHub owner:
- Tag and push — the workflow builds and publishes for you:
git tag v0.1.0 git push origin v0.1.0
(Trigger it manually anytime via Actions → Release to PyPI → Run workflow.)
Manual alternative (one-off): run uv publish locally with UV_PUBLISH_TOKEN set to a PyPI API token.
Example usage
Once connected, just ask your assistant:
- "Publish a post on LinkedIn about my new project"
- "Read my LinkedIn profile"
- "Update my headline to: Software Engineer | AI & Data"
- "Search for Senior Data Engineer jobs posted this week, remote"
- "Check this job and dry-run the Easy Apply form: https://www.linkedin.com/jobs/view/1234567890"
It is recommended to inspect (dry_run) before submitting any application.
How it works
- Patchright (a stealth-patched Playwright fork) drives a persistent Chromium profile.
- A process-wide lock serializes tool calls — one browser at a time.
- LinkedIn selectors are matched against the current DOM; if LinkedIn changes markup, some tools may need a selector refresh.
Project layout
linkedin-mcp/
├── pyproject.toml # dependencies + entrypoint
├── src/linkedin_mcp/
│ ├── server.py # MCP server: registers all tools
│ ├── browser.py # persistent browser session management
│ └── linkedin.py # automation routines
└── README.md
License
MIT
Metadata
Release files for linkedin-mcp-automation 0.1.0b2
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 |
|---|---|---|---|---|
| linkedin_mcp_automation-0.1.0b2.tar.gz | 56.1 kB | Without provenance | Details for linkedin_mcp_automation-0.1.0b2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| linkedin_mcp_automation-0.1.0b2-py3-none-any.whl | Python 3 | none | any | Details for linkedin_mcp_automation-0.1.0b2-py3-none-any.whl |
Total release size: 72.6 kB
Release files / linkedin_mcp_automation-0.1.0b2.tar.gz
| Download URL | linkedin_mcp_automation-0.1.0b2.tar.gz |
|---|---|
| Size | 56.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7002d68098d5758d374c9f83f98888563f32b8e2da1bc1e3ca84c481a7bd13cc
|
|
BLAKE2b-256 checksum How to use checksums |
4b61daf0732fb8e58349154ffc4f253dbd41c1c595e28b6854ba38df5edca0e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.16 {"installer":{"name":"uv","version":"0.12.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / linkedin_mcp_automation-0.1.0b2-py3-none-any.whl
| Download URL | linkedin_mcp_automation-0.1.0b2-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db0a073530f3acf0ae435bf81361c04ddf1243e37e254d3fca8ef8cddea4c137
|
|
BLAKE2b-256 checksum How to use checksums |
e0b62f2a92554ab8c3cd39b3f9e0ae296421a4dc63b9cf26355c95d5292083bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.16 {"installer":{"name":"uv","version":"0.12.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for linkedin-mcp-automation 0.1.0b2
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.