Let your AI agent work with your LinkedIn.
linkedin-mcp is an open-source MCP connector. Add one URL to Claude, Cursor, OpenClaw or any MCP client, sign in with LinkedIn, and your agent can read your profile basics and publish posts after you approve them. No developer app, no keys.
https://linkedin-mcp.hariharankvasn.workers.dev/mcp
What it does
Two tools, kept deliberately small. Anything more would need LinkedIn permissions that individual developers can't get.
Know who's signed in
Returns the authenticated member's name, email, photo and locale, so the agent knows whose account it is acting on.
Publish a post
Posts text to your feed, visible to the public or to your connections only. Up to 3,000 characters.
How it works
The server runs locally and talks to your agent over stdio. It is the only thing that ever holds your LinkedIn token.
What a session looks like
Who it's for, and what for
Anyone who already works in an AI agent and wants LinkedIn to be one more thing it can do.
Developers and maintainers
Turn a changelog, release notes or a PR into a launch post without leaving your terminal or editor.
Writers and creators
Draft with your agent, tweak the wording, publish in the same conversation. Keep a voice file in your project and let the agent follow it.
Founders and small teams
Share build-in-public updates from notes or commit history, with a human approving each post.
Agent and workflow builders
A small, readable reference for wiring an OAuth-backed API into MCP, with tests and a multi-agent installer.
Connect in 30 seconds
The hosted connector works like any other connector in your assistant: add the URL, click Connect, approve. You never create a LinkedIn app or handle keys.
Or add it to every agent on your machine with one command:
curl -fsSL https://raw.githubusercontent.com/aigamer-dev/linkedin-mcp/main/install.sh | bash -s -- --hosted- Add the connector. In Claude, go to Settings → Connectors → Add custom connector and paste
https://linkedin-mcp.hariharankvasn.workers.dev/mcp. Other clients are in the table below. - Choose what to allow. A consent page shows which app is asking. You decide whether posting is allowed at all.
- Sign in on LinkedIn. You approve on LinkedIn's own screen. We never see your password.
- Use it. Ask your assistant to show your profile or draft and publish a post. LinkedIn access lasts about 60 days, then you reconnect.
| Client | How |
|---|---|
| Claude Code | claude mcp add --transport http --scope user linkedin https://linkedin-mcp.hariharankvasn.workers.dev/mcp |
| OpenClaw | openclaw mcp add linkedin --url https://linkedin-mcp.hariharankvasn.workers.dev/mcp --transport streamable-http --auth oauth |
| Cursor / VS Code | Add the URL to mcp.json (see the README) |
| Any MCP client | Remote server with OAuth 2.1 and dynamic client registration |
What is stored: your LinkedIn member ID, name and an encrypted access token. Never the text of your posts. Posting is limited to 10 per day. See the privacy policy and terms.
Or run it locally with your own app
For people who want everything on their own machine and their own LinkedIn app. Needs Node.js 20+, npm and git. The installer finds the agents on your machine, builds the server and registers it. It backs up each config file before touching it.
curl -fsSL https://raw.githubusercontent.com/aigamer-dev/linkedin-mcp/main/install.sh | bash./install.sh --list # see which agents were detected ./install.sh --agents claude,codex # choose specific agents ./install.sh --dry-run # preview changes ./install.sh --uninstall # remove from all detected agents
| Agent | How it's registered |
|---|---|
| Claude Code | claude mcp add --scope user |
| Codex CLI | codex mcp add |
| OpenClaw | openclaw mcp add --command node --arg … |
| Gemini CLI | gemini mcp add --scope user |
| OpenCode, Cursor, Windsurf, Claude Desktop, VS Code | Edits that app's MCP config file |
| Anything else that speaks MCP | Run node dist/index.js over stdio |
Connect your LinkedIn account (one time)
- Create an app. At linkedin.com/developers/apps, using a LinkedIn Page you administer. App names can't contain "LinkedIn".
- Add two products: Share on LinkedIn, and Sign In with LinkedIn using OpenID Connect.
- Add the redirect URL
http://localhost:3000/callbackon the Auth tab. - Add your keys to
.envin the install folder, then authorize once:npm run auth
- Restart your agent. Tokens last about 60 days; re-run
npm run authto refresh.
What it can't do
LinkedIn's official API for individual developers is narrow. Better to know up front.
| Capability | Status |
|---|---|
| Read your basic profile | Supported |
| Publish text posts to your feed | Supported |
| Edit headline, About, experience, skills | Not available in the official API |
| Post as a Company Page | Needs other permissions, not included |
| Messages, connections, search, analytics | Not available to individual developers |
| Scheduling | Not built in |
FAQ
Where do my credentials go?
Hosted: LinkedIn's app secret is a Cloudflare Worker secret, and your access token is stored encrypted and only released to the connection you approved. You never handle keys. Local: your client ID and secret live in a local .env file and the token is saved at ~/.config/linkedin-mcp/token.json with owner-only permissions. Nothing is sent anywhere except LinkedIn's own API.
Could an agent post something I didn't approve?
An agent with this server connected can call create_post. Posts go out as you, publicly by default. Use your agent's tool-approval setting so every post asks first.
Is it safe for my LinkedIn account?
It uses the official OAuth API and the documented posting endpoint. It does not scrape or automate the website, which is what usually gets accounts restricted. Posting volume and content are still your responsibility under LinkedIn's terms.
Do I need my own LinkedIn app?
Not with the hosted connector, which uses a shared app. Run the local version if you want your own app, so your credentials and rate limits are yours alone and no third party stores your token.
Does it work on Windows?
The installer script targets macOS and Linux. On Windows, build with npm and add node dist/index.js to your agent's MCP config by hand.