LinkedIn MCP Server for Claude and Cursor

Hosted LinkedIn MCP for Claude, Cursor, and ChatGPT. Search profiles, post updates, and manage messages with managed OAuth.

Linkedin logoLinkedin
Oauth2

LinkedIn is a professional networking platform for connecting, sharing content, and engaging with business opportunities. It's the go-to place for building your professional brand and unlocking new career connections.

22 Tools

Try Linkedin now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Linkedin
Try asking
TOOLS

Supported Tools

Every Linkedin action and event your agent gets out of the box.

Create article or URL share

Tool to create an article or URL share on LinkedIn using the UGC Posts API.

Create comment on LinkedIn post

Tool to create a first-level or nested comment on a LinkedIn share, UGC post, or parent comment via the Social Actions Comments API.

Create a LinkedIn post

Creates a new post on LinkedIn for the authenticated user or an organization they manage.

Delete LinkedIn Post

Deletes a specific LinkedIn post (share) by its unique `share_id`, which must correspond to an existing share.

Delete Post

Delete a LinkedIn post using the Posts API REST endpoint.

Delete UGC Post (Legacy)

Delete a UGC post using the legacy UGC Post API endpoint.

Get ad targeting facets

Tool to retrieve available ad targeting facets from LinkedIn Marketing API.

Get audience counts

Retrieves audience size counts for specified targeting criteria.

Get company info

Retrieves organizations where the authenticated user has specific roles (ACLs), to determine their management or content posting capabilities for LinkedIn company pages.

Get image details

Tool to retrieve details of a LinkedIn image using its URN.

Get images

Tool to retrieve image metadata including download URLs, status, and dimensions from LinkedIn's Images API.

Get my info

Fetches the authenticated LinkedIn user's profile information including name, headline, profile picture, and other profile details.

Get network size

Tool to retrieve the follower count for a LinkedIn organization.

Get organization page statistics

Tool to retrieve page statistics for a LinkedIn organization page.

Get person profile

Retrieves a LinkedIn member's profile information by their person ID.

Get post content

Tool to retrieve detailed post content including text, images, videos, and metadata from LinkedIn by post URN.

Get share statistics

Retrieves share statistics for a LinkedIn organization, including impressions, clicks, likes, comments, and shares.

Get videos

Retrieves video metadata from LinkedIn Marketing API.

Initialize image upload

Tool to initialize an image upload to LinkedIn and return a presigned upload URL plus the resulting image URN.

List reactions on entity

Retrieves reactions (likes, celebrations, etc.

Register image upload

Tool to initialize a native LinkedIn image upload for feed shares and return a presigned upload URL plus the resulting digital media asset URN.

Search ad targeting entities

Search for ad targeting entities using typeahead search.

SETUP GUIDE

Connect Linkedin MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/openai @ai-sdk/mcp
Install the Composio SDK and Claude Agent SDK
2

Create Tool Router Session

typescript
import { Composio } from '@composio/core';

const composio = new Composio({ apiKey: 'your-api-key' });

console.log("Creating Tool Router session...");
const { mcp } = await composio.create('your-user-id');
console.log(`Tool Router session created: ${mcp.url}`);
Initialize the Composio client and create a Tool Router session
3

Connect to AI Agent

typescript
import { openai } from '@ai-sdk/openai';
import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
import { generateText, stepCountIs } from 'ai';

const client = await createMCPClient({
  transport: {
    type: 'http',
    url: mcp.url,
    headers: { 'x-api-key': 'your-composio-api-key' }
  }
});

const tools = await client.tools();

const { text } = await generateText({
  model: openai('gpt-4o'),
  tools,
  messages: [{ role: 'user', content: 'Create a LinkedIn post announcing our product launch' }],
  stopWhen: stepCountIs( 5 )
});

console.log(`Agent: ${text}`);
Use the MCP server with your AI agent
SETUP GUIDE

Connect Linkedin API Tool with your Agent

1

Install Composio

typescript
npm install @composio/openai
Install the Composio SDK
2

Initialize Composio and Create Tool Router Session

typescript
import OpenAI from 'openai';
import { Composio } from '@composio/core';
import { OpenAIResponsesProvider } from '@composio/openai';

const composio = new Composio({
  provider: new OpenAIResponsesProvider(),
});
const openai = new OpenAI({});
const session = await composio.create('your-user-id');
Import and initialize Composio client, then create a Tool Router session
3

Execute Linkedin Tools via Tool Router with Your Agent

typescript
const tools = session.tools;
const response = await openai.responses.create({
  model: 'gpt-4.1',
  tools: tools,
  input: [{
    role: 'user',
    content: 'Post a company update about our latest product launch on LinkedIn'
  }],
});
const result = await composio.provider.handleToolCalls(
  'your-user-id',
  response.output
);
console.log(result);
Get tools from Tool Router session and execute Linkedin actions with your Agent
Guide

Connect multiple Linkedin accounts to Claude and tell it which one to use by name.

Read the guide

Why Use Composio?

AI Native Linkedin Integration

  • Supports both Linkedin MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Linkedin data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Linkedin access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Linkedin
  • Scoped, least privilege access to Linkedin resources
  • Full audit trail of agent actions to support review and compliance

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

No. Composio provides a managed OAuth app for Linkedin, so you sign in with your normal Linkedin account and approve access. If you later want the consent screen to show your own company name, you can add your own Linkedin OAuth app in the Composio dashboard, and every connection after that uses it.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Yes. Composio is SOC 2 Type II compliant and is built to keep your Linkedin connection and credentials secure. OAuth tokens and API keys are encrypted, and sensitive customer data is protected at rest and in transit.

Composio also undergoes independent security testing and continuously monitors its systems for security threats. You can review the latest reports and policies in the Composio Trust Center.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

When you connect a Linkedin account through Composio, every action runs under that account, so anything the agent creates, sends, or changes shows up in Linkedin as done by you. Keep an approval step in your prompt for actions with side effects, such as sending or deleting, and have the agent draft first.

Exactly the ones Linkedin lists on its consent screen when you connect. Review that screen before approving. If you connect a work account, your Linkedin administrator may need to approve the app first, and you can revoke the access inside Linkedin whenever you want.

Yes. Composio supports multiple connected accounts for the same app, and that works in Claude, ChatGPT, or any other assistant you connect through Composio. Give each Linkedin connection a name such as work or personal, and the assistant uses the one you mention in the request. Each account keeps its own credentials and nothing is merged.

Composio refreshes Linkedin tokens automatically, so day to day you do nothing. If you revoke access inside Linkedin, or Linkedin invalidates the session, the connection shows as expired in Composio and the agent stops acting on that account until you reconnect it, which is a single sign-in.

Composio's free plan includes 100,000 tool calls per month with no credit card, and up to 20,000 of those can run through Composio-managed apps like Linkedin. Personal Linkedin use rarely gets near that. Paid plans add higher limits and team features, and Linkedin's own pricing is unaffected.

Built-in connectors usually give one AI access to a limited set of apps. Many people use Composio because it lets their AI connect to more apps than it normally supports, or connect to multiple accounts for the same app (e.g. connect Claude to multiple Linkedin accounts).

With Composio, you connect Linkedin once and then use it across different AI assistants without setting it up separately in each one. Connect your apps to Composio once, then connect Composio to whichever AI you use, whether that's Claude, ChatGPT, Hermes, or your own custom assistant.

Start with Linkedin.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Linkedin tool your agent needs.Free to start.

Start building