linkedin-mcp-server
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-server Publish a LinkedIn post announcing our summer sale"
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-server
A Model Context Protocol server for the LinkedIn API.
MIT licensed.
Install
npm install -g @nasdigitaluk/linkedin-mcpRelated MCP server: LinkedIn MCP Server
Configuration
{
"env": {
"LINKEDIN_ACCESS_TOKEN": "your-token",
"LINKEDIN_API_VERSION": "202606"
}
}LINKEDIN_API_VERSION is optional; it overrides the pinned default. Read on for why it exists.
A token can be obtained from LinkedIn's own OAuth Token Generator in the developer portal — no need to build a redirect flow for a single-account integration.
⚠️ Comments are unreachable, and no scope fixes it
Both directions of the comments API return 403 ACCESS_DENIED:
partnerApiSocialActions.CREATE.20260601
partnerApiSocialActions.GET_ALL.20260601That is the LinkedIn Partner Program gate, not a missing scope — it happens with w_member_social already granted, which LinkedIn's own documentation implies is sufficient. It is not, for a standard app.
This server therefore ships no comment tool. A tool that fails only after the post is already public is worse than not having one: the usual pattern for LinkedIn is to put the outbound link in the first comment, and discovering at that moment that you cannot is the worst possible time. Post the comment by hand.
It is written down here so nobody has to rediscover it against a live account.
⚠️ The version header is a time bomb, so it is configurable
Every /rest/* call needs a LinkedIn-Version: YYYYMM header, and LinkedIn retires versions after roughly a year. "Roughly" is doing real work in that sentence: 202512 was already retired while 202506 was still being sent.
When it goes stale, every /rest/* call returns 426 NONEXISTENT_VERSION — which means post creation is broken, not merely whatever call happened to surface it.
So:
the version is overridable with
LINKEDIN_API_VERSION, no release needed;a
426is turned into a message naming the cause and the fix, rather than a bare status.
⚠️ There is no draft state
LinkedIn's Posts API has no unpublished lifecycle. A successful create is immediately live. Any human approval step has to happen before linkedin_create_post is called — there is nothing to review afterwards except a post that is already out.
Images: three steps, in the right order
LinkedIn's Images API hands back a single-use uploadUrl and the URN the image will have before the bytes have been uploaded. Using that URN early attaches an image that is not there yet.
Here the sequence is: initialise, PUT the bytes, confirm, then create the post. An image LinkedIn rejects fails before anything is published, which matters because a LinkedIn post cannot be edited afterwards to add media.
The byte upload goes to a LinkedIn-supplied absolute URL outside the API host and sends raw bytes rather than JSON, so it is a direct fetch — with its own timeout, so it cannot hang the tool call.
The post URN comes back in a header
A successful create returns an empty body and puts the new post's URN in the x-restli-id response header. A client that only reads bodies cannot tell you what it just published, so this one reads the header and hands back the URN and a link.
Tools
Tool | |
| The authenticated member. |
| Publish. Immediately live, no draft. |
| Delete your own post. Irreversible. |
| Anything else on the API. |
What is NOT covered
LinkedIn publishes no machine-readable spec, and much of its API is gated behind partner programmes that no amount of scope-granting opens. So this server does not claim complete coverage — it wraps what a standard developer app can verifiably do, and offers linkedin_call as a documented passthrough for the rest.
Claiming a complete catalogue here would be a claim that cannot be checked and would quietly stop being true.
Read-only and no-destructive modes
MCP_READ_ONLY=1 refuse anything that changes state
MCP_NO_DESTRUCTIVE=1 allow posting, refuse deletesTesting
npm test # 10 tests
SMOKE_ENV='{"LINKEDIN_ACCESS_TOKEN":"x"}' npm run smoke # real MCP over stdioBuilt on
@nasdigitaluk/mcp-server-core.
Licence
MIT.
Available Tools
4 toolslinkedin_callA
Call any LinkedIn endpoint directly. LinkedIn publishes no machine-readable spec, so this server does not claim a complete catalogue — this is how you reach the rest of the API. Paths are relative to https://api.linkedin.com. A /rest/ path automatically gets the version and protocol headers.
⚠️ Comments are NOT reachable, whatever scopes you hold. See the README.
Inputs: path (required), body, query, method.
linkedin_create_postA
Publish to LinkedIn. ⚠️ There is NO draft state — LinkedIn's Posts API has no unpublished lifecycle to fall back on, so this goes live the moment it succeeds. Any human approval has to happen BEFORE this is called, never after.
An image is uploaded and confirmed first, so a picture LinkedIn rejects fails before anything is published — a LinkedIn post cannot be edited afterwards to add media.
Inputs: text (required), image_path, visibility, image_alt_text.
linkedin_delete_postA
Delete one of your own posts by URN. Irreversible.
Inputs: post_urn (required).
linkedin_get_meB
The authenticated member — id, name and email if the token carries the scope.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct operation: profile retrieval, post creation, post deletion, and raw API access. The generic linkedin_call is clearly a fallback for reaching untapped endpoints, so there is no meaningful overlap with the specialized tools.
All tools share the linkedin_ prefix and follow a consistent verb-based pattern: get_me, create_post, delete_post, call. The generic call still fits the verb scheme, so there is no naming convention mixing.
Four tools is well-scoped for a server that covers profile lookup and post creation/deletion, backed by a raw API fallback. This is within the ideal range and each tool earns its place.
The server covers basic profile access and post create/delete, but lacks convenient read operations like get_post or list_posts. The raw linkedin_call can fill the gap, but agents are forced to use it for standard tasks, and comments are explicitly unsupported.
Maintenance
Related MCP Connectors
Publish and schedule LinkedIn posts from your AI assistant.
Schedule and publish LinkedIn posts to profiles and company pages from AI agents.
Draft LinkedIn posts in your voice, then schedule or publish them through LinkedIn's official API.
Manage LinkedIn messages, connections, posts, and profile data through Linked API.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables LLMs and agents to interact with LinkedIn's REST API for managing profiles, creating posts, viewing connections, and overseeing organizations.52-
- FlicenseNot gradedqualityDmaintenanceEnables interaction with LinkedIn's Community Management API, allowing users to retrieve profile information and create posts via natural language.41-
- AlicenseAqualityDmaintenanceEnables posting content, sharing articles, and managing LinkedIn profile through natural language using the official LinkedIn REST API with OAuth 2.0.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables natural language interaction with LinkedIn, including profile retrieval, job searching, messaging, and post engagement.3Apache 2.0