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-mcpsign me in to LinkedIn and show my profile"
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.
@echohello/linkedin-mcp
LinkedIn MCP server for Claude, Codex, OpenCode and other MCP clients. TypeScript, stdio transport, member OAuth, and a small tool surface for the signed-in member's profile and text posts.
npm install
npm run build
LINKEDIN_CLIENT_ID=... LINKEDIN_CLIENT_SECRET=... node dist/index.jsWhy
LinkedIn does not ship an MCP server. This one speaks the public member APIs only: three-legged OAuth, OpenID userinfo, and a text post on behalf of the signed-in member. It does not take a browser session cookie, and it does not read other people's data, send messages, or send connection requests.
Related MCP server: linkedin-mcp-server
What you need
Create an app in the LinkedIn developer portal and add:
Sign In with LinkedIn using OpenID Connect (
openid,profile,email)Share on LinkedIn (
w_member_social)
Register this redirect URL exactly:
http://127.0.0.1:53682/callback
Tools
Tool | Purpose |
| Start member sign-in and return the approval URL |
| Wait for the loopback callback, or exchange a pasted redirect URL |
| Show whether a session is stored, without returning tokens |
| Read the signed-in member's OpenID profile |
| Publish a text post as that member |
| Delete the stored session |
Configure
Variable | Required | Purpose |
| yes | App client id |
| yes | App client secret |
| no | Defaults to |
| no | Space-separated override of the default member scopes |
| no | Posts API version header, |
| no | Session file. Defaults to |
The session file is mode 0600. Tool results never include the access token.
Sign in from a terminal before starting the server, or let the agent call the login tools:
LINKEDIN_CLIENT_ID=... LINKEDIN_CLIENT_SECRET=... node dist/index.js loginMCP client config:
{
"mcpServers": {
"linkedin": {
"command": "node",
"args": ["/absolute/path/to/linkedin-mcp/dist/index.js"],
"env": {
"LINKEDIN_CLIENT_ID": "your-client-id",
"LINKEDIN_CLIENT_SECRET": "your-client-secret"
}
}
}
}Out of scope
Messaging, invitations, company-page posting, image and video uploads, and reading the member's feed all need products this server does not request. r_member_social is a restricted permission and is not part of the default scope set.
Develop
npm test
npm run typecheckAvailable Tools
6 toolslinkedin_create_postA
Publish a text post as the signed-in member. Requires the Share on LinkedIn product (w_member_social).
| Name | Required | Description | Default |
|---|---|---|---|
| commentary | Yes | Post text, up to 3000 characters. | |
| visibility | No | Who can see the post. Defaults to PUBLIC. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden, and it does disclose the OAuth scope requirement (w_member_social) and the required signed-in state, which is genuinely useful. However, it says nothing about irreversibility of the write, whether the post can be edited/deleted afterward, rate limits, or what a successful call yields (no output schema exists to cover this).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, the action front-loaded and the prerequisite second. No redundant restatement of the tool name or schema constraints.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple 2-parameter publish tool this covers the essentials: what it does and what authorization it needs. It is incomplete for a mutation with no annotations and no output schema, since it never clarifies the write's reversibility or the result of a successful call.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%: both 'commentary' (3000 char limit) and 'visibility' (enum with default PUBLIC) are fully documented in the schema. The description adds no parameter-level detail, so the baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Publish a text post') plus the acting identity ('as the signed-in member'). This cleanly separates it from the auth-lifecycle siblings (login, status, logout, profile), none of which publish content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides the operative prerequisite: the account must be signed in and must have the Share on LinkedIn product (w_member_social). That implicitly routes an unauthenticated agent to linkedin_login, but no exclusion or alternative is stated explicitly, which is the only gap for a tool with no true sibling alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
linkedin_finish_loginA
Finish member sign-in. Waits for the loopback callback, or exchanges a pasted redirect URL. Saves the session locally.
| Name | Required | Description | Default |
|---|---|---|---|
| redirectUrl | No | Full redirect URL if the callback was not received on loopback. | |
| timeoutSeconds | No | How long to wait for the callback. Defaults to 120. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does disclose meaningful behavior: it completes an auth handshake and persists a session locally, a real side effect an agent should know about. It stops short of describing failure/timeout outcomes or what the saved session grants, leaving some gaps for a mutation-bearing auth tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, front-loaded with the core action, then the two operating modes, then the side effect. No filler; every clause contributes.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an auth-completion tool with no output schema and no annotations, the description covers the essential flow and side effect. It could be more complete by stating ordering relative to linkedin_login or what happens when the callback is never received (beyond the timeout default living in the schema), but nothing critical is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both parameters (redirectUrl, timeoutSeconds) are already documented with ranges and defaults. The description references 'pasted redirect URL' and the wait behavior but adds no syntax or format detail beyond the schema, so baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Finish member sign-in') and clarifies the mechanism, making it distinguishable from the sibling linkedin_login that presumably starts the flow. The word 'Finish' implies it is the continuation step, but the description never explicitly names linkedin_login, so the sibling relationship is only inferred.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The two modes ('waits for the loopback callback, or exchanges a pasted redirect URL') implicitly tell the agent which input path to take, but there is no explicit 'use after linkedin_login' or when-not guidance and no mention of alternatives like linkedin_status for checking auth state.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
linkedin_loginA
Start LinkedIn member sign-in. Returns a URL the member must open and approve. When the redirect URI is loopback, a local listener waits for the callback. Tokens are never returned.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses that a URL is returned, that the member must approve it, that a loopback redirect spins up a local listener awaiting the callback, and that tokens are never returned. Remaining gaps (session persistence, error/timeout behavior) are minor.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, purpose front-loaded, each sentence adding distinct information (action, return value, loopback behavior, token-handling guarantee). No filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, but the description covers the return value (a URL), the interactive step required, and the credential-handling guarantee, which is what an agent needs to invoke this correctly. Only the sequencing with linkedin_finish_login is left implicit.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4; there is nothing parameter-related that the description needs to compensate for.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Start LinkedIn member sign-in') and clearly frames the tool as the beginning of an auth flow. It does not name the sibling it pairs with (linkedin_finish_login) or contrast itself with linkedin_status/linkedin_logout, so it falls short of full sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The flow is implied: the member must open the returned URL and approve, which suggests a follow-up step exists, but no sibling is named and there is no explicit when-to-use / when-not-to-use guidance relative to linkedin_finish_login or linkedin_status.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
linkedin_logoutA
Delete the stored member session.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations at all, the description carries the full behavioral burden, and it does disclose the one crucial fact — that it deletes the stored session credential, i.e. a destructive teardown. It says nothing about idempotency, whether it also invalidates server-side tokens, or what happens if no session exists.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler — the destructive action is stated first and nothing is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an extremely simple zero-parameter, no-output tool, one sentence covers the essentials, but with no annotations the description could reasonably have noted that the call is destructive and irreversible. It is adequate rather than complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is no parameter semantics to describe; baseline 4 applies. Nothing in the description is needed to explain inputs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Delete') and resource ('the stored member session'), which maps unambiguously to a logout operation. However, it does no explicit sibling differentiation — nothing distinguishes it in text from linkedin_login/linkedin_finish_login beyond the obvious name contrast.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: the name and description make it obvious this is the teardown counterpart to linkedin_login. There is no statement of when to call it (after finishing work, before switching accounts) or any excluded scenario, and no alternative tool is named.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
linkedin_profileA
Read the signed-in member's OpenID profile (name, email, picture, member id).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the full behavioral burden; it does convey that this is a read operation scoped to the current session ('signed-in member'), implying auth dependency. However, it says nothing about behavior when no member is signed in, whether the call has side effects, or any rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler; the verb, scope, and returned fields are all present in one pass.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter, read-only tool with no output schema, the description is nearly sufficient because it enumerates the returned fields (name, email, picture, member id) and names the auth scope. The only gap is not describing failure behavior when unauthenticated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4. The description usefully identifies the data source (the signed-in member's OpenID profile) rather than accepting an arbitrary member id.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (Read) and resource (the signed-in member's OpenID profile) and enumerates the returned fields, so the agent knows exactly what it produces. It does not explicitly differentiate itself from siblings like linkedin_status, but the read-only profile scope is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'signed-in member' implies the prerequisite that a login must already be established, which is useful context, but it never states when to call this versus linkedin_status or linkedin_login. Usage is implied rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
linkedin_statusB
Show whether a member session is stored. Does not return tokens.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose one useful behavioral detail: "Does not return tokens." However, it omits other traits an agent would want, such as whether the check is a local lookup or a server-side session validation, and whether calling it has any side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with no filler, and the core purpose is front-loaded ahead of the output constraint. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description implies a boolean session-stored answer and rules out token exposure, but never states what the response actually contains (e.g., a boolean, member identifier, or expiry info). With no output schema and no annotations, that gap is worth noting even for a zero-parameter tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so per the baseline a 4 is appropriate. There is nothing for the description to disambiguate beyond confirming that no inputs are needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ("Show") and resource ("whether a member session is stored"), so the agent knows exactly what is being queried. It does not explicitly distinguish itself from siblings like linkedin_login or linkedin_logout, though the session-state framing makes the distinction inferable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use or when-not-to-use guidance, and no alternative tool is named. The agent must infer that this is a session pre-check before calling linkedin_profile or linkedin_create_post, which is reasonable but left unstated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.1.0- First observed
linkedin_create_post - First observed
linkedin_finish_login - First observed
linkedin_login - First observed
linkedin_logout - First observed
linkedin_profile - First observed
linkedin_status
TDQS
Scored across 6 tools
Each tool has a distinct function: the login/finish_login pair forms a clear two-step flow, and status, logout, profile, and create_post are all sharply separated. The only mild risk is confusion between linkedin_login and linkedin_finish_login, but descriptions disambiguate the sequence.
All six tools use a consistent linkedin_ prefix with snake_case verb/noun naming (linkedin_login, linkedin_finish_login, linkedin_status, etc.). The convention is predictable throughout.
Six tools is well-scoped for an auth-plus-basic-actions server, with each tool earning its place across the session lifecycle and core member operations.
The auth lifecycle (login, finish, status, logout) plus profile read and post creation covers the core member flow. Minor gaps exist—no post delete/list, no profile update—but the surface is coherent for its apparent scope.
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.
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
Private journal MCP server to search, analyze, and create Dabble Me entries securely via OAuth.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for LinkedIn, enabling posting, liking, commenting, and profile retrieval via official OAuth 2.0. Features CLI, HTTP admin, and optional Telegram bot.14 npmMIT
- FlicenseNot gradedqualityCmaintenanceMCP server for LinkedIn API integration. Enables authentication, profile access, connections, search, messaging, and feed management via OAuth2.-
- AlicenseNot gradedqualityBmaintenanceMCP server that lets you publish text and image posts to LinkedIn, fetch your profile, and check auth status using natural language.MIT
- AlicenseAqualityBmaintenanceLocal-first MCP server using LinkedIn's official OAuth and REST APIs to connect a member account, read profile, and publish text posts.4105 npmMIT