loading…
Search for a command to run...
loading…
Local LinkedIn MCP server for posting to LinkedIn from Claude. 9 tools — create/edit/delete posts (text, image, article), upload images, fetch profile, look up
Local LinkedIn MCP server for posting to LinkedIn from Claude. 9 tools — create/edit/delete posts (text, image, article), upload images, fetch profile, look up company pages, and check follower counts. Uses the official LinkedIn REST API with OAuth 2.0 (wmembersocial, OIDC).
Post to LinkedIn from Claude. A Model Context Protocol (MCP) server that lets Claude Desktop, Claude Code, and any MCP-compatible AI assistant publish posts, upload images, and manage company pages on LinkedIn — using natural language.
Glama License: MIT Node.js TypeScript MCP PRs Welcome
Imagine asking Claude "draft a LinkedIn post about my latest project and publish it" — and it just happens. That's what this MCP server enables.
| 📝 Create posts | Publish text, image, or article/link posts |
| 🖼️ Upload images | Attach images to posts in one workflow |
| ✏️ Edit & delete | Update post text/visibility or remove posts entirely |
| 👤 Profile | Fetch your name, email, photo, and LinkedIn URN |
| 🏢 Companies | Look up company pages by name or ID |
| 📊 Follower counts | Get follower stats for any company page |
| 🤖 Works with any MCP client | Claude Desktop, Claude Code, Cline, Continue, etc. |
| 🔐 OAuth 2.0 secured | Industry-standard auth, runs locally on your machine |
Once connected, just talk to Claude naturally:
You: Draft a LinkedIn post announcing my new open-source project and publish it.
Claude: Here's a draft:
🚀 Just open-sourced linkedin-mcp-server — an MCP server that lets
Claude post to LinkedIn directly. No more copy-pasting drafts.
Built with TypeScript and the LinkedIn REST API. Star on GitHub if
you find it useful!
Should I post this?
You: Yes, publish it.
Claude: ✅ Posted. URN: urn:li:share:7339284...
Other things you can ask:
You need three things installed on your computer:
Open your Terminal and run these commands one by one:
git clone https://github.com/abhineet34/linkedin-mcp-server.git
cd linkedin-mcp-server
npm install
npm run build
When it finishes, you'll have a dist/ folder. That's the built server.
Note down the full path to this folder — you'll need it in Step 3. To get it, run:
pwd
It will print something like /Users/yourname/linkedin-mcp-server. Remember this.
This is the trickiest part. LinkedIn's developer portal has some quirks — follow these steps in order and you'll be fine.
LinkedIn forces every developer app to be linked to a Company Page — a personal profile URL will not work, and the "Member Data Portability" default page blocks access to all useful products. So you must create a real Company Page first.
0–1 employeesSelf-employedThe page can stay empty — it just needs to exist.
This is the step most people miss. Adding scopes alone is not enough — you also have to add the Products that provide those scopes.
openid, profile, emailw_member_socialIf "Request access" is grayed out with a tooltip about Member Data Portability, you skipped Step 2a. Create a real Company Page, then create a new app linked to it (the old app cannot be fixed).
https://www.linkedin.com/developers/tools/oauth/redirect
This is LinkedIn's own redirect URL — required for the token generator to work.
openidprofileemailw_member_socialAQX... — copy it now (you only see it once)Your token expires after 60 days. When it stops working, come back to this step and generate a new one.
Open Claude Desktop
Go to Settings → Developer → Edit Config
This opens a file called claude_desktop_config.json. Add the following inside it (replace the placeholder values):
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/Users/yourname/linkedin-mcp-server/dist/index.js"],
"env": {
"LINKEDIN_ACCESS_TOKEN": "paste-your-token-here"
}
}
}
}
/Users/yourname/linkedin-mcp-server with the path you noted in Step 1paste-your-token-here with the token from Step 2In Claude Desktop, try:
"What's my LinkedIn profile?"
Claude should respond with your name, email, and a long ID starting with urn:li:person:.... If it does — you're all set!
💡 Save your URN. The response includes something like
urn:li:person:izbpuvq9Vz. This is your unique LinkedIn ID — Claude needs it as theauthor_urnwhen creating posts. You can just ask Claude "remember my LinkedIn URN" or copy it somewhere safe.
Once connected, just talk to Claude naturally:
LinkedIn rejects my personal profile URL when creating an app
/in/...)"Request access" buttons are grayed out on the Products tab
Token generator says "no scopes available"
"redirect_uri does not match" error in the token generator
https://www.linkedin.com/developers/tools/oauth/redirect as an authorized redirect URLClaude says it can't find the LinkedIn tool
dist/index.js and the file actually exists at that pathls <path> to confirm"Unauthorized" or 401 error
"Permission denied" or 403 error
Node.js not found
These tools work with the standard scopes anyone can grant themselves (openid, profile, email, w_member_social) and have been tested end-to-end:
| Tool | Description | Required scope |
|---|---|---|
linkedin_get_profile |
Get your LinkedIn profile (name, email, photo, URN) | openid profile email |
linkedin_create_post |
Create a post (text, image, or article/link) | w_member_social |
linkedin_update_post |
Edit a post's text or visibility | w_member_social |
linkedin_delete_post |
Delete a post | w_member_social |
linkedin_upload_image |
Upload an image to use in a post | w_member_social |
These tools require LinkedIn-approved scopes that are not available to all developers. They're included in the codebase for users who have partner-level access (e.g., approved Marketing Developer Platform, Community Management API, or Page Admin programs), but they have not been verified end-to-end with the standard self-serve flow described in this README.
| Tool | Description | Required scope | LinkedIn approval needed? |
|---|---|---|---|
linkedin_get_post |
Get a post by its URN | r_member_social or r_organization_social |
Yes |
linkedin_list_posts |
List posts by a member or company | r_member_social or r_organization_social |
Yes |
linkedin_get_organization |
Look up a company page | rw_organization_admin |
Yes (Page admin role) |
linkedin_get_org_follower_count |
Get a company page's follower count | rw_organization_admin |
Yes (Page admin role) |
If you have approved access to these scopes and successfully use any of these tools, please open an issue or PR — we'd love to confirm them as verified and document any quirks.
LINKEDIN_API_VERSION env var; v2 fallback used only for OIDC userinfo)The codebase is intentionally small and easy to extend — one file per tool domain (profile, posts, media, organizations).
Issues and PRs are welcome! If you have an idea, find a bug, or want to add a new LinkedIn API tool, open an issue first to discuss.
Ideas for contributions:
This is an unofficial integration. It is not affiliated with, endorsed by, or sponsored by LinkedIn Corporation. Use responsibly and within LinkedIn's API terms of service.
If this saved you time, star the repo — it helps other developers find it.
Run in your terminal:
claude mcp add abhineet34-linkedin-mcp-server -- npx pro tip
Just installed abhineet34/linkedin-mcp-server? Say to Claude: "remember why I installed abhineet34/linkedin-mcp-serverand what I want to try" — it'll save into your Vault.
how this works →Security
Low riskAutomated heuristic from public metadata — not a security guarantee.