Linkedin Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Linkedin Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
An MCP (Model Context Protocol) server that lets AI agents publish to LinkedIn as the authenticated member — text posts, link shares, single/multi-image posts, reshares, comments, and reactions — with built-in safety rails for autonomous operation: daily budget limits, engagement deduplication, compact TOON-encoded responses, and self-describing errors with typo suggestions.
Authentication is OAuth 2.0 (3-legged) with a cluster-hosted callback protected by HTTP Basic Auth, so you never have to copy tokens onto a server by hand. Tokens, budgets, and dedup state live in a single JSON file you can back with a Kubernetes PVC.
Works with Claude Code, Claude Desktop, OpenAI Codex, Cursor, Windsurf, Cline, and any other MCP-compatible client — run it locally or via Docker.
Scope (Phase 1). LinkedIn's public API only allows member write actions plus reading your own profile. There is no public API to read the feed, search posts, list followers/connections, or follow people. This MCP is therefore publish-and-engage oriented. See spec.md for the full design and rationale.| Category | Tools | What You Can Say |
|---|---|---|
| Identity | get_me | "Who am I posting as?" |
| Publish | create_post, create_image_post, create_multi_image_post, reshare_post | "Post 'hello world' on LinkedIn" / "Share this image with a caption" |
| Media | upload_media | "Upload this image and post it" |
| Engage | comment_on_post, react_to_post | "Comment 'congrats' on this post" / "Like this post" |
| Lifecycle | delete_post | "Delete that post" |
Post-targeting tools accept either a LinkedIn URN (urn:li:share:... / urn:li:ugcPost:... / urn:li:activity:...) or a post URL interchangeably.
Hard per-action limits per day. The server refuses when exhausted — even if the LLM ignores every instruction.
LI_MCP_MAX_POSTS=5 # Max posts/reshares per day (default)
LI_MCP_MAX_COMMENTS=10 # Max comments per day
LI_MCP_MAX_REACTIONS=30 # Max reactions per day
LI_MCP_MAX_DELETES=3 # Max post deletions per daySet to 0 to disable an action entirely. Set to -1 for unlimited.
Every response includes the remaining budget, so the LLM sees its limits proactively:
li_budget: "1/5 posts used, 0/10 comments used, 2/30 reactions used, 0/3 deletes used | last action: 3m ago"Never comment on or react to the same post twice. Set LI_MCP_DEDUP=false to disable.
Responses use TOON and drop verbose fields to save tokens. Set LI_MCP_TOON=false for JSON, LI_MCP_COMPACT=false to keep full shapes.
Tools validate parameters and return actionable hints with fuzzy-matched suggestions for typos, so the LLM learns from mistakes instead of getting opaque errors.
You pass post text as plain text — the server handles LinkedIn's quirks for you:
commentary as "Little Text", where \ | { } @ [ ] ( ) < > # * _ ~are reserved. An unescaped one (notably () silently truncates the post. The server escapes them automatically.
#hashtags are preserved as clickable hashtags."This post cannot be displayed".
git clone https://github.com/2060-io/linkedin-mcp.git
cd linkedin-mcp
npm install
npm run buildcreate an app (it must be linked to a Company Page).
Share on LinkedIn. This grants the openid, profile, email, and w_member_social scopes.
Redirect URL (see below).
cp .env.example .envFill in LINKEDIN_CLIENT_ID, LINKEDIN_CLIENT_SECRET, and LINKEDIN_REDIRECT_URI (must EXACTLY match a Redirect URL on the app). See .env.example for every option.
OAuth tokens are minted once, then refreshed automatically until the refresh token expires (~1 year), at which point you re-authorize.
# LINKEDIN_REDIRECT_URI=http://localhost:8000/oauth/callback
npm run authOpen the printed URL, approve, and the tokens are written to the local state file.
With MCP_TRANSPORT=http and LI_MCP_ADMIN_USER / LI_MCP_ADMIN_PASSWORD set, the server exposes Basic-Auth-protected OAuth routes:
GET /oauth/start # redirects to LinkedIn consent
GET /oauth/callback # LinkedIn returns here; tokens persisted to state file
GET /oauth/status # shows whether a valid token is storedVisit https://<public-host>/oauth/start, authenticate with Basic Auth, approve on LinkedIn, and the member tokens land on the PVC. See charts/README.md.
# stdio (for local MCP clients)
MCP_TRANSPORT=stdio npm start
# http (for cluster / remote)
MCP_TRANSPORT=http MCP_PORT=8000 npm startHTTP endpoints: /mcp (StreamableHTTP), /healthz, and /oauth/*.
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/absolute/path/to/linkedin-mcp/dist/index.js"],
"env": { "MCP_TRANSPORT": "stdio" }
}
}
}A Helm chart is provided in charts/. It provisions a PVC for token/budget state, runs a single replica with the Recreate strategy, and wires LinkedIn + Basic Auth credentials through a Secret. See charts/README.md for install and authorization steps.
All durable state — OAuth tokens (the source of truth), daily budget counters, and engagement dedup — lives in one JSON file (LI_MCP_STATE_FILE, default {cwd}/linkedin-mcp-state.json). On Kubernetes, back it with a PVC so tokens survive restarts; otherwise a restart forces re-authorization and resets budgets.
npm run build # tsc
npm test # vitest
npm run dev # build + startTOON encoder vendored from @toon-format/toon (MIT). Architecture mirrors the sibling x-autonomous-mcp.
MIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.