linkedin-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@linkedin-mcp Draft a LinkedIn post announcing my new project and show me a preview."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
linkedin-mcp
An MCP server for your own LinkedIn account. Connect it to Claude (or any MCP client) to read your profile and publish text, link and image posts — using LinkedIn's official API.
Bring your own LinkedIn app. You create a free developer app; nobody else ever sees your credentials.
Your token stays on your machine in
~/.config/linkedin-mcp/token.json(permissions0600).Nothing is posted without you. Write tools are marked as such, so MCP clients ask before running them, and
preview_postshows the exact payload first.
Tools
Tool | What it does |
| Connected account, granted scopes, days until the token expires |
| Your id, name, photo, email and locale |
| Shows exactly what would be sent for a text, link or image post — publishes nothing |
| Publish a text post ( |
| Publish a post with a link card (title, description, optional thumbnail) |
| Upload a PNG/JPEG/GIF (local file or https URL) and publish it |
| Delete one of your posts by URN |
What it can't do: LinkedIn only lets approved partners edit profile sections (headline, About, experience, skills) or read your feed, messages and connections. This server sticks to what LinkedIn allows for self-serve apps, and does not scrape or automate the website.
Related MCP server: linkedin-mcp-server
Setup
1. Create a LinkedIn app (5 minutes, once)
Go to linkedin.com/developers/apps → Create app. LinkedIn requires a Company Page to attach the app to — any page you admin works (you can create one for yourself).
Products tab → add Sign In with LinkedIn using OpenID Connect and Share on LinkedIn.
Auth tab → under Authorized redirect URLs add:
http://127.0.0.1:8765/callbackCopy the Client ID and Primary Client Secret from the Auth tab.
2. Sign in
LINKEDIN_CLIENT_ID=your_id LINKEDIN_CLIENT_SECRET=your_secret npx -y github:amankumar-2001/linkedin-mcp authYour browser opens LinkedIn's consent page. After you approve, the token is saved locally. Check it any time:
npx -y github:amankumar-2001/linkedin-mcp statusLinkedIn tokens for self-serve apps last about 60 days and can't be refreshed automatically — run auth again when status says it has expired.
3. Add it to your MCP client
Claude Code
claude mcp add linkedin -- npx -y github:amankumar-2001/linkedin-mcpClaude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"linkedin": {
"command": "npx",
"args": ["-y", "github:amankumar-2001/linkedin-mcp"]
}
}
}Any other MCP client: run npx -y github:amankumar-2001/linkedin-mcp as a stdio server.
The server itself only needs the saved token; the client ID/secret are used only by auth.
Then try: "What's my LinkedIn auth status?" or "Draft a LinkedIn post announcing my new project and show me a preview."
Configuration
Variable | Default | Purpose |
| — | Your app's credentials (only for |
|
|
|
|
| Local callback port. Change the redirect URL on your app to match. |
|
| Where |
CLI: linkedin-mcp [serve|auth|status|logout|--help|--version].
Notes
Link posts: LinkedIn's API doesn't fetch page previews, so you supply the card
title(and optionallydescriptionand a thumbnail).Formatting: post text is escaped for LinkedIn's "little" text format, so characters like
(,[,@and*appear literally instead of truncating your post.#hashtagsstay clickable.Rate limits: LinkedIn applies daily per-member limits; a 429 error includes the retry delay when LinkedIn sends one.
Follow LinkedIn's API Terms of Use and Professional Community Policies — you're responsible for what you post.
Development
git clone https://github.com/amankumar-2001/linkedin-mcp && cd linkedin-mcp
npm install # also builds dist/
npm test # unit + MCP protocol tests, no network
npm run inspect # open the MCP Inspector against the local buildSee CONTRIBUTING.md. Security issues: SECURITY.md.
License
MIT © Aman Kumar
Available Tools
7 toolsauth_statusLinkedIn sign-in statusARead-only
Shows which LinkedIn account is connected, the granted scopes, and how many days until the token expires.
Inputs: no named parameters.
create_image_postPublish an image post on LinkedInA
Uploads one image (local file or https URL) and publishes it with the given text. Confirm the exact text and image with the user first.
Inputs: text (required), alt_text, image_url, image_path, +1 more.
create_link_postPublish a link post on LinkedInA
Publishes a post with a link card (title, optional description and thumbnail). Confirm the exact text with the user first.
Inputs: url (required), text (required), title (required), visibility, +2 more.
create_text_postPublish a text post on LinkedInA
Publishes a text-only post to the signed-in member's LinkedIn feed. Confirm the exact text with the user first.
Inputs: text (required), visibility.
delete_postDelete a LinkedIn postADestructiveIdempotent
Permanently deletes one of the signed-in member's posts by URN (urn:li:share:… or urn:li:ugcPost:…). This cannot be undone.
Inputs: post_urn (required).
get_my_profileGet my LinkedIn profileARead-only
Returns the signed-in member's basic profile from LinkedIn: id, name, profile picture, email and locale.
Inputs: no named parameters.
preview_postPreview a LinkedIn postARead-only
Shows exactly what would be sent to LinkedIn for a text, link or image post, without publishing anything or uploading images. Use this to show the user the post before creating it.
Inputs: text (required), url, kind, title, +6 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose: auth status, profile retrieval, three post-creation variants by content type, preview, and deletion. The create_text_post/create_link_post/create_image_post split is explicit, and preview_post is clearly differentiated as non-publishing.
Most tools follow a predictable snake_case verb_noun pattern: get_my_profile, create_text_post, create_link_post, create_image_post, preview_post, delete_post. auth_status is the main deviation, using a noun phrase rather than a verb-led action name.
Seven tools is well-scoped for a LinkedIn posting integration. The set avoids redundant tools while covering authentication, profile access, post preview, multiple post types, and deletion.
Core posting workflows are covered, including preview and delete, but there is no tool to list or retrieve existing posts, and no way to edit or update a post. These are notable gaps for a full LinkedIn post-management surface, though agents can still perform the primary create/delete lifecycle.
Maintenance
Related MCP Connectors
LinkedIn API as MCP tools to retrieve profile data and publish content. Powered by HAPI MCP.
PerfectPost is a LinkedIn content management platform. This MCP server gives AI assistants read and write access to a user's PerfectPost account: published posts with their engagement analytics, drafts lifecycle (create / edit / schedule), and LinkedIn profile data.
Search public LinkedIn posts by keyword, name or hashtag, with engagement, via a hosted MCP server.
Manage LinkedIn messages, connections, posts, and profile data through Linked API.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables LinkedIn API integration for managing profiles, posts, feed, connections, and sending messages through MCP-compatible clients.107 npmMIT
- AlicenseAqualityDmaintenanceLocal-first MCP server using LinkedIn's official OAuth and REST APIs to connect a member account, read profile, and publish text posts.471 npmMIT
- AlicenseAqualityDmaintenanceEnables LinkedIn profile reads and post operations through a local-first MCP server, with OAuth token management and approval-friendly tools for OpenWorker.88 npm1MIT
- AlicenseAqualityBmaintenanceEnables MCP-compatible clients to read LinkedIn profiles, companies, and jobs, and to send connection requests after explicit confirmation, using interactive browser-based authentication instead of stored credentials.8MIT