Skip to main content
Glama
nadirzhon

linkedin-mcp

by nadirzhon

linkedin-mcp

Publish and schedule posts on your own LinkedIn — from an AI assistant, via the official API.

MCP Python Official API

An MCP server that lets Claude (or any MCP client) write a post and publish or schedule it on your LinkedIn profile through LinkedIn's official Posts API. Plus a content-calendar helper so you grow the profile the sustainable way.


✅ What it does — and what it deliberately doesn't

Does: posts as you (immediately or scheduled), lists your queue and history, and gives you proven post structures + a weekly cadence.

Does NOT: auto-connect, auto-like, auto-comment, mass-message, scrape, or run engagement bots. Those violate LinkedIn's User Agreement and get accounts permanently banned. There is no official API for them — only grey scraping — and it's not worth risking your account. Profiles grow from consistent, valuable content, not automation. That's what this tool supports.

Related MCP server: LinkedIn - Full Tools MCP (via Reepl)

Tools

Tool

What it does

auth_status

Is the tool authorized, and as whom

publish_now(text, visibility)

Post immediately (PUBLIC / CONNECTIONS)

schedule_post(text, when)

Queue for later (+2h, +1d, or ISO time)

list_posts(kind)

Scheduled queue + published history

cancel_scheduled(id)

Remove a queued post

post_brief(topic, archetype)

Structured brief + rules to write a strong post

content_calendar()

Safe weekly cadence and best-practice rules

Setup

1. Create a LinkedIn app (once, ~10 min)

  1. Go to developer.linkedin.com → My apps → Create app.

  2. Fill in name, associate a LinkedIn Page (create a simple one if you don't have it — required by LinkedIn), upload a logo.

  3. Open your app → Auth tab:

    • Copy the Client ID and Client Secret.

    • Under OAuth 2.0 redirect URLs, add exactly: http://localhost:8710/callback

  4. Open the Products tab and request:

    • Sign In with LinkedIn using OpenID Connect (gives openid profile)

    • Share on LinkedIn (gives w_member_social — the posting scope)

    These are self-serve for personal use and usually approve instantly. If a scope isn't yet granted, the auth step below will tell you which one is missing.

2. Install

cd linkedin-mcp
python3 -m venv .venv && source .venv/bin/activate
pip install -e .

3. Authorize the tool (once)

Put your credentials in the environment (or ~/.linkedin-mcp/token.json):

export LINKEDIN_CLIENT_ID=xxxxxxxx
export LINKEDIN_CLIENT_SECRET=xxxxxxxx
export LINKEDIN_REDIRECT_URI=http://localhost:8710/callback

python -m linkedin_mcp.auth

A browser opens LinkedIn's consent page → approve → the token is saved to ~/.linkedin-mcp/token.json (chmod 600). Done.

4. Connect to Claude

Add to your MCP client config (e.g. Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "linkedin": {
      "command": "python",
      "args": ["-m", "linkedin_mcp.server"],
      "env": {
        "LINKEDIN_CLIENT_ID": "xxxxxxxx",
        "LINKEDIN_CLIENT_SECRET": "xxxxxxxx"
      }
    }
  }
}

Now you can say: "Write a build-in-public post about my AST taint scanner and publish it" — the assistant uses post_brief to shape it, then publish_now.

5. Auto-posting on a schedule

schedule_post queues posts; a small scheduler publishes the due ones. Run it from cron so posts go out even when you're offline:

*/15 * * * * cd /path/to/linkedin-mcp && .venv/bin/python -m linkedin_mcp.scheduler >> ~/.linkedin-mcp/scheduler.log 2>&1

How growth actually works here

Ask the assistant for content_calendar() — it returns a Mon/Wed/Fri cadence and rules (hook first, be specific, one idea, real numbers, end with a question). Then generate posts with post_brief and schedule a week at a time. Consistency

  • substance is what moves a profile — and it can't be taken away by a ban.

Security & privacy

  • Token and posts are stored locally under ~/.linkedin-mcp/ (chmod 600), never in the repo.

  • The tool only calls the official LinkedIn API and only acts as you.

  • Access tokens expire (~60 days); the client auto-refreshes when a refresh token is present, otherwise re-run python -m linkedin_mcp.auth.

License

MIT © nadirzhon — for use on your own LinkedIn account, within LinkedIn's terms.

Install Server
A
license - permissive license
A
quality
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    -
    quality
    C
    maintenance
    Enables creation of optimized LinkedIn posts using a component-based design system with variants, themes, and composition patterns. Supports multiple post types (text, document, poll, video, carousel) with research-backed optimization for maximum engagement.
    3
    Apache 2.0
  • A
    license
    -
    quality
    D
    maintenance
    LinkedIn-native AI content creation, scheduling & analytics. Write and post on LinkedIn, create drafts, generate hooks & hashtags, schedule posts, and track engagement — all through natural language.
    44
    MIT

View all related MCP servers

Related MCP Connectors

  • Search, label and export your LinkedIn saved posts, then draft, schedule and publish from them.

  • Schedule, publish, and analyze social posts on TikTok, Instagram, YouTube, X, Threads, LinkedIn.

  • Schedule and publish to 10 social platforms: LinkedIn, X, Instagram, TikTok, YouTube, and more.

View all MCP Connectors

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/nadirzhon/linkedin-mcp'

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