Linkedin MCP for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Linkedin MCP or direct API to search profiles, post updates, manage messages, and analyze connections through natural language.

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

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
FAQ

Frequently asked questions

No, you can get started immediately using Composio's built-in Linkedin app. For production, we recommend configuring your own OAuth credentials.

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

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

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

Start with Linkedin.It takes 30 seconds.

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

Start building