Skip to main content
Glama
condr-at

linkedin-local-mcp

by condr-at

linkedin-local-mcp

A deliberately small, local-only MCP server for LinkedIn's official API. It does not scrape LinkedIn, use Voyager endpoints, automate a browser, send telemetry, or expose access tokens as MCP tool arguments.

Features

  • OAuth 2.0 authorization with CSRF state validation

  • access token stored in the operating-system keychain

  • identify the authenticated member

  • publish text posts with explicit confirmation

  • read comments when the LinkedIn app has the required read permission

  • reply to a specific comment with explicit confirmation

  • conservative API surface: no raw-request passthrough

Related MCP server: LinkedIn MCP Server

Important LinkedIn permission limits

Ordinary self-service apps can request OpenID Connect and posting permissions. Reading member social content may require a restricted LinkedIn permission granted only to selected developers. The MCP tool can read comments only when LinkedIn has granted the corresponding permission to your app; otherwise the official API returns 403.

This project intentionally does not work around that restriction with scraping or browser automation.

Requirements

Add this exact redirect URL to the app's authorized redirect URLs:

http://127.0.0.1:8765/callback

Install and authenticate

git clone https://github.com/condr-at/linkedin-local-mcp.git
cd linkedin-local-mcp
uv sync --no-editable

uv run linkedin-local-mcp-auth

The command prompts for the Client ID and then requests the Client Secret using hidden terminal input, so neither value is stored in shell history. The secret is needed only during authorization. The resulting access token is stored in the OS keychain under linkedin-local-mcp/default and is never written to the repository or MCP configuration.

LinkedIn access tokens normally expire after roughly 60 days. Run the auth command again when needed.

Hermes Agent configuration

Use Hermes' native local stdio MCP support. Add the server through Hermes configuration mechanisms with the equivalent of:

mcp_servers:
  linkedin_local:
    command: uvx
    args:
      - --from
      - /absolute/path/to/linkedin-local-mcp
      - linkedin-local-mcp
    sampling:
      enabled: false

Restart Hermes after adding the server. Tools appear with the mcp_linkedin_local_ prefix.

Do not add LinkedIn tokens or client secrets to this configuration.

Tools

Tool

Behavior

linkedin_auth_status

Validate the token and identify its member

linkedin_publish_post

Publish a text post; requires confirmed=true

linkedin_list_comments

Read comments, subject to LinkedIn permissions

linkedin_reply_to_comment

Reply to a specific comment; requires confirmed=true

The narrow tool set is intentional. Drafting and scheduling belong in the agent; this server only performs official LinkedIn API operations.

Development

uv sync --extra dev
uv run python -m pytest
uv run ruff check .

Security

  • Review every requested LinkedIn product and permission.

  • Never paste access tokens into chat or pass them as tool arguments.

  • Keep human confirmation enabled for all writes.

  • Never use this project for scraping, bulk outreach, invitations, or automated job applications.

  • Report vulnerabilities through GitHub private vulnerability reporting.

License

MIT

Available Tools

4 tools
linkedin_auth_statusB

Check the local token and identify the authenticated LinkedIn member.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It says it checks the local token, but it does not disclose what happens when the token is missing, expired, or invalid; whether it makes a network call; what the return value looks like; or whether any side effects occur. This is thin for an auth-status tool that an agent needs to interpret safely.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short sentence that front-loads the core action ('Check the local token') and then gives the purpose. It is concise and free of filler; a slight expansion on the meaning of 'local token' would make it more useful, but as written it is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter status-check tool, the description is minimal but not entirely inadequate. However, without an output schema or annotations, the agent has no information about the shape of the auth status result, possible states, or failures. Given the existence of sibling tools that require authentication, knowing how to interpret this result is important, and this description leaves that unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the schema provides no parameter semantics to interpret. The description correctly indicates the operation is self-contained and requires no input, which is the only parameter-related information that matters here. Baseline 4 for no-parameter tools is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Check') and a specific resource ('local token') plus the outcome ('identify the authenticated LinkedIn member'). It clearly states what the tool does, though it does not explicitly contrast itself with sibling tools, which are all action-oriented (publish, comment).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for verifying authentication status before performing LinkedIn actions, but it does not explicitly state when to use it versus alternatives. The sibling tools are clearly different in function, so the intended context is somewhat inferable, but no explicit usage guidance or exclusions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

linkedin_list_commentsB

Read comment threads for a LinkedIn post, subject to granted read permissions.

ParametersJSON Schema
NameRequiredDescriptionDefault
countNo
post_urnYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description carries the behavioral burden. 'Read' conveys a non-mutating operation, and 'subject to granted read permissions' adds permission context. Yet it omits pagination behavior, error cases, or what happens when permissions are insufficient, leaving meaningful gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one focused sentence with no filler. The verb and resource are front-loaded, and the permission caveat is appended without bloating the text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple and has an output schema, but with no annotations and 0% parameter coverage, the description leaves the agent to infer count semantics and when to choose this over reply or publish. It is minimally viable but not thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description adds no explanation for post_urn or count. The schema titles are somewhat self-explanatory, but the description fails to compensate for the missing parameter documentation, so it stays below the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Read') and resource ('comment threads for a LinkedIn post'), and the read-only nature distinguishes it from siblings like linkedin_publish_post and linkedin_reply_to_comment. It doesn't explicitly name any sibling, so it misses the full differentiation of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied: an agent would use this when it wants to read comments on a post. However, the description gives no explicit when-to-use or when-not-to-use guidance, and it does not mention the alternative siblings that perform related actions like publishing or replying.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

linkedin_publish_postA

Publish a text post. Set confirmed=true only after explicit user approval.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes
confirmedNo

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does reveal the important confirmation guardrail, but it does not mention authentication requirements, public visibility, irreversibility, or potential side effects of publishing a post to LinkedIn.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single efficient sentence that front-loads the action and then adds the critical guardrail. No filler or redundant information is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter publishing tool, the description covers the core action and the key safety requirement. It omits details like authentication or return behavior, but those are less critical given the simplicity of the operation and the clear sibling separation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must add meaning to the parameters. It effectively does: 'text post' implies the text parameter's purpose, and the confirmation rule explains the confirmed parameter's role as an explicit user-approval gate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description starts with the specific verb 'Publish' and the object 'a text post', making the tool's function immediately clear. It is naturally distinguishable from the sibling tools, which handle authentication status, comment listing, and comment replies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear usage condition: set confirmed=true only after explicit user approval. While it does not explicitly discuss when to choose this tool over siblings, the sibling operations are so different in purpose that the intended use is evident.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

linkedin_reply_to_commentA

Reply to a specific comment. Requires explicit user approval.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes
post_urnYes
confirmedNo
comment_urnYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does disclose a key safety behavior: explicit user approval is required before replying. However, it does not disclose that the reply will be publicly posted, whether the action can be undone, or what happens when the confirmed flag is left false. The approval statement adds value but leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with no wasted words. The primary action is front-loaded in the first sentence, and the critical approval requirement is immediately stated in the second sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutating action with no annotations, no output schema, and 0% schema description coverage, this description is incomplete. It does not explain how the confirmed parameter gates the action, what URNs are expected, or how this tool relates to linkedin_list_comments in a typical workflow. An agent would likely need to infer too much to invoke it correctly and safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description should compensate by explaining parameters, but it does not. The parameter names are partially self-explanatory (post_urn, comment_urn, text), but the meaning and necessity of the confirmed field are unclear, especially since the description says 'requires explicit user approval' without connecting that to the confirmed boolean.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: 'Reply to a specific comment.' This clearly distinguishes the tool from its siblings: it is not for checking auth status, publishing a new post, or listing comments. The word 'specific' also signals that a target comment URN is required.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is used when the agent needs to post a reply to an existing comment, but it does not explicitly mention alternatives or when not to use it. 'Requires explicit user approval' gives a procedural constraint, but there is no guidance such as 'use linkedin_list_comments first to obtain the comment_urn.'

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. Dates show when Glama detected each change.

  1. 4 tool updatesv0.1.0
    • First observedlinkedin_auth_status
    • First observedlinkedin_list_comments
    • First observedlinkedin_publish_post
    • First observedlinkedin_reply_to_comment

TDQS

A3.7/5.0
Disambiguation5/5

Each tool targets a clearly distinct concern: authentication, publishing, reading comments, and replying to comments. There is no meaningful overlap between read and write operations or between posts and comments.

Naming Consistency4/5

Most tools follow a consistent linkedin_verb_noun pattern (publish_post, list_comments, reply_to_comment). linkedin_auth_status is a slight deviation because it uses a noun phrase rather than an explicit verb like get or check.

Tool Count4/5

Four tools is a compact but reasonable set for a focused LinkedIn posting and comment engagement workflow. It is not overly thin given the apparent scope, though it stays at the smaller end of the typical range.

Completeness4/5

The core workflow of checking auth, publishing a post, viewing comments, and replying is covered without obvious dead ends. However, there is no way to fetch a user's own posts, update/delete a post, or delete a comment, which are minor gaps for a fuller LinkedIn integration.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/condr-at/linkedin-local-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server