Skip to main content
Glama
linkedin-mcp

linkedin-mcp


What it does

Point any MCP-capable agent at it and it can read a LinkedIn profile, check a draft post and publish it, through the official LinkedIn API.

{
  "mcpServers": {
    "linkedin": {
      "command": "linkedin-mcp",
      "env": {
        "LINKEDIN_ENGINE_HOME": "/home/you/.config/linkedin-engine"
      }
    }
  }
}

Related MCP server: LinkedIn MCP Server

The part that makes it different

A server that any agent can connect to, that publishes to a public feed on request, is a footgun. Every automated posting tool has the same failure mode: it produces something that technically publishes and reads as though nobody wrote it.

So the quality gate lives inside the server. An agent cannot publish a post that reads like a generated one, because the gate runs on the way out and refuses it. The agent gets told what is wrong and fixes it.

Rule

What it catches

banned-phrase

"thrilled to announce", "game-changer", "in today's fast-paced world", and thirty more

weak-opening

A first line that is a greeting rather than a claim

emoji-run

🚀🚀🚀 — emoji used as punctuation

emoji-count

More than three emoji in a post

exclamations

Emphasis in punctuation

no-link

A post about something you built that does not let anyone reach it

too-short

Under 200 characters, which says nothing

truncated

Past the point where LinkedIn cuts it off mid-sentence

filler

"it's worth noting", "at the end of the day"

Errors block the post. Warnings do not, but they are reported.

The tools

Tool

What it does

linkedin_get_profile

Reads the live profile: name, headline, about, location

linkedin_update_profile

Updates the headline, about or location, and diffs against the live one

linkedin_check_post

Runs the quality gate over a draft and returns what is wrong with it

linkedin_publish_post

Publishes — after the gate has passed

linkedin_token_status

Reports what the stored token is allowed to do

Two resources, linkedin://profile and linkedin://profile/written, and a prompt, linkedin_draft_post, that walks an agent through drafting a post about a real artefact and checking it.

Safety

Three rules, and they are not optional:

The token is never a tool argument. It is read from the credential store that linkedin-engine uses, and it never appears in a tool result, a log line or an error message. An agent cannot ask this server for it — which means a prompt injection in a web page cannot ask it for it either.

Publishing is off by default. Reads always work. Writes need LINKEDIN_ENGINE_ALLOW_PUBLISH=1 in the server's environment. A server that publishes on request from any agent that connects to it is a bad idea at best.

A dry run needs no token. linkedin_publish_post answers the only question that matters — would this post go out — without needing the application to be authorised first, so you can test the gate before the LinkedIn app is even created.

Setup

You need a LinkedIn application with the Sign In With LinkedIn product (self-serve) and the Share on LinkedIn product (review, and the one that grants w_member_social, without which you can read but not publish).

The setup, including the Company Page step that stops most people, is documented in linkedin-engine/docs/SETUP.md.

Authorise it once:

pip install linkedin-engine
linkedin-engine auth setup --client-id ... --client-secret ... --redirect-uri ...
linkedin-engine auth login

Then start the server:

linkedin-mcp            # stdio, for a local agent
linkedin-mcp --http     # streamable HTTP, for a shared server

Configuration

Variable

Default

What it does

LINKEDIN_ENGINE_ALLOW_PUBLISH

off

Set to 1 to let the server write to LinkedIn

LINKEDIN_ENGINE_HOME

~/.config/linkedin-engine

Where the credentials live

LINKEDIN_ENGINE_PROFILE

content/profile.json

The written profile to diff against

LINKEDIN_ENGINE_VISIBILITY

PUBLIC

The default visibility for a post

See also

  • linkedin-engine — the command line tool this server is built on. Same credential store, same quality gate, plus draft generation from your GitHub activity.

  • shipfree — the Agent Skill for deploying AI services on free tiers.

Development

pip install -e ".[dev]"
pytest
ruff check . && ruff format --check .
mypy

License

MIT — see LICENSE.

Built by Aryan Raj Maurya.

Available Tools

5 tools
linkedin_check_postCheck a post before publishing itA

Run the quality gate over a draft post and return what is wrong with it. Errors block publishing: the announcement formulas, emoji used as punctuation, a first line that is a greeting rather than a claim, a post with no link in it, and a length that says nothing. Warnings do not block. Use this before every post.

Inputs: text (required). Returns: object

linkedin_get_profileRead the LinkedIn profileA

Read the authenticated member's LinkedIn profile: name, headline, about and location. Use this before editing the profile, so you know what is live rather than guessing.

Inputs: no named parameters. Returns: object

linkedin_publish_postPublish a postA

Publish a text post to the member's feed. The quality gate runs first and refuses to publish a draft that fails it. This is a dry run unless publishing has been enabled on the server. Prefer linkedin_check_post first, so you can fix the problems it finds.

Inputs: text (required), dry_run, visibility. Returns: object

linkedin_token_statusCheck what the LinkedIn token can doA

Report what the stored LinkedIn token is allowed to do: whether it has expired, whether it can be refreshed, and which scopes were granted. Use this when publishing fails, to find out whether the application is missing the Share on LinkedIn product.

Inputs: no named parameters. Returns: object

linkedin_update_profileUpdate the LinkedIn profileA

Update the headline, the about section or the location on the profile. This is a dry run unless publishing has been enabled on the server, so it reports what would change before it changes anything. Returns the diff against the live profile.

Inputs: about, headline, location. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: reading the profile, updating it, checking a draft post, publishing a post, and inspecting token status. The get/update and check/publish pairs are naturally separated by read-vs-write and validate-vs-execute semantics. There is no meaningful overlap that would cause misselection.

    Naming Consistency4/5

    All tools use the linkedin_ prefix and mostly follow a verb_noun pattern: update_profile, check_post, publish_post, get_profile. linkedin_token_status is a noun-style status tool rather than a verb-led action, which is a minor but sensible deviation.

    Tool Count5/5

    Five tools is well-scoped for a LinkedIn profile-and-posting server. Each tool earns its place across the read, validate, publish, update, and auth-diagnostic workflow.

    Completeness4/5

    The surface covers the core lifecycle: read profile, update profile, validate a draft, publish it, and diagnose token scopes. Minor gaps remain around managing already-published posts, such as listing, editing, or deleting them, but the main workflows are covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Enables AI agents with read/write access to LinkedIn API, including profile, posts, media, organizations, comments, reactions, and analytics.
      20
      7 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables LinkedIn API integration for managing profiles, posts, feed, connections, and sending messages through MCP-compatible clients.
      10
      7 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to audit professional profiles, check policy compliance, preview posts, and publish explicitly confirmed text posts through LinkedIn's official API.
      MIT