linkedin-mcp
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 post an update about our new feature to 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 · Claude Code plugin
A local MCP server (TypeScript + Playwright) that lets Claude manage your own LinkedIn account and the Company/showcase Pages you admin — post, schedule, read the feed, and read/reply to comments — by driving a real local Chrome under your existing logged-in web session.
Ships as a Claude Code plugin: the MCP server, six slash commands, and a skill that teaches Claude the safe-use rules. Install with two commands — see Install.
⚠️ Read this first — Terms of Service & risk
This automates the LinkedIn website. It does not use the official LinkedIn API.
Automating LinkedIn web browsing violates the LinkedIn User Agreement and can get your account rate-limited, restricted, or banned.
Use it for your own account, at low volume, for actions you initiate. Do not bulk-post, scrape, or run it across many accounts.
Run it locally only — your own machine, your own residential IP, a headed (visible) browser. Never run it in the cloud, in Docker, or on a datacenter IP: that fingerprint is exactly what LinkedIn flags.
Provided as-is, no warranty. You accept the risk.
Related MCP server: LinkedIn MCP Server
Requirements
Node.js ≥ 22.5 (uses the built-in
node:sqlite— no native build step).Google Chrome installed (Playwright drives your system Chrome via
channel: "chrome"; no separate browser download).
Install as a Claude Code plugin
The repo is its own single-plugin marketplace:
/plugin marketplace add HDHNezherParking-cum-Y638-Intl-Ltd/linkedin-mcp
/plugin install linkedin@linkedin-mcpThen, in order:
/linkedin:setup # installs npm deps + compiles src/ → dist/ (once, ~30s)
/linkedin:login # opens Chrome; you sign in by hand/linkedin:setup is optional — the server bootstraps itself on its first tool call — but running
it up front keeps that first call from stalling behind an npm install.
If Chrome isn't found, either install Google Chrome, or run
npx playwright install chromiumand delete thechannel: 'chrome'option insrc/browser.ts.
Slash commands
Command | What it does |
| Install dependencies and build the bundled server. Idempotent. |
| Check the session; open a browser to sign in if needed. |
| Draft a post, show it for approval, publish to your profile or a Page. |
| Queue / list / cancel scheduled posts. |
| Read comments on a post and draft replies. |
| Diagnose runtime, build, session, and selector drift. |
The bundled linkedin-account skill loads automatically when a conversation turns to
LinkedIn: tool ordering, the approve-before-publishing rule, the local-scheduler caveat, volume
limits, and where to repair selectors.
Or: register the server directly (no plugin)
Claude Desktop (claude_desktop_config.json) or a project .mcp.json, after
npm install && npm run build:
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/absolute/path/to/linkedin-mcp/dist/index.js"]
}
}
}First run — log in once
Run
/linkedin:login(or call thelinkedin_logintool). A real Chrome window opens.Log in by hand (2FA, email, and device checkpoints all work — you're driving).
Your session is saved to
~/.linkedin-mcp/session/and reused on later runs.linkedin_session_statusconfirms you're logged in.
Re-run linkedin_login whenever the session expires (LinkedIn's li_at cookie lasts weeks to
months; there's no fixed TTL).
Tools
Tool | What it does |
| Open a headed browser and wait for you to log in manually. No password stored. |
| Report whether you're logged in; warn if page selectors have drifted. |
| Publish a text post to your personal profile. |
| Publish later, via LinkedIn's native scheduler or the local queue — you pick. |
| List locally queued posts and their status. |
| Cancel a still-pending locally queued post. |
| List your recent posts (their refs feed |
| Read comments on a post (URL or activity/share URN). |
| Reply to a comment. |
| List Company/showcase Pages surfaced to your account. |
| Publish a post as a Page you admin. |
| Light snapshot of your home feed. |
Scheduling — two modes, you choose
schedule_post takes a required scheduler argument and has no default. Claude asks you
which one before scheduling anything.
|
| |
Who holds the post | LinkedIn (composer → clock icon) | This server, in |
Machine asleep at the due time | Publishes anyway | Publishes late, on the next poll after restart |
List / cancel from here | No — do it on linkedin.com | Yes |
Browser runs | Now, to place the schedule | At the due time |
Time granularity | LinkedIn's own picker (fixed slots, limited horizon) | Any future instant |
The local scheduler fires only while this server process is running. If your machine is off at the scheduled time, the post goes out on the next poll after the server is back. Native scheduling is the one to use when the send time has to hold.
Either way scheduledAt is an ISO-8601 instant (2026-07-23T14:30:00Z); for native scheduling it
is converted to this machine's local wall-clock time, which is what LinkedIn's picker expects.
Configuration
All optional — set as environment variables, or in a .env file. Two are loaded, later wins:
~/.linkedin-mcp/.env (use this when installed as a plugin — a plugin's own directory is a cache
that updates overwrite) and ./.env (repo-local, for development). See
.env.example.
Env | Default | Meaning |
|
| Root for session + scheduler state. |
|
| Persistent Chrome profile (your logged-in session). |
|
| Scheduler database. |
|
| Run non-login actions headless. Login is always headed. |
|
| How long login waits for you. |
|
| Scheduler poll interval. |
|
| Randomized delay between UI steps ( |
Security & secrets
No password is ever read, stored, or logged — login is interactive in a real browser.
Your session cookies and the scheduler DB live in
~/.linkedin-mcp/, outside the repo and outside the plugin cache (so a plugin update never wipes your login, and no project directory ever ends up holding your cookies). Treat~/.linkedin-mcp/session/like a password — anyone with it can act as you on LinkedIn..gitignorecoverssession/,data/,.env,*.sqlite,dist/,node_modules/.
Selector maintenance (expect this)
LinkedIn's markup changes constantly. Every LinkedIn selector lives in one file:
src/linkedin/selectors.ts. When a tool errors with
"update src/linkedin/selectors.ts", or linkedin_session_status warns that a selector drifted,
fix the locator there — nowhere else. The comment / feed / page selectors are best-effort and
may need a live tuning pass against your account the first time you use those tools.
Known limitations
The exact URL of a new post isn't always captured (LinkedIn doesn't reliably expose it).
read_feed,list_pages, and comment parsing are best-effort and sensitive to DOM changes.Replying as a Page isn't supported (LinkedIn doesn't reliably expose the identity switcher in reply boxes).
Text posts only — no media/video upload.
Not the official API; no analytics, messaging, or connection management.
Development
npm run typecheck # tsc --noEmit
npm run build # compile to dist/
npm test # node:test — scheduler + validation + plugin manifests (no browser, no network)
npm run smoke # boot the server in-memory and list tools (no LinkedIn contact)
npm run dev # run from source via tsxThe scheduler is unit-tested with the browser mocked (the worker takes an injectable poster).
test/plugin.test.ts guards the packaging: the manifests parse, the paths they reference exist,
and every MCP tool pre-allowed in a command is one the server actually registers.
Live LinkedIn flows are verified manually — never in CI (needs a real session and would violate ToS).
Plugin layout
Path | Role |
| Plugin manifest (name, version, author). |
| Makes this repo a single-plugin marketplace. |
| Registers the bundled stdio server via |
| Bootstrap: installs + compiles if missing or stale, then starts the server in-process. |
| The |
| Safe-use rules Claude loads on LinkedIn topics. |
A marketplace install is a plain git clone — no node_modules, no dist/ — which is why
launch.mjs builds on first run. It compares the newest mtime under src/ against dist/, so a
plugin update rebuilds automatically. All its output goes to stderr; stdout is the MCP channel.
Opening this repo as a Claude Code project will surface the root
.mcp.jsonas a project server. Decline it —${CLAUDE_PLUGIN_ROOT}only expands in plugin scope. Registerdist/index.jsby absolute path instead (see above).
License
MIT — see LICENSE.
Available Tools
12 toolscancel_scheduled_postCancel a scheduled postA
Cancel a still-pending post in the LOCAL queue by id. Natively scheduled posts must be canceled in LinkedIn's own scheduled-posts view.
Inputs: id (required).
create_page_postPost as a PageA
Publish a text post AS a Company/showcase Page you admin. page is the Page name or id from list_pages.
Inputs: page (required), text (required).
create_postCreate a postA
Publish a text post to your personal LinkedIn profile, now. For a future time use schedule_post (which first asks the user native vs local scheduler).
Inputs: text (required).
linkedin_loginLog in to LinkedInA
Open a real Chromium window and wait for you to log in manually (including 2FA / security checkpoints). The session is saved locally and reused; your password is never read or stored. Run once, or again if the session expires.
Inputs: no named parameters.
linkedin_session_statusCheck LinkedIn sessionARead-only
Report whether the saved LinkedIn session is still logged in, and warn if core page selectors have drifted (a maintenance signal).
Inputs: no named parameters.
list_my_postsList my recent postsARead-only
List your recent posts (their refs can be passed to read_post_comments).
Inputs: limit.
list_pagesList PagesARead-only
List Company/showcase Pages surfaced to your account. Best-effort — may include followed (non-admin) companies; verify admin rights before posting as a Page.
Inputs: no named parameters.
list_scheduled_postsList scheduled postsARead-only
List queued/scheduled posts and their status. LOCAL queue only — posts handed to LinkedIn's native scheduler are held by LinkedIn and only visible on linkedin.com.
Inputs: status.
read_feedRead home feedARead-only
Read a light snapshot of your home feed (best-effort; feed layout changes often).
Inputs: limit.
read_post_commentsRead comments on a postARead-only
Read comments on a post. post is a post URL or an activity/share URN.
Inputs: post (required), limit.
reply_to_commentReply to a commentA
Reply to a comment (use commentRef from read_post_comments).
Inputs: post (required), text (required), commentRef (required), asPage.
schedule_postSchedule a postA
Publish a post at a future time, through ONE of two schedulers. There is no default — ask the user which one they want BEFORE calling this, and state the trade-off:
"native": LinkedIn schedules it itself (composer -> clock icon). Fires at the requested time even if this machine is asleep or Claude is closed, but the queued post then lives on linkedin.com and this server can neither list nor cancel it. Drives the browser now, so the session must be live and the text is final at that moment.
"local": queued in this server's SQLite queue, so list_scheduled_posts and cancel_scheduled_post keep working. But it fires ONLY while this server process is running; if the machine is off at the scheduled time, it posts on the next tick after the process is running again — late.
Inputs: text (required), scheduler (required), scheduledAt (required), asPage.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct action/resource: authentication, session status, immediate post, scheduled post, queue management, post listing, comment reading/reply, page listing/page post, and feed reading. No two tools overlap in purpose.
Most tools follow a clear verb_noun pattern (create_post, schedule_post, list_scheduled_posts, cancel_scheduled_post, list_my_posts, read_post_comments, reply_to_comment, list_pages, create_page_post, read_feed). The exceptions are linkedin_login and linkedin_session_status, which use a prefix style that deviates from the rest.
12 tools cover the core LinkedIn automation domain—auth, posting (immediate and scheduled), scheduling queue management, comments, pages, and feed—without excess. This is a well-scoped count for the server's purpose.
The posting lifecycle is well covered (create, schedule, list, cancel), along with comments and page posts. Missing operations like editing or deleting posts are minor gaps; agents can work around them, but they are noteworthy for a complete LinkedIn content management surface.
Maintenance
Related MCP Connectors
LinkedIn MCP for Claude, ChatGPT, Grok, Hermes: triage inbox, comment, find people, live profiles
Publish and schedule LinkedIn posts from your AI assistant.
Schedule and publish LinkedIn posts to profiles and company pages from AI agents.
Save, illustrate, schedule, and publish LinkedIn posts from Claude, ChatGPT, or any MCP client.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables Claude Desktop to manage your LinkedIn profile and company pages, including posting, reading posts, and fetching profile information.74MIT
- AlicenseAqualityDmaintenanceEnables Claude to interact with LinkedIn for posting, commenting, sharing media, and viewing feed and profile.93MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude AI to interact with LinkedIn through browser automation, including profile reading, people and job search, company research, post publishing, and profile editing.MIT
- AlicenseAqualityDmaintenanceEnables posting content, sharing articles, and managing your LinkedIn profile through Claude using the official LinkedIn API with OAuth 2.0.6MIT