Skip to main content
The linkedin MCP adapter connects to the LinkedIn Marketing / Community Management APIs. Use it to draft and publish posts, upload images, and list organizations you administer — often after human_task approval in Workflow Studio.

Prerequisites

  • A LinkedIn Developer application with approved products (e.g. Share on LinkedIn, Sign In with LinkedIn, Community Management as required for your use case)
  • OAuth client ID, client secret, and a refresh token (recommended) or short-lived access token for testing
  • Admin access to any company pages you post to
  • project_contributor access

Connect in AgentRuntime

1

Configure the LinkedIn app

In the LinkedIn Developer Portal, note your Client ID and Client Secret. Complete OAuth for the member who will post content and store the refresh token securely.
2

Create a connection

Go to Connections and click New custom connection to create a connection with ClientID, ClientSecret, and RefreshToken (or AccessToken for local testing only).
3

Add linkedin MCP instance

Go to MCP, click Add instance for linkedin, wire your connection on Instance config, set the profile active, and save.
4

Verify identity

Run mcp_calllinkedin_get_userinfo and linkedin_list_organizations before scheduling posts.
See Authentication for binding connections to MCP instances.

What you can build

  • Approved social posts — LLM drafts copy from a blog RSS item → human_tasklinkedin_create_share_update or linkedin_create_company_update.
  • Campaign recap — Postgres metrics query → LLM summary → linkedin_upload_image for chart → company post with link to report.
  • Content calendar sync — Google Sheets row with status “Ready” → post → update sheet status via google-sheets adapter.
  • Post auditlinkedin_list_posts by author URN → archive underperformers with linkedin_delete_post after review.

Tools

ToolDescription
linkedin_get_userinfoAuthenticated member profile (OpenID userinfo)
linkedin_list_organizationsOrganizations the member can administer
linkedin_create_share_updatePersonal feed post
linkedin_create_company_updateCompany page post
linkedin_upload_imageUpload image; returns asset URN for posts
linkedin_list_postsList posts by author URN
linkedin_get_postGet post by URN
linkedin_delete_postDelete post by URN
linkedin_custom_api_callRaw LinkedIn API request

Example

Publish a company update after approval:
{
  "id": "linkedin-post",
  "type": "mcp_call",
  "name": "Publish company post",
  "tool_name": "linkedin_create_company_update",
  "tool_args": {
    "organization_id": "{{input.org_id}}",
    "text": "{{steps.human-approve.result.approved_text}}",
    "link": "https://example.com/blog/new-feature",
    "link_title": "New feature launch"
  },
  "depends_on": ["human-approve"],
  "timeout_s": 60
}

Configuration

KeyRequiredDescription
ClientIDFor OAuth refreshLinkedIn OAuth client ID
ClientSecretFor OAuth refreshLinkedIn OAuth client secret
RefreshTokenRecommendedLong-lived refresh token
AccessTokenTesting onlyDirect access token (expires quickly)
LinkedInVersionNoLinkedIn-Version header (YYYYMM)
APIBaseNoAPI base URL
TokenURLNoOAuth token endpoint

Troubleshooting

IssueFix
401 / token expiredUse refresh token flow; avoid long-running workflows with a one-time access token
Cannot post to company pageCaller must admin the organization; confirm with linkedin_list_organizations
Image upload failsCall linkedin_upload_image first; pass returned URN as image_asset_id