Linkedin MCP Integration for AI Agents | Composio
For AI agents: how to sign up
If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev.
Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.
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.
Get started for free Get a demo
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.
Try Linkedin now
Type what you want done — sign in and watch it run live in the Tool Router playground.
Supported Tools
Every Linkedin action and event your agent gets out of the box.
Tools
- Create article or URL share
- Create comment on LinkedIn post
- Create a LinkedIn post
- Delete LinkedIn Post
- Get ad targeting facets
- Get audience counts
- Get company info
- Get image details
- Get images
- Get my info
- Get network size
- Get organization page statistics
- Get person profile
- Get post content
- Get share statistics
- Get videos
- Initialize image upload
- List reactions on entity
- Register image upload
- Search ad targeting entities
Connect Linkedin MCP Tool with your Agent
Install Composio
npm install @composio/core ai @ai-sdk/openai @ai-sdk/mcp
Create Tool Router Session
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}`);
Connect to AI Agent
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}`);
Connect Linkedin API Tool with your Agent
Install Composio
npm install @composio/openai
Initialize Composio and Create Tool Router Session
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');
Execute Linkedin Tools via Tool Router with Your Agent
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);
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
Do I need my own developer credentials to use Linkedin with Composio?+
No, you can get started immediately using Composio's built-in Linkedin app. For production, we recommend configuring your own OAuth credentials.