Skip to main content
Glama
nadirzhon

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. The verb 'Check' clearly implies a read-only, non-destructive operation, and it indicates the type of information returned (authorization status and member identity). It lacks details about the exact response format or edge cases, but for a status-check tool this is reasonably transparent.

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 sentence, front-loaded with the action and purpose. Every word earns its place, conveying both the authorization check and the member identity aspect without any fluff.

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

Completeness5/5

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

The tool is very simple: no parameters, no output schema, and a clear purpose. The description explains what the tool does and what it reveals (authorization and member), which is sufficient for an agent to know when and how to invoke it. There are no hidden complexities or side effects to disclose.

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 per rubric the baseline is 4. The description does not need to add parameter details since the input schema is empty, and it correctly implies that no arguments are required.

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?

Description uses the specific verb 'Check' and clearly states the resource (authorization to post) and the additional output (which member). It distinguishes itself from sibling tools that perform actions like publish_now or schedule_post.

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?

No explicit when-to-use or exclusions are provided, but it is implied that this tool is used before posting or scheduling to verify authorization. Given the simplicity of the tool, the absence of explicit alternatives is acceptable but still leaves room for clearer guidance.

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

cancel_scheduledA

Remove a queued post by its id.

ParametersJSON Schema
NameRequiredDescriptionDefault
post_idYes

TDQS

A3.7/5.0
Behavior2/5

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

There are no annotations, and the description only states the action without disclosing side effects, reversibility, or requirements. For a destructive operation like 'Remove', the lack of additional behavioral context is a significant gap.

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, front-loaded sentence with zero wasted words. It efficiently communicates the core action and target resource.

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 with one parameter and no output schema, but the description lacks important behavioral context such as whether the removal is permanent or if there are constraints on which queued posts can be cancelled. It is adequate for a basic cancellation operation but leaves some gaps.

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

Parameters3/5

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

With a single parameter (post_id) and 0% schema description coverage, the description's phrase 'by its id' clarifies that post_id is the identifier for the queued post. However, it adds minimal information beyond the parameter name itself, so it only partially compensates for the missing schema description.

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 the specific verb 'Remove' and identifies the resource as 'a queued post' with a clear method ('by its id'). It clearly distinguishes from sibling tools like schedule_post and publish_now by specifying the cancellation action.

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 clear context: this tool is for removing queued posts, which implies it should be used when a scheduled post needs to be cancelled. It does not explicitly mention alternatives or exclusions, but the purpose is sufficiently unique among the sibling tools.

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

content_calendarC

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

C2.3/5.0
Behavior1/5

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

With no annotations, the description carries full responsibility for behavioral disclosure, but it only describes a static concept ('safe weekly posting cadence') without stating what happens when invoked, what data is returned, or whether any side effects occur.

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?

The description is a single concise sentence that is not bloated. However, it lacks specificity, making it efficient but not fully informative.

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?

Despite having no parameters and a simple schema, the description fails to explain what the tool returns or how it relates to the broader content scheduling workflow. Given sibling tools like publish_now and schedule_post, more context is needed to define the tool's role.

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 fully covers parameter semantics. The description need not add parameter details, and it does not introduce confusion, so a baseline of 4 is appropriate.

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

Purpose2/5

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

The description 'A safe weekly posting cadence and best-practice rules for steady growth' is vague and lacks a clear verb or resource. It does not state what action the tool performs (e.g., retrieve, suggest, or manage) and does not distinguish itself from sibling tools like schedule_post or list_posts.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives. No context is given for prerequisites, scenarios, or exclusions, leaving the agent without direction on selecting it over sibling tools.

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

list_postsB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
kindNoall

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It simply says 'List posts' but does not disclose behaviors such as read-only nature, pagination, ordering, authentication requirements, or what the return value contains. This is a significant gap for an annotation-free tool.

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 sentence: 'List posts. kind: 'scheduled', 'published', or 'all'.' It is extremely concise, front-loaded, and every word adds value. No unnecessary fluff.

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 relatively simple (one optional parameter, no output schema), so the description covers the basics. However, it fails to mention what the output looks like (e.g., list of post IDs or full objects) and does not hint at whether all statuses other than scheduled/published are included. For a list tool, this is a moderate gap.

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 compensate. It directly explains the only parameter 'kind' with its allowed values 'scheduled', 'published', or 'all', providing meaning that the schema lacks (no enum). However, it doesn't elaborate on the semantics of each kind.

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 'List posts' with a specific verb and resource, and the kind parameter adds scope. It is clear but does not explicitly distinguish from siblings like content_calendar or post_brief, so it falls short 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?

The description implies usage by listing the 'kind' values but provides no explicit guidance on when to use this tool versus siblings like content_calendar or post_brief. No exclusions or alternatives are mentioned.

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

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
topicYes
archetypeNobuild_in_public

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden. It discloses the tool produces a brief and rules, and explains the expected workflow. It doesn't mention side effects or limitations, but for a content-generation tool this is adequately transparent.

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 succinct and front-loaded with the core purpose. The archetype list and workflow instruction are directly useful, with no filler.

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

Completeness5/5

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

The tool is simple: two parameters, no output schema. The description tells the agent what to expect (structure + rules), how to use the output, and what to do next. Given the tool's simplicity, this is fully complete.

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 coverage is 0%, so the description must add meaning. It explicitly lists the allowed archetype values (build_in_public, lesson, teardown, opinion, result), adding significant value. The topic parameter is only implied via 'on a topic,' but its meaning is self-evident.

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 clearly states it returns a structured brief and rules for writing a post. The verb 'get' and resource 'brief' are specific, and it distinguishes itself from sibling publish tools by explicitly directing the agent to follow with publish_now or schedule_post.

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?

Provides clear usage context: use this first to prepare content, then publish. It explicitly names subsequent tools (publish_now, schedule_post) but doesn't give exclusions or alternatives for different scenarios, limiting a perfect score.

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

publish_nowA

Publish a text post to your LinkedIn profile immediately.

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

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes
visibilityNoPUBLIC

TDQS

A3.9/5.0
Behavior2/5

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

No annotations are present, so the description must carry the full burden of behavioral disclosure. It only says 'publish' and does not explain side effects, authentication requirements, irreversibility, or potential failure modes. This is a significant gap for a mutating tool.

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 very concise: one purpose statement followed by parameter definitions. Information is front-loaded and every sentence contributes value without redundancy.

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 tool with no output schema, the description covers the main purpose and parameter meanings adequately. However, it lacks guidance on when to prefer this over schedule_post and does not mention expected return behavior or prerequisites.

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

Parameters5/5

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

The description explicitly explains both parameters ('text: the full post body', 'visibility: PUBLIC (default) or CONNECTIONS'), adding crucial meaning that the input schema lacks. This fully compensates for the 0% schema description coverage.

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 clearly states the action ('Publish'), the object ('a text post'), the target ('to your LinkedIn profile'), and temporal scope ('immediately'), effectively distinguishing it from scheduling-related sibling tools.

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 word 'immediately' implies when to use this tool, but it does not explicitly contrast with schedule_post or state alternative tools. There is clear context but no exclusions or direct 'use this instead' guidance.

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

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes
whenYes
visibilityNoPUBLIC

TDQS

A4.2/5.0
Behavior4/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. It discloses that the post is published by the scheduler process and requires the scheduler to be running, adding key behavioral context beyond the schema. It also provides format examples for the 'when' parameter, enhancing transparency.

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 compact and front-loaded, with the core purpose stated first, followed by necessary time-format examples and a critical operational note. Every sentence earns its place without redundancy.

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 scheduling tool with no output schema and no annotations, the description covers the essential aspects: what the tool does, how the timing works, and the necessary prerequisite (scheduler). It could mention error handling or edge cases, but it is sufficiently complete for an AI agent to invoke it correctly.

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

Parameters3/5

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

Schema description coverage is 0%, and the description compensates well for the 'when' parameter by explaining both ISO and relative time formats. However, it offers no additional meaning for 'text' or 'visibility', leaving a gap in parameter understanding, though these are relatively self-explanatory.

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 opens with 'Queue a post for later', using a specific verb and resource, and immediately distinguishes from the sibling 'publish_now'. It clearly states the tool's purpose as scheduling a post for future publication.

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 explains the context of use (delayed publishing) and gives an explicit operational instruction: run the scheduler for queued posts to be published. It doesn't explicitly name alternatives, but the sibling 'publish_now' provides the contrast, making the usage context clear.

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.

  1. 7 tool updatesv1.0.0
    • First observedauth_status
    • First observedcancel_scheduled
    • First observedcontent_calendar
    • First observedlist_posts
    • First observedpost_brief
    • First observedpublish_now
    • First observedschedule_post

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

ActivityMaintained
ResponsivenessNo 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.
    34 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
    12 npm
    Apache 2.0