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.

get_profile

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.

create_post

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.

Your machine AI agent Claude Code, Codex, Cursor… linkedin-mcp token + keys stay here LinkedIn API official, OAuth 2.0 tool call stdio HTTPS

What a session looks like

Draft a post about this week's release from the changelog, then publish it to my connections only.
Here's the draft: "We shipped v0.4: faster sync and a fix for…". Publish it as written?
Yes, post it.
Posted to your connections.create_post → visibility: CONNECTIONS

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
  1. 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.
  2. Choose what to allow. A consent page shows which app is asking. You decide whether posting is allowed at all.
  3. Sign in on LinkedIn. You approve on LinkedIn's own screen. We never see your password.
  4. Use it. Ask your assistant to show your profile or draft and publish a post. LinkedIn access lasts about 60 days, then you reconnect.
ClientHow
Claude Codeclaude mcp add --transport http --scope user linkedin https://linkedin-mcp.hariharankvasn.workers.dev/mcp
OpenClawopenclaw mcp add linkedin --url https://linkedin-mcp.hariharankvasn.workers.dev/mcp --transport streamable-http --auth oauth
Cursor / VS CodeAdd the URL to mcp.json (see the README)
Any MCP clientRemote 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
AgentHow it's registered
Claude Codeclaude mcp add --scope user
Codex CLIcodex mcp add
OpenClawopenclaw mcp add --command node --arg …
Gemini CLIgemini mcp add --scope user
OpenCode, Cursor, Windsurf, Claude Desktop, VS CodeEdits that app's MCP config file
Anything else that speaks MCPRun node dist/index.js over stdio

Connect your LinkedIn account (one time)

  1. Create an app. At linkedin.com/developers/apps, using a LinkedIn Page you administer. App names can't contain "LinkedIn".
  2. Add two products: Share on LinkedIn, and Sign In with LinkedIn using OpenID Connect.
  3. Add the redirect URL http://localhost:3000/callback on the Auth tab.
  4. Add your keys to .env in the install folder, then authorize once:
    npm run auth
  5. Restart your agent. Tokens last about 60 days; re-run npm run auth to refresh.

What it can't do

LinkedIn's official API for individual developers is narrow. Better to know up front.

CapabilityStatus
Read your basic profileSupported
Publish text posts to your feedSupported
Edit headline, About, experience, skillsNot available in the official API
Post as a Company PageNeeds other permissions, not included
Messages, connections, search, analyticsNot available to individual developers
SchedulingNot 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.