Skip to main content
Glama
linkedin-mcp

linkedin-mcp

by nadirzhon

linkedin-mcp

MCP server for publishing and scheduling LinkedIn posts through LinkedIn's official API.

This project connects an AI assistant to a real external business platform through OAuth, MCP tools and the official LinkedIn API.

MCP Python Official API

What it demonstrates

The interesting part is not posting text. It is the integration boundary:

AI assistant
    ↓
MCP tools
    ↓
OAuth / local token
    ↓
LinkedIn official API
    ↓
publish / schedule / history

The server handles authorization, structured tool calls, scheduling and local token storage without relying on scraping.

Related MCP server: writio-mcp-server

Tools

Tool

Purpose

auth_status

Inspect authorization state

publish_now

Publish immediately

schedule_post

Queue a post for later

list_posts

Read scheduled/published posts

cancel_scheduled

Cancel a queued post

post_brief

Create a structured content brief

content_calendar

Generate a sustainable posting cadence

Deliberate boundaries

The project does not implement:

  • automated connection requests

  • scraping

  • mass messaging

  • auto-like/comment bots

  • engagement manipulation

It uses the official API and is intended for operating the owner's own LinkedIn account within LinkedIn's rules.

Setup

Create a LinkedIn application and configure the OAuth credentials:

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

Install:

git clone https://github.com/nadirzhon/linkedin-mcp
cd linkedin-mcp

python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Authorize:

python -m linkedin_mcp.auth

The token is stored locally under ~/.linkedin-mcp/, not in the repository.

MCP configuration

Example client configuration:

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

After connection, an assistant can compose content, request a structured brief and publish or schedule it through the MCP interface.

Scheduling

Queued posts can be published by the included scheduler:

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

Engineering highlights

  • MCP tool design

  • OAuth 2.0 / OpenID Connect integration

  • official REST API integration

  • local secure token storage

  • scheduled background execution

  • explicit capability boundaries

  • AI-to-business-system integration

Security

  • credentials are loaded from environment/local token storage

  • tokens are not committed to the repository

  • actions are performed as the authorized account

  • no scraping or unofficial automation layer

License

MIT © nadirzhon

Available Tools

7 tools
auth_statusA

Check whether the tool is authorized to post, and as which member.

Inputs: no named parameters.

cancel_scheduledA

Remove a queued post by its id.

Inputs: post_id (required).

content_calendarC

A safe weekly posting cadence and best-practice rules for steady growth.

Inputs: no named parameters.

list_postsB

List posts. kind: 'scheduled', 'published', or 'all'.

Inputs: kind.

post_briefA

Get a structured brief + rules to write a strong post on a topic.

archetype: build_in_public | lesson | teardown | opinion | result. Use the returned structure and rules to write the actual post, then publish_now or schedule_post it.

Inputs: topic (required), archetype.

publish_nowA

Publish a text post to your LinkedIn profile immediately.

text: the full post body. visibility: PUBLIC (default) or CONNECTIONS.

Inputs: text (required), visibility.

schedule_postA

Queue a post for later. It is published by the scheduler process.

when: ISO time ('2026-08-20T09:00') or relative ('+2h', '+1d'). Run the scheduler (cron or python -m linkedin_mcp.scheduler) so queued posts actually go out.

Inputs: text (required), when (required), visibility.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: auth_status checks authorization, publish_now posts immediately, schedule_post queues for later, list_posts retrieves posts, cancel_scheduled removes queued posts, post_brief gives content guidance, and content_calendar provides a posting cadence. No two tools overlap in function.

    Naming Consistency3/5

    Naming mixes verb-first patterns (publish_now, schedule_post, list_posts, cancel_scheduled) with noun-first patterns (auth_status, post_brief, content_calendar). All are snake_case and readable, but the verb/noun order is inconsistent.

    Tool Count5/5

    With 7 tools, the set is well-scoped for a LinkedIn posting server. Each tool earns its place without unnecessary bloat, covering authentication, publishing, scheduling, listing, canceling, and content guidance.

    Completeness4/5

    The core lifecycle is covered: create (publish/schedule), read (list), and delete (cancel scheduled). Missing operations like deleting published posts or editing scheduled posts are minor and can be worked around via cancel-and-recreate.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      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.
      45 npm
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to publish posts, images, comments, and reactions to LinkedIn as the authenticated user, with built-in safety features like daily budgets and deduplication.
      9
      1
      Apache 2.0