Skip to main content
Glama
abhineet34

linkedin-mcp-server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LINKEDIN_API_VERSIONNoLinkedIn API version (default: 202604)202604
LINKEDIN_ACCESS_TOKENYesYour LinkedIn access token for authentication

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
linkedin_get_profileA

Retrieve the authenticated LinkedIn member's profile information via the OIDC userinfo endpoint.

Returns the member's name, profile picture, email address, and locale.

Requires scopes: openid, profile, email

Args:

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: For JSON format: { "sub": string, // LinkedIn member URN (e.g., "urn:li:person:abc123") "name": string, // Full display name "given_name": string, // First name "family_name": string, // Last name "picture": string, // Profile picture URL (optional) "email": string, // Primary email address (optional) "email_verified": bool, // Whether email is verified (optional) "locale": { "country": string, // Country code "language": string // Language code } }

Examples:

  • Use when: "Who am I logged in as?" → call with default params

  • Use when: "Get my LinkedIn email" → call with response_format='json', read email field

  • Don't use when: You need to look up someone else's profile (LinkedIn doesn't expose that via standard API)

Error Handling:

  • Returns auth error if LINKEDIN_ACCESS_TOKEN is missing or expired

  • Returns permission error if 'profile' scope is not granted

linkedin_create_postA

Create a new post on LinkedIn on behalf of a member or organization.

Supports text-only posts, image posts (after uploading via linkedin_upload_image), and article/link posts. Post length is capped at 3000 characters.

Requires scope: w_member_social (for member posts) or w_organization_social (for org posts)

Args:

  • author_urn (string): URN of the post author. Format: 'urn:li:person:{id}' for members. Get your ID from linkedin_get_profile's 'sub' field.

  • text (string): Post text (1–3000 characters, required)

  • visibility ('PUBLIC' | 'CONNECTIONS' | 'LOGGED_IN'): Who can see the post (default: 'PUBLIC')

  • image_asset_urn (string, optional): Asset URN from linkedin_upload_image

  • article_url (string, optional): URL to share as a link post

  • article_title (string, optional): Link preview title (used with article_url)

  • article_description (string, optional): Link preview description (used with article_url)

Returns: The URN of the newly created post (e.g., 'urn:li:share:7123456789')

Examples:

  • Text post: { author_urn: "urn:li:person:abc", text: "Hello LinkedIn!" }

  • Image post: { author_urn: "urn:li:person:abc", text: "Check this out", image_asset_urn: "urn:li:digitalmediaAsset:..." }

  • Article share: { author_urn: "urn:li:person:abc", text: "Great read", article_url: "https://..." }

Error Handling:

  • 403 if w_member_social scope is missing

  • 400 if text exceeds 3000 chars or author URN is invalid

linkedin_get_postA

Retrieve a LinkedIn post by its URN.

NOTE: Reading posts requires the r_member_social scope for member posts or r_organization_social for org posts. These scopes require LinkedIn approval and are not available to all developers. If you only have w_member_social, use linkedin_create_post and linkedin_list_posts instead.

Requires scope: r_member_social or r_organization_social

Args:

  • post_urn (string): Post URN (e.g., 'urn:li:share:7123456789')

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: For JSON format: { "id": string, // Post URN "author": string, // Author URN "commentary": string, // Post text "visibility": string, // PUBLIC | CONNECTIONS | LOGGED_IN "lifecycleState": string, // PUBLISHED | DRAFT | DELETED "createdAt": number, // Unix timestamp (ms) "lastModifiedAt": number, "content": object // Media/article content (if any) }

Error Handling:

  • 403 if r_member_social scope is not approved for your app

linkedin_list_postsA

List posts by a LinkedIn member or organization.

NOTE: Listing posts requires the r_member_social scope (member) or r_organization_social scope (org). These are approval-gated scopes. For org posts, you also need to be an admin of the organization.

Requires scope: r_member_social or r_organization_social

Args:

  • author_urn (string): Author URN — 'urn:li:person:{id}' or 'urn:li:organization:{id}'

  • limit (number): Max posts to return, 1–50 (default: 20)

  • offset (number): Posts to skip for pagination (default: 0)

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: { "total": number, "count": number, "offset": number, "items": [Post], "has_more": boolean, "next_offset": number }

Error Handling:

  • 403 if r_member_social / r_organization_social scope is missing or not approved

linkedin_delete_postA

Permanently delete a LinkedIn post by its URN.

Only the author of the post can delete it. This action cannot be undone.

Requires scope: w_member_social (member posts) or w_organization_social (org posts)

Args:

  • post_urn (string): URN of the post to delete (e.g., 'urn:li:share:7123456789')

Returns: Confirmation message on success.

Error Handling:

  • 403 if you are not the author of the post

  • 404 if the post does not exist or is already deleted

linkedin_update_postA

Update the text or visibility of an existing LinkedIn post.

Only the author of the post can update it. Note that LinkedIn only allows updating the commentary (text) and visibility after posting — content attachments (images, articles) cannot be changed post-publish.

Requires scope: w_member_social (member posts) or w_organization_social (org posts)

Args:

  • post_urn (string): URN of the post to update (e.g., 'urn:li:share:7123456789')

  • text (string): New text content (1–3000 characters)

  • visibility ('PUBLIC' | 'CONNECTIONS' | 'LOGGED_IN', optional): New visibility setting

Returns: Confirmation message on success.

Error Handling:

  • 403 if you are not the author of the post

  • 404 if the post does not exist

linkedin_upload_imageA

Upload an image to LinkedIn and get an image URN to use when creating an image post.

This is a two-step process handled automatically:

  1. Initialize the upload via /rest/images to get a pre-signed upload URL

  2. PUT the image binary to that URL

After upload, use the returned image URN as image_asset_urn in linkedin_create_post.

Requires scope: w_member_social

Args:

  • author_urn (string): Owner URN — 'urn:li:person:{id}' from linkedin_get_profile

  • image_base64 (string): Base64-encoded image file contents

  • mime_type ('image/jpeg' | 'image/png' | 'image/gif'): Image MIME type (default: image/jpeg)

Returns: { "asset_urn": string, // e.g., "urn:li:image:C5622AQH..." "upload_url": string // The URL that was used for upload (informational) }

Examples:

  • Use when: "Post an image to LinkedIn" → upload first, then create_post with asset URN

  • Don't use when: You only want a text post (image upload not needed)

Error Handling:

  • 403 if w_member_social scope is not granted

  • 400 if the author_urn format is invalid

linkedin_get_organizationA

Retrieve a LinkedIn organization (company) page by its numeric ID or vanity name.

Without admin access, returns public fields: id, localizedName, vanityName, localizedWebsite, primaryOrganizationType, locations, and logoV2. With admin access (rw_organization_admin scope), returns additional fields like description, industries, staffCountRange, foundedOn, and specialties.

Requires scope: rw_organization_admin

Args:

  • lookup_by ('id' | 'vanity_name'): How to identify the org (default: 'id')

  • organization_id (string): Numeric org ID — required when lookup_by='id'

  • vanity_name (string): URL slug — required when lookup_by='vanity_name' E.g., 'microsoft' for linkedin.com/company/microsoft

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: For JSON format: { "id": string, "localizedName": string, "vanityName": string, "localizedWebsite": string, "primaryOrganizationType": string, "locations": [...], // Additional fields if you have admin access }

Examples:

  • By ID: { lookup_by: "id", organization_id: "1441" } ← LinkedIn's own page

  • By vanity: { lookup_by: "vanity_name", vanity_name: "microsoft" }

Error Handling:

  • 403 if rw_organization_admin scope is missing

  • 404 if the organization ID or vanity name does not exist

linkedin_get_org_follower_countA

Get the total number of LinkedIn members following an organization page.

Requires scope: rw_organization_admin

Args:

  • organization_id (string): Numeric organization ID (e.g., '1234567')

Returns: { "organization_id": string, "follower_count": number }

Examples:

  • Use when: "How many followers does our company page have?"

  • Use when: "Compare follower counts across organizations"

Error Handling:

  • 403 if rw_organization_admin scope is missing or you are not an admin of the org

  • 404 if the organization ID does not exist

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/abhineet34/linkedin-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server