
Linkedctl
io.github.alexey-pelykhPublished by GitHub account alexey-pelykhv0.5.0Updated Oct 25, 2026
CLI and MCP server for the LinkedIn API
Overview
A local MCP server and CLI for the LinkedIn API that lets an assistant publish posts, manage comments and reactions, and read analytics.
- What you can do
- Create, read, update and delete LinkedIn posts, including drafts, images, video, documents, articles, carousels and polls, as yourself or an organization. Create, list, get and delete comments, and add, list or remove reactions on posts. List organizations you administer, fetch organization details and follower counts. Read per-post, per-member and per-organization analytics. Upload images, video and documents, and check identity and authentication status.
- When to use it
- Useful when you want an assistant to draft and publish LinkedIn content, manage engagement on posts, or pull post and organization statistics without leaving the chat. Suited to social media and content workflows for personal or organization accounts.
- Requirements
- Local process run via npx or a global npm install; Node.js 24 or newer. A LinkedIn Developer App with OAuth 2.0 credentials, or a direct access token. Credentials can come from LINKEDCTL_CLIENT_ID, LINKEDCTL_CLIENT_SECRET and LINKEDCTL_ACCESS_TOKEN, or from YAML config files; LINKEDCTL_API_VERSION is required. Network access to LinkedIn.
Installation
In SourceWeft
- Open Linkedctl in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
[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
- Node.js >= 24
- A LinkedIn Developer App with appropriate permissions
Installation
Or run directly:
Quick Start
- Create a LinkedIn app at linkedin.com/developers
- Configure OAuth 2.0 credentials
- Authenticate:
- Start using:
See the OAuth Setup Guide for detailed step-by-step instructions.
MCP Integration
MCP Client Configuration
Claude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json):
Claude Code
Cursor
Add to .cursor/mcp.json in your project root:
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
Available Tools
All tools accept an optional profile parameter to select a configuration profile.
Authentication
Posts
post_create supports rich content types:
Comments
Reactions
Organizations
Analytics
Media
Configuration
Config File Format
LinkedCtl stores configuration in YAML files. Each file represents a single profile:
Available keys:
Config files are written with 0600 permissions (owner read/write only).
File Location and Precedence
Without a profile, LinkedCtl searches for config files in this order:
.linkedctl.yamlin the current working directory~/.linkedctl.yamlin the home directory
The first file found is used. When writing (e.g. after auth login), LinkedCtl writes to the CWD file if it exists, otherwise to the home directory file.
Profiles
Profiles let you manage multiple LinkedIn accounts or configurations. Each profile is stored as a separate YAML file under ~/.linkedctl/:
Use the --profile flag with any command:
Manage profiles with the profile command:
Authentication Methods
OAuth 2.0 (Recommended)
LinkedCtl supports OAuth 2.0 with your own LinkedIn Developer App:
Direct Token
If you already have an access token from another application:
Environment Variables
Environment variables take precedence over config file values.
Profile-Prefixed Environment Variables
When using a named profile, LinkedCtl also reads profile-prefixed environment variables. The profile name is uppercased with hyphens converted to underscores:
The same pattern applies to CLIENT_ID, CLIENT_SECRET, and API_VERSION.
Precedence Order
Configuration values are resolved in this order (highest priority first):
- Environment variables (profile-prefixed if a profile is active)
- Config file (profile-specific file, or CWD/home fallback)
CLI Reference
Global Options
auth — Manage Authentication
auth login options:
auth token options:
post — Manage LinkedIn Posts
post create options:
post list options:
comment — Manage Comments
comment create options:
reaction — Manage Reactions
reaction create options:
org — Manage Organizations
media — Upload Media
All media commands accept --as-org <id> and --format json|table.
stats — View Analytics
Common options:
profile — Manage Configuration Profiles
profile create options:
whoami — Show Current User
completion — Shell Completions
Security
- Dependabot keeps dependencies up to date with automated pull requests
- CodeQL analysis runs on every push and pull request for automated vulnerability detection
- Path traversal validation on profile names prevents directory escape attacks
- Unified auth error handling across all MCP tools provides consistent authentication failure messages
- Destructive operations (delete post, delete comment, delete profile) require interactive confirmation unless
--forceis passed
Disclaimer
This is an independent project and is not affiliated with, endorsed by, or associated with LinkedIn Corporation. LinkedIn is a trademark of LinkedIn Corporation.
License
Using LinkedCtl as a CLI tool or MCP server: No license obligations — use freely.
Using @linkedctl/core as a library in your project: Your combined work must be licensed under AGPL-3.0 (or a compatible license).
Source: README.md at commit d8622c0
Tools
0Version history
1- v0.5.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts