This file documents every tool available in the LinkedIn CLI / MCP server. AI agents (Claude Code, Cursor, Windsurf, OpenClaw, etc.) should use this as the authoritative reference for managing LinkedIn.
Before using any tool, the agent needs LinkedIn session cookies. These are stored in ~/.linkedin-cli/config.json after running linkedin login, or can be set via environment variables:
LINKEDIN_LI_AT=<your li_at cookie>
LINKEDIN_JSESSIONID=<your JSESSIONID cookie>
To check if the session is valid:
linkedin statusGet the authenticated user's own LinkedIn profile.
linkedin profile meParameters: None Returns: Full profile object (firstName, lastName, headline, entityUrn, publicIdentifier, etc.)
View any LinkedIn profile by their public identifier (the URL slug).
linkedin profile view johndoeParameters:
| Name | Type | Required | Description |
|---|---|---|---|
public_id |
string | yes | The public profile identifier from their LinkedIn URL |
Returns: Full profile view including positions, education, languages, publications, certifications, skills
Get contact information for a profile (email, phone, websites, Twitter handles).
linkedin profile contact-info johndoeParameters:
| Name | Type | Required | Description |
|---|---|---|---|
public_id |
string | yes | Public profile identifier |
Returns: emailAddress, websites[], twitterHandles[], phoneNumbers[], birthDateOn
List skills for a profile.
linkedin profile skills johndoe --count 50Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
public_id |
string | yes | — | Public profile identifier |
count |
number | no | 100 | Number of skills to return (1-100) |
Get network info: connection count, follower count, connection distance, following state.
linkedin profile network johndoeParameters:
| Name | Type | Required | Description |
|---|---|---|---|
public_id |
string | yes | Public profile identifier |
Check if a profile has premium, influencer, job seeker, or open link badges.
linkedin profile badges johndoeParameters:
| Name | Type | Required | Description |
|---|---|---|---|
public_id |
string | yes | Public profile identifier |
Returns: { influencer, jobSeeker, openLink, premium } (booleans)
Get privacy settings for a profile.
linkedin profile privacy johndoeParameters:
| Name | Type | Required | Description |
|---|---|---|---|
public_id |
string | yes | Public profile identifier |
List recent posts from a profile. Requires the numeric URN ID (not the public identifier).
linkedin profile posts ACoAABxxxxxxx --count 20Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
urn_id |
string | yes | — | Profile URN ID (numeric part) |
count |
number | no | 10 | Number of posts (1-100) |
start |
number | no | 0 | Pagination offset |
Remove an existing connection (unfriend).
linkedin profile disconnect johndoeParameters:
| Name | Type | Required | Description |
|---|---|---|---|
public_id |
string | yes | Public profile identifier |
Create a new LinkedIn post. Supports text-only and image posts.
linkedin posts create --text "Hello LinkedIn!"
linkedin posts create --text "Check this out" --image ./photo.jpg
linkedin posts create --text "For connections only" --visibility connectionsParameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
text |
string | yes | — | Post text content (max 3000 chars) |
visibility |
enum | no | anyone |
anyone or connections |
image |
string | no | — | File path to image to attach |
comments_scope |
enum | no | all |
Who can comment: all, connections, none |
Edit the text of an existing post.
linkedin posts edit "urn:li:share:12345" --text "Updated content"Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
share_urn |
string | yes | The share URN of the post |
text |
string | yes | New post text (max 3000 chars) |
Delete a post.
linkedin posts delete "urn:li:share:12345"Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
share_urn |
string | yes | The share URN of the post to delete |
View your LinkedIn feed in chronological order.
linkedin feed view --count 20Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
count |
number | no | 10 | Number of feed items (1-100) |
start |
number | no | 0 | Pagination offset |
View a specific user's activity feed.
linkedin feed user johndoe --count 20Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
profile_id |
string | yes | — | Public profile ID or URN ID |
count |
number | no | 10 | Number of items (1-100) |
start |
number | no | 0 | Pagination offset |
View a company's feed/updates.
linkedin feed company google --count 20Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
company_name |
string | yes | — | Company universal name (URL slug) |
count |
number | no | 10 | Number of items (1-100) |
start |
number | no | 0 | Pagination offset |
React to a post. Six reaction types available.
linkedin engage react 7123456789 --type LIKEParameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
post_urn |
string | yes | — | Activity URN ID (numeric part) |
type |
enum | no | LIKE |
Reaction type (see below) |
Reaction types:
| Value | Meaning |
|---|---|
LIKE |
Thumbs up |
PRAISE |
Celebrate (clapping) |
APPRECIATION |
Support (heart-hands) |
EMPATHY |
Love (heart) |
INTEREST |
Insightful (lightbulb) |
ENTERTAINMENT |
Funny (laughing) |
Get reactions on a post.
linkedin engage reactions 7123456789 --count 50Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
post_urn |
string | yes | — | Activity URN ID |
count |
number | no | 10 | Number of reactions (1-100) |
start |
number | no | 0 | Pagination offset |
Comment on a post.
linkedin engage comment 7123456789 --text "Great post!"Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
post_urn |
string | yes | Activity URN ID |
text |
string | yes | Comment text (max 1250 chars) |
List comments on a post.
linkedin engage comments-list 7123456789 --sort REVERSE_CHRONOLOGICALParameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
post_urn |
string | yes | — | Activity URN ID |
count |
number | no | 10 | Number of comments (1-100) |
start |
number | no | 0 | Pagination offset |
sort |
enum | no | RELEVANCE |
RELEVANCE or REVERSE_CHRONOLOGICAL |
Share/repost a post with optional commentary.
linkedin engage share "urn:li:share:12345" --text "This is worth reading"Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
share_urn |
string | yes | Original share URN to repost |
text |
string | no | Optional commentary (max 3000 chars) |
Send a connection request. Optional personalized message (max 300 chars).
linkedin connections send ACoAABxxxxxxx --message "Hi, I'd love to connect!"Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
profile_urn |
string | yes | Profile URN ID |
message |
string | no | Personalized message (max 300 chars) |
List received (pending) connection invitations.
linkedin connections received --count 50Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
count |
number | no | 100 | Number of invitations (1-100) |
start |
number | no | 0 | Pagination offset |
List sent (pending) connection invitations.
linkedin connections sentParameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
count |
number | no | 100 | Number of invitations (1-100) |
start |
number | no | 0 | Pagination offset |
Accept a connection invitation. Requires the invitation ID and shared secret (from the connections received response).
linkedin connections accept 12345 --secret abc123Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
invitation_id |
string | yes | Invitation ID |
secret |
string | yes | Invitation shared secret |
Reject/ignore a connection invitation.
linkedin connections reject 12345 --secret abc123Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
invitation_id |
string | yes | Invitation ID |
secret |
string | yes | Invitation shared secret |
Withdraw a pending sent connection request.
linkedin connections withdraw 12345Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
invitation_id |
string | yes | Invitation ID to withdraw |
Remove an existing connection.
linkedin connections remove johndoeParameters:
| Name | Type | Required | Description |
|---|---|---|---|
public_id |
string | yes | Public profile identifier |
List all messaging conversations.
linkedin messaging conversationsParameters: None
Get the conversation with a specific person.
linkedin messaging conversation-with ACoAABxxxxxxxParameters:
| Name | Type | Required | Description |
|---|---|---|---|
profile_urn |
string | yes | Profile URN ID of the person |
Get messages from a specific conversation.
linkedin messaging messages CONVERSATION_URN_ID
linkedin messaging messages CONVERSATION_URN_ID --before 1700000000000Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
conversation_id |
string | yes | Conversation URN ID |
before |
number | no | Timestamp (ms) for pagination — get messages before this time |
Send a message in an existing conversation.
linkedin messaging send CONVERSATION_URN_ID --text "Hello!"Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
conversation_id |
string | yes | Conversation URN ID |
text |
string | yes | Message text |
Start a new conversation with one or more people.
linkedin messaging send-new --recipients ACoAABxxxxxxx --text "Hi there!"
linkedin messaging send-new --recipients ACoAABxxxxxxx,ACoAAByyyyyyy --text "Group message"Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
recipients |
string | yes | Comma-separated profile URN IDs |
text |
string | yes | Message text |
Mark a conversation as read.
linkedin messaging mark-read CONVERSATION_URN_IDParameters:
| Name | Type | Required | Description |
|---|---|---|---|
conversation_id |
string | yes | Conversation URN ID |
Search for people with advanced filters.
linkedin search people --keywords "software engineer" --network F
linkedin search people --title "VP Sales" --company 1035 --geo 103644278Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
keywords |
string | no | — | Search keywords |
network |
enum | no | — | Connection depth: F (1st), S (2nd), O (3rd+) |
company |
string | no | — | Current company ID |
industry |
string | no | — | Industry ID |
school |
string | no | — | School ID |
title |
string | no | — | Title filter |
first_name |
string | no | — | First name filter |
last_name |
string | no | — | Last name filter |
geo |
string | no | — | Geographic region URN |
limit |
number | no | 10 | Results per page (max 49) |
start |
number | no | 0 | Pagination offset |
Search for companies.
linkedin search companies --keywords "AI startups"Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
keywords |
string | yes | — | Search keywords |
limit |
number | no | 10 | Results per page (max 49) |
start |
number | no | 0 | Pagination offset |
Search for jobs with filters for experience, type, location, remote, and recency.
linkedin search jobs --keywords "product manager" --remote --experience 4
linkedin search jobs --keywords "engineer" --location "San Francisco" --job-type FParameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
keywords |
string | yes | — | Job search keywords |
location |
string | no | — | Location filter |
experience |
string | no | — | Level: 1=Intern, 2=Entry, 3=Assoc, 4=Mid, 5=Dir, 6=Exec |
job_type |
string | no | — | Type: F=Full, C=Contract, P=Part, T=Temp, I=Intern |
remote |
boolean | no | — | Filter for remote jobs |
posted_within |
string | no | — | Recency: r86400=24h, r604800=week, r2592000=month |
count |
number | no | 25 | Results per page (max 49) |
start |
number | no | 0 | Pagination offset |
Search for posts/content.
linkedin search posts --keywords "AI trends 2026"Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
keywords |
string | yes | — | Search keywords |
limit |
number | no | 10 | Results per page (max 49) |
start |
number | no | 0 | Pagination offset |
View a company profile.
linkedin companies view googleParameters:
| Name | Type | Required | Description |
|---|---|---|---|
company_name |
string | yes | Company universal name (URL slug from their LinkedIn URL) |
Follow a company.
linkedin companies follow "urn:li:fs_followingInfo:12345"Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
following_state_urn |
string | yes | Following state URN |
Unfollow a company or entity.
linkedin companies unfollow "urn:li:fs_followingInfo:12345"Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
entity_urn |
string | yes | Entity URN to unfollow |
Get details for a specific job posting.
linkedin jobs view 3456789012Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
job_id |
string | yes | Job posting ID |
Get skill match insights for a job posting (how your skills match).
linkedin jobs skills 3456789012Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
job_id |
string | yes | Job posting ID |
Get "who viewed my profile" summary and view count.
linkedin analytics profile-viewsParameters: None
All tools return JSON by default. Use these flags to control output:
linkedin profile me # Compact JSON (default)
linkedin profile me --pretty # Pretty-printed JSON
linkedin profile me --fields "firstName,lastName,headline" # Only specific fields
linkedin profile me --quiet # No output, exit code onlyLinkedIn has aggressive rate limiting. The client automatically:
- Enforces minimum 1-second gaps between requests
- Retries on 429 (rate limit) and 5xx errors with exponential backoff
- Detects CAPTCHA/challenge pages and throws a clear error
For bulk operations, add your own delays between calls.
| Entity | URN Format | Example |
|---|---|---|
| Profile | urn:li:fsd_profile:{id} |
urn:li:fsd_profile:ACoAABxxxxxxx |
| Activity | urn:li:activity:{id} |
urn:li:activity:7123456789 |
| Share | urn:li:share:{id} |
urn:li:share:7123456789 |
| Company | urn:li:company:{id} |
urn:li:company:1035 |
| Conversation | urn:li:fs_conversation:{id} |
urn:li:fs_conversation:abc123 |
| Invitation | urn:li:invitation:{id} |
urn:li:invitation:12345 |