LinkedCtl

OAuth2 CLI and MCP server for the LinkedIn API.
What It Does
- Post content to LinkedIn via the official API
- 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
MCP Integration
Claude Code
claude mcp add linkedctl -- npx linkedctl mcp
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"linkedctl": {
"command": "npx",
"args": ["linkedctl", "mcp"]
}
}
}
Configuration
OAuth 2.0 (Recommended)
LinkedCtl supports OAuth 2.0 with your own LinkedIn Developer App:
linkedctl auth login --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET
Direct Token
If you already have an access token from another application:
linkedctl auth token --access-token YOUR_TOKEN
Environment Variables
LINKEDCTL_CLIENT_ID | LinkedIn OAuth 2.0 client ID |
LINKEDCTL_CLIENT_SECRET | LinkedIn OAuth 2.0 client secret |
LINKEDCTL_ACCESS_TOKEN | Direct access token (bypasses OAuth flow) |
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
AGPL-3.0-only
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).