linkedin-mcp
Open-source MCP server for the official LinkedIn API — automate posts on your personal profile from Claude, ChatGPT, Cursor & any MCP client
Install / Use
claude mcp add vlpmedialtd -- npx -y github:vlpmedialtd/linkedin-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AutomationSupported Platforms
Tags
Our assessment of linkedin-mcp
linkedin-mcp scores 83/100 on our quality scale, 2132nd of 2,771 Automation skills we index.
Its MCP Server is 21 KB long, well organised into 18 sections with 18 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so linkedin-mcp is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
linkedin-mcp compared with similar skills
All 4 of these similar skills score higher than linkedin-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| linkedin-mcp (this skill)by vlpmedialtd | 83 | 3 | 2mo ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 112.7k | 10d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 82.0k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.9k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 48.0k | 1d ago | CLAUDE.md |
Frequently asked questions
- How do I install linkedin-mcp?
- Run
claude mcp add vlpmedialtd -- npx -y github:vlpmedialtd/linkedin-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does linkedin-mcp work with?
- It is written for Claude Code, Claude Desktop and Cursor, as a MCP Server file. Other agents that read the same format can often use it too.
- Is linkedin-mcp safe to use?
- It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is linkedin-mcp still maintained?
- The repository was last updated about 2 months ago, so linkedin-mcp is actively maintained.
Skill content
View source on GitHublinkedin-mcp
Post to LinkedIn from Claude, ChatGPT, Cursor or any AI assistant — on your personal profile, through the official LinkedIn API.
linkedin-mcp is an open-source Model Context Protocol server. You sign in once with your own LinkedIn developer app, and your assistant can publish text, link and image posts, comment and react. No scraping, no password sharing, no browser automation.
No company account needed. It works with a normal personal LinkedIn profile. LinkedIn only asks you to link your developer app to a Page, and you can create one yourself in a minute (see step 1).
Contents
- What can I do with it?
- Setup
- 1. Create a LinkedIn app
- 2. Sign in
- 3a. Use with Claude Code / Claude Desktop / Cursor
- 3b. Use with ChatGPT
- 3c. Self-hosting (always on): for Claude routines, claude.ai and scheduled tasks
- Example prompts
- Automated posting
- Troubleshooting
- Tools reference
- Configuration
- Company pages
- Security
- Development
What can I do with it?
With a personal profile and the default setup (access is granted instantly):
| | |
| --- | --- |
| ✅ Publish posts | Plain text, with a link preview, or with an image (local file or URL) |
| ✅ Real hashtags | #AI becomes a clickable hashtag; special characters are escaped automatically |
| ✅ Visibility | Public, connections only, or signed-in members |
| ✅ Engage | Comment on posts and react (like, celebrate, support, love, insightful, funny) |
| ✅ Delete | Remove posts you created |
| ✅ Automate | Let your assistant write and publish on a schedule |
| ❌ Read your feed, posts or engagement statistics (likes, comments, impressions) | LinkedIn restricts r_member_social to approved partners; no app setting enables it |
| ❌ Messages, connections, search, other profiles | Not offered by LinkedIn's public API |
Company pages are supported as well, but need extra approval from LinkedIn (see Company pages).
Setup
You need Node.js 22+ (node -v) and a LinkedIn account.
1. Create a LinkedIn app (5 minutes)
-
Create a LinkedIn Page, if you don't have one. LinkedIn requires every developer app to be linked to a Page. This is only a formality: go to For Business → Create a Company Page, pick any name (e.g. "Jane Doe Tools"). It never has to post anything. Your posts still appear on your personal profile.
-
Open https://www.linkedin.com/developers/apps → Create app, pick that Page, upload any logo.
-
Settings tab → Verify the app with the Page. As the Page admin you approve it yourself.
-
Products tab → click Request access on exactly these two (both are granted instantly):
- Share on LinkedIn: publish, comment, react (
w_member_social) - Sign In with LinkedIn using OpenID Connect: identifies you as the author (
openid profile email)
Don't request the other products (Advertising, Lead Sync, Events, Community Management, …). You don't need them for personal posting.
- Share on LinkedIn: publish, comment, react (
-
Auth tab → Authorized redirect URLs for your app → pencil icon → Add redirect URL → paste exactly
http://localhost:8787/callbackand click Update. It must be
http(not https),localhost(not 127.0.0.1), with no trailing slash. -
Still in Auth: check that OAuth 2.0 scopes lists
openid,profile,email,w_member_social. Keep this tab open, you'll need the Client ID and Primary Client Secret.
2. Sign in
Run this in your terminal. It's the only command you need, and it asks for everything:
npx -y github:vlpmedialtd/linkedin-mcp auth
LinkedIn Client ID:→ paste the Client ID, press EnterLinkedIn Client Secret (hidden):→ click the copy icon next to Primary Client Secret, paste, press Enter. Nothing is shown while you paste; that's intentional. You'll see(received NN characters): the secret is much longer than the 14-character Client ID.- Your browser opens → click Allow
- Wait until the terminal shows
✔ Token saved to ~/.config/linkedin-mcp/token.json. Only then are you done.
The token is valid for 60 days. Run the same command again when it expires.
Paste values at the prompts, not behind the command. If your terminal shows
dquote>, pressCtrl+Cand start again.
3a. Use with Claude Code / Claude Desktop / Cursor
These clients start the server locally on your computer.
Claude Code
claude mcp add -s user linkedin -- npx -y github:vlpmedialtd/linkedin-mcp
Check with claude mcp list (should show linkedin … ✓ Connected), then start a new session.
Claude Desktop / Cursor / Windsurf / any stdio MCP client: add to claude_desktop_config.json, .cursor/mcp.json, …
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": ["-y", "github:vlpmedialtd/linkedin-mcp"]
}
}
}
Restart the app. Test it by asking "Who am I on LinkedIn?". This only reads your profile; nothing is posted.
Claude Desktop (macOS): the config file is
~/Library/Application Support/Claude/claude_desktop_config.json. Desktop apps don't inherit your shell'sPATH, so if Node is installed via nvm, Homebrew or in~/.local/bin, use the absolute path fromwhich npxand pass aPATH:{ "mcpServers": { "linkedin": { "command": "/Users/you/.local/bin/npx", "args": ["-y", "github:vlpmedialtd/linkedin-mcp"], "env": { "PATH": "/Users/you/.local/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin" } } } }Quit Claude completely (
Cmd+Q) and reopen it.claude mcp addonly configures Claude Code, not the Claude Desktop chat.
claude.ai in the browser / Claude mobile: these need a remote server. Start the HTTP mode with a tunnel (steps 1 and 2), then go to Settings → Connectors → Add custom connector and paste https://<tunnel>/mcp/<secret>.
3b. Use with ChatGPT
ChatGPT can't start programs on your computer. It connects to MCP servers over public HTTPS instead. linkedin-mcp has an HTTP mode for this, and you make it reachable through a tunnel.
Requirements: a ChatGPT plan with Developer mode (Plus, Pro, Business, Enterprise or Education, on the web), and steps 1 and 2 above completed.
1. Start the HTTP server (terminal 1, keep it running)
npx -y github:vlpmedialtd/linkedin-mcp http
It prints your secret endpoint, for example http://127.0.0.1:3000/mcp/Xy7…. The part after /mcp/ is a random secret stored in ~/.config/linkedin-mcp/http-token, so it stays the same across restarts.
2. Open an HTTPS tunnel (terminal 2, keep it running)
brew install cloudflared
cloudflared tunnel --url http://localhost:3000
Copy the https://….trycloudflare.com address it prints. ngrok (ngrok http 3000) works the same way.
3. Add the app in ChatGPT
- ChatGPT → Settings → Security and login → turn on Developer mode.
- Go to Plugins (apps) → + to create a developer-mode app for a remote MCP server.
- MCP server URL: your tunnel address +
/mcp/+ your secret, e.g.https://blue-sky-1234.trycloudflare.com/mcp/Xy7… - Authentication: No authentication. The secret in the URL protects the server.
- Confirm that you trust the app and create it.
4. Use it: in a chat, open the + menu → Developer mode → enable your LinkedIn app, then ask "Who am I on LinkedIn?". ChatGPT asks for confirmation before write actions such as publishing a post.
Good to know:
- Both terminals must keep running and your computer must stay awake while ChatGPT uses the app.
- Quick tunnels get a new address on every start. Update the app's URL in ChatGPT afterwards, or use a named Cloudflare tunnel or an ngrok static domain for a permanent address.
- Images: ChatGPT can't hand files from the chat to the server. Use an image URL, or a file path on the computer running the server.
- Always-on hosting: run
linkedin-mcp http --host 0.0.0.0on any Node host (VPS, Railway, Render, Fly.io …) withLINKEDIN_ACCESS_TOKENandMCP_AUTH_TOKENset as environment variables, behind HTTPS. - Menu names in ChatGPT change from time to time. See OpenAI's Developer mode guide for the current steps.
3c. Self-hosting (always on)
Cloud features such as Claude routines, claude.ai connectors and ChatGPT scheduled tasks run on the provider's servers and can't reach your laptop. For them, run linkedin-mcp permanently on a small Linux server. Tested on Ubuntu with Caddy for automatic HTTPS; the files are in deploy/.
Requirements: a server with a public IP, SSH as root, and a (sub)domain whose DNS A record points to the server (e.g. mcp.example.com).
1. Install (on the server)
apt-get update && apt-get install -y git caddy nodejs npm
useradd --system --home /var/lib/linkedin-mcp --create-home --shell /usr/sbin/nologin linkedin-mcp
git clone https://github.com/vlpmedialtd/linkedin-mcp.git /opt/linkedin-mcp && cd /opt/linkedin-mcp && npm ci && npm run build
Node must be 22 or newer (node -v). Otherwise install it from NodeSource.
2. Copy your LinkedIn token (run auth on your computer first, then from your computer)
scp ~/.config/linkedin-mcp/token.json root@SERVER:/root/token.json
On the server:
install -d -m 700 -o linkedin-mcp -g linkedin-mcp /etc/linkedin-mcp && install -m 600 -o linkedin-mcp -g linkedin-mcp /root/token.json /etc/linkedin-mcp/token.json && rm /root/token.json
3. Service, HTTPS and firewall
cp /opt/linkedin-mcp/deploy/linkedin-mcp.service /etc/systemd/system/ && systemctl daemon-reload && systemctl enable --now linkedin-mcp
cp /opt/linkedin-mcp/deploy/Caddyfile /etc/caddy/Caddyfile && sed -i 's/mcp.example.com/YOUR.DOMAIN/' /etc/caddy/Caddyfile && systemctl reload caddy
ufw allow OpenSSH && ufw allow 80/tcp && ufw allow 443/tcp && ufw --force enable
4. Get your connector URL
echo "https://YOUR.DOMAIN/linkedin/mcp/$(cat /etc/linkedin-mcp/http-token)"
Check https://YOUR.DOMAIN/linkedin/health → {"status":"ok"}.
5. Add it as a connector
- claude.ai (also used by Claude routines, the desktop and mobile apps): Settings → Connectors → Add custom connector → name
LinkedIn, paste the URL, no OAuth needed. - ChatGPT: see 3b, step 3, with this URL instead of the tunnel.
Maintenance
| Task | Command (on the server) |
| --- | --- |
| Renew LinkedIn token (every 60 days) | run auth locally, then repeat step 2 and systemctl restart linkedin-mcp |
| Update to the latest version | cd /opt/linkedin-mcp && git pull && npm ci && npm run build && systemctl restart linkedin-mcp |
| New secret URL | rm /etc/linkedin-mcp/http-token && systemctl restart linkedin-mcp, then step 4 and update the connector |
| Logs | journalctl -u linkedin-mcp -f |
Example prompts
- *"Who am I on Linke
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
112.7kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ruflo
82.0k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
headroom
79.9kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
48.0kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
