MCP server/communication

LinkedCtl MCP Server

OAuth2 CLI and MCP server for the LinkedIn API

alexey-pelykh/linkedctl ↗by alexey-pelykhupdated
1

Add it to Claude Code

claude mcp add linkedctl -- npx linkedctl mcp
2

Make your agent remember this setup

linkedctl's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • Post content including text, images, video, and documents
  • Manage comments and reactions on posts
  • Support for organization-level posting and analytics
  • OAuth 2.0 authentication for secure API access
  • Draft post support for content planning

Tools 8

whoamiShow the current user's name, email, and profile picture URL
auth_statusShow authentication status for a profile
auth_revokeRevoke the access token server-side and clear local credentials
post_createCreate a post on LinkedIn with optional media, poll, or article attachment
post_getFetch a single post by URN
post_listList posts with pagination
post_updateUpdate the commentary text of an existing post
post_deleteDelete a post by URN

Try it

Create a new LinkedIn post saying 'Hello from LinkedCtl!'
List my recent LinkedIn posts to see how they are performing.
Check my current LinkedIn authentication status.
Delete the post with URN urn:li:share:1234567890.
Original README from alexey-pelykh/linkedctl

LinkedCtl: The Complete CLI & MCP for LinkedIn

OAuth2 CLI and MCP server for the LinkedIn API.

What It Does

  • Post content — text, images, video, documents, articles, multi-image carousels, and polls
  • Comments & reactions — create, list, and delete comments and reactions on posts
  • Organization support — post, comment, react, and view analytics as an organization
  • Analytics — per-post, per-member, and per-organization statistics
  • Media uploads — upload images, video, and documents to LinkedIn
  • Draft posts — save posts as drafts before publishing
  • OAuth 2.0 authentication with your own LinkedIn app
  • Direct token passing for tokens obtained from other applications
  • MCP server for AI assistant integration (Claude, Cursor, etc.)
  • CLI for scriptable LinkedIn operations

Prerequisites

Installation

npm install -g linkedctl

Or run directly:

npx linkedctl --help

Quick Start

  1. Create a LinkedIn app at linkedin.com/developers
  2. Configure OAuth 2.0 credentials
  3. Authenticate:
    linkedctl auth login --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET
    
  4. Start using:
    linkedctl post "Hello from LinkedCtl!"
    

See the OAuth Setup Guide for detailed step-by-step instructions.

MCP Integration

MCP Client Configuration

<details> <summary><b>Claude Desktop</b></summary>

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
    "mcpServers": {
        "linkedctl": {
            "command": "npx",
            "args": ["linkedctl", "mcp"]
        }
    }
}
</details> <details> <summary><b>Claude Code</b></summary>
claude mcp add linkedctl -- npx linkedctl mcp
</details> <details> <summary><b>Cursor</b></summary>

Add to .cursor/mcp.json in your project root:

{
    "mcpServers": {
        "linkedctl": {
            "command": "npx",
            "args": ["linkedctl", "mcp"]
        }
    }
}
</details> <details> <summary><b>Windsurf</b></summary>

Add to ~/.codeium/windsurf/mcp_config.json:

{
    "mcpServers": {
        "linkedctl": {
            "command": "npx",
            "args": ["linkedctl", "mcp"]
        }
    }
}
</details>

Available Tools

All tools accept an optional profile parameter to select a configuration profile.

Authentication
Tool Description
whoami Show the current user's name, email, and profile picture URL
auth_status Show authentication status for a profile
auth_revoke Revoke the access token server-side and clear local credentials
Posts
Tool Description
post_create Create a post on LinkedIn with optional media, poll, or article attachment
post_get Fetch a single post by URN
post_list List posts with pagination (supports as_org for organization posts)
post_update Update the commentary text of an existing post
post_delete Delete a post by URN

post_create supports rich content types:

Parameter Description
text Post text content (required)
visibility PUBLIC or CONNECTIONS (default PUBLIC)
draft Save as draft instead of publishing
image / image_file Attach a single image (URN or local file path)
video / video_file Attach a video (URN or local file path)
`document

Frequently Asked Questions

What are the key features of LinkedCtl?

Post content including text, images, video, and documents. Manage comments and reactions on posts. Support for organization-level posting and analytics. OAuth 2.0 authentication for secure API access. Draft post support for content planning.

What can I use LinkedCtl for?

Automating content publishing to LinkedIn profiles or company pages. Integrating LinkedIn analytics directly into AI-driven reporting workflows. Managing social media engagement tasks through a natural language interface. Scripting repetitive LinkedIn operations via CLI.

How do I install LinkedCtl?

Install LinkedCtl by running: npm install -g linkedctl

What MCP clients work with LinkedCtl?

LinkedCtl works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep LinkedCtl docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest