LinkedIn Connector
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
LinkedIn Connector
A remote MCP server (Cloudflare Worker) that lets your assistants (Claude, ChatGPT and other MCP clients) post to your own LinkedIn account through LinkedIn's official API. Claude drafts, you approve the exact text, then it publishes. Each deployment is locked to one LinkedIn member and uses only LinkedIn's self-serve products: no scraping, no unofficial endpoints, no bot account.
Build your own
Every deployment is personal: you run your own Worker with your own LinkedIn app, so nobody else holds your LinkedIn token. The repo ships a Claude Code skill that walks Claude through the whole setup (Cloudflare, the LinkedIn developer app, secrets, deploy and connecting Claude), including the gotchas found along the way.
/plugin install linkedin-connector --marketplace Playwhiteshark/LinkedIn-ConnectorThen ask Claude: "Set up my own LinkedIn connector." You sign in to each service and type the secrets yourself; Claude runs the rest. Prefer to do it by hand? Follow Setup below, or read the skill as a checklist.
Related MCP server: linkedin-mcp-server
The author's deployment
For reference; your own values will differ (you must replace the KV id in wrangler.jsonc).
Item | Value |
Worker |
|
Secret names |
|
LinkedIn developer app | "Playwhiteshark Post Connector" (app id 266766209), products Share on LinkedIn + Sign In with LinkedIn using OpenID Connect |
LinkedIn Page (app publisher) | "Playwhiteshark Tools" ( |
What it can do
Tool | Effect |
| Show the connected member, scopes and when LinkedIn access expires |
| Publish a text post, optionally with one link card or one image (JPEG/PNG/GIF, ≤ 8 MB), |
| Delete one of the member's posts by URN. Requires |
#hashtags in post text become real hashtags; every other LinkedIn "Little Text" reserved character is escaped so the text posts exactly as written.
What LinkedIn does not allow (self-serve apps)
These are LinkedIn API constraints, not missing features:
Editing profile fields (headline, About, experience, skills, photo): no public write API. Profile editing APIs are restricted to approved partners. Do it at linkedin.com/in/me.
Reading the feed, your past posts, comments, reactions or analytics: needs
r_member_socialor Community Management API access, which LinkedIn grants only to approved partners.@mentions need the mentioned member's URN, which self-serve apps cannot look up, so they post as plain text.
Token refresh: self-serve member tokens last 60 days and cannot be refreshed. When they expire, tools say so. Disconnect and reconnect the connector to sign in again.
Architecture
MCP client ──OAuth 2.1 + PKCE──▶ Worker (workers-oauth-provider, grants in KV)
│ /authorize: consent page (bound to the browser by cookie)
│ └─▶ LinkedIn OAuth (openid profile email w_member_social)
│ /callback: exchange code, check member is the owner (see below)
▼
/mcp tools ──▶ api.linkedin.com (/v2/userinfo, /rest/posts, /rest/images)The LinkedIn access token is stored only inside the encrypted grant props of @cloudflare/workers-oauth-provider in KV OAUTH_KV.
Owner lock. Only one LinkedIn member can complete a grant:
If the
ALLOWED_LINKEDIN_SUBsecret is set, only that OpenIDsubis accepted.Otherwise, the first sign-in whose verified LinkedIn primary email equals the
ALLOWED_LINKEDIN_EMAILsecret is accepted, and itssubis pinned in KV (owner:sub). From then on, only that member is accepted, even if someone else later controls that email address.
Anyone else, including other LinkedIn users, is refused. To reset ownership, delete the owner:sub KV key.
Setup
1. LinkedIn developer app (owner, one-time)
https://www.linkedin.com/developers/apps/new. The app name may not contain "LinkedIn". LinkedIn requires the app to be associated with a LinkedIn Page. Any Page you admin works, and the app still posts as you.
Products tab: add Share on LinkedIn and Sign In with LinkedIn using OpenID Connect (both self-serve, approved instantly).
Auth tab: add the redirect URL
https://linkedin-connector.playwhiteshark.workers.dev/callback(andhttp://localhost:8787/callbackfor local dev).Keep the Client ID and Primary Client Secret for step 3. Never paste them into chat, Git or issues.
2. Cloudflare resources
npm install
npx wrangler login
npx wrangler kv namespace create OAUTH_KV # put the returned id into wrangler.jsoncReplace the URLs below (linkedin-connector.playwhiteshark.workers.dev) with your own Worker's hostname throughout.
3. Secrets and deploy
npx wrangler secret put LINKEDIN_CLIENT_ID
npx wrangler secret put LINKEDIN_CLIENT_SECRET
npx wrangler secret put ALLOWED_LINKEDIN_EMAIL # your LinkedIn primary email (must be verified on LinkedIn)
npm run deployOptionally set ALLOWED_LINKEDIN_SUB instead of the email lock. The refusal page shows your member id if neither is set.
4. Connect an assistant
Claude (claude.ai / desktop / mobile): Customize → Connectors → Add → Add custom connector → URL
https://linkedin-connector.playwhiteshark.workers.dev/mcp. Either OAuth client option works (Claude's published identity/CIMD, or automatic registration/DCR).ChatGPT: Settings → Apps & Connectors → developer mode → create connector with the same URL (OAuth).
Claude Code:
claude mcp add --transport http linkedin https://linkedin-connector.playwhiteshark.workers.dev/mcp
Sign in with LinkedIn when prompted, then ask the assistant to run linkedin_whoami.
Sign-in tip: LinkedIn's OAuth sign-in page may show only email and password, with no Sign in with Apple or Google button. If you normally use Apple, either start the connection from a device where LinkedIn's page offers Apple, or set a LinkedIn password once with "Forgot password?". Apple sign-in keeps working afterwards.
Development
copy .dev.vars.example .dev.vars # fill in values; never commit
npm run dev # http://localhost:8787
npm run typecheck
npm test
npm run build # bundle dry-runLINKEDIN_API_VERSION (wrangler.jsonc vars) is LinkedIn's YYYYMM REST version. LinkedIn supports each version for about a year. If posting starts failing with a version error, bump it and redeploy.
Deployment path
Manual npm run deploy. CI (GitHub Actions) runs audit, typecheck, tests and a bundle dry-run on every push; it never deploys.
Licence
MIT.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Save, illustrate, schedule, and publish LinkedIn posts from Claude, ChatGPT, or any MCP client.
Hosted MCP server for AI agents to post to LinkedIn profiles and X and upload to YouTube.
A hosted LinkedIn MCP server for your own account. Paste one address into Claude, ChatGPT, Cursor or n8n to read your inbox, send messages and invitations, and search people. Free to start. Not made by LinkedIn.
LinkedIn API as MCP tools to retrieve profile data and publish content. Powered by HAPI MCP.
Related MCP Servers
- AlicenseAqualityDmaintenancePost to LinkedIn from Claude — create posts, upload images, edit/delete posts, and manage company pages via natural language. Uses the official LinkedIn REST API with OAuth 2.0.9156 npm2MIT
- AlicenseAqualityDmaintenanceEnables posting content, sharing articles, and managing your LinkedIn profile through Claude using the official LinkedIn API with OAuth 2.0.69 npmMIT
- AlicenseBqualityDmaintenanceEnables drafting, formatting, analyzing, and publishing LinkedIn posts directly from MCP-compatible clients like Claude.5156 npmMIT
- AlicenseAqualityCmaintenanceEnables MCP-capable agents to read and update a LinkedIn profile, check and publish posts through the official LinkedIn API. Includes a built-in quality gate that blocks drafts reading as machine-generated before anything reaches the public feed.5MIT