EN
Developer guide

LinkedIn API and MCP: how to connect an AI agent to LinkedIn

In a LinkedIn API MCP setup, the MCP server turns API endpoints into tools an AI client can call. Unipile runs two: one for the coding agent that builds LinkedIn into your SaaS, one for the assistant where people use their own account.

Claude Codeclaude code · crm-appDeveloper MCP Build

Add a LinkedIn inbox to the contact page.

unipileread endpointGET /v2/{account_id}/chatsschema loaded

Added the inbox sync and the reply box.3 files changed · tested on the Development app

Unipile LinkedInLinkedIn account of the authenticated user
ChatGPTChatGPTUser MCP Use

Which LinkedIn messages still wait for my reply?

LinkedInLinkedInlist chats12 chats

Two people wait for you: Claire asked for the pricing deck, Marc proposed Thursday 3 pm.

Short answer

LinkedIn has an API, open only to approved partner programs, and no official MCP server. An MCP server is only the layer that lets an AI agent call an API: the API does the work on LinkedIn, on behalf of the authenticated user.

Unipile gives you both layers: a REST API, a developer MCP for coding agents such as Claude Code, Cursor and Codex, and a user MCP for ChatGPT, Claude and Grok.

The basics

What is MCP, and how does it relate to the LinkedIn API?

MCP (Model Context Protocol) is an open standard that lets an AI client discover and call external tools. On LinkedIn, an MCP server does not replace an API: it sits on top of one, and turns its endpoints into tools the model can pick.

1 · MCP client AI client ClaudeChatGPT and CodexCursorGemini CLI Reads the request and picks a tool.
2 · MCP server Tools list chatsview profilesend message Describes what the agent can do.
3 · API REST endpoints GET/v2/{account_id}/chats Runs the call with the right auth.
4 · Account LinkedIn LinkedIn Acts on behalf of the authenticated user.

The official LinkedIn API

LinkedIn opens messaging, search and Recruiter features only to partner programs most SaaS products cannot join. The LinkedIn API guide covers what each program gives access to.

No official LinkedIn MCP server

LinkedIn does not publish an MCP server. A hosted third-party server, such as the Unipile LinkedIn MCP server, gives AI clients tools backed by the Unipile LinkedIn API.

Unipile MCP

Two Unipile MCP servers: one to build, one to use

Unipile runs a developer MCP for coding agents that build LinkedIn features into your product, and a user MCP that brings your own LinkedIn account into an AI assistant. Both reach the same Unipile platform and the same linked accounts.

Developer MCPFor developers building a SaaS
Coding agentClaude Code, Cursor, Codex
API keyScoped, Development app first
Your users' accountsLinked through Hosted Auth
Your productCode that calls the REST API
User MCPFor people using an assistant
AI assistantChatGPT, Claude, Grok
OAuth sign-inNo API key in the client
ScopeSet by an Owner or Admin
Your own accountUsed in your chats
Unipile platform One API, the same linked accounts LinkedInClassic, Sales Navigator, Recruiter
Build LinkedIn into your product

Developer MCP

Your coding agent reads the Unipile API reference, writes the integration and tests it with a scoped API key on your Development application. In production, your code calls the REST API for the accounts your users linked.

Use your own LinkedIn in an assistant

User MCP

An Owner or Admin grants MCP Access and picks the Scope. Each person adds Unipile to ChatGPT, Claude, Grok or another remote MCP client and signs in with OAuth, with no API key in the assistant.

Compare

LinkedIn API or MCP: which one does your AI agent need?

Call the REST API from your backend for production workflows, use the developer MCP while you build, and use the user MCP when a person wants their own LinkedIn in an assistant.

REST APIRun in production Developer MCPBuild with a coding agent User MCPUse in an assistant
Who it's forREST APIYour backend and your productDeveloper MCPDevelopers building an integrationUser MCPEach person on your team
Where it runsREST APIYour servers, with the SDKs if you likeDeveloper MCPClaude Code, Cursor, Codex, Gemini CLIUser MCPChatGPT, Claude, Grok and other remote MCP clients
AuthenticationREST APIAPI key in the X-API-KEY header, server sideDeveloper MCPScoped Account API key; none to read the docs onlyUser MCPOAuth per person and per client, valid up to 30 days
Whose LinkedIn accountREST APIThe accounts your users linked through Hosted AuthDeveloper MCPTest accounts in your Development applicationUser MCPThe accounts in the person's Scope
When to use itREST APIInbox sync, CRM logging, a reply box in your appDeveloper MCPDesigning, writing and testing a LinkedIn featureUser MCPReading, sorting and answering your own LinkedIn in chat

Building a SaaS? Use the developer MCP while you write the feature, then the REST API once it ships. The user MCP serves people, not code.

Setup

How to connect LinkedIn to an AI agent, step by step

Three steps on each path: one ends with code in your product, the other with your own LinkedIn in your assistant.

Building a productDeveloper MCP, then the REST API
  1. Get a scoped API key

    In your Development application, create an Account API key scoped to your test accounts.

    Development appAccount API key

  2. Add the developer MCP to your coding agent

    Paste the configuration from the documentation into Claude Code, Cursor, Codex or Gemini CLI. Command on the Claude Code setup page.

  3. Let your users link LinkedIn

    Through Hosted Auth, each user links their own LinkedIn account and your app stores the account ID.

    LinkedInAccount linkedaccount_id

Using your own accountUser MCP in ChatGPT, Claude or Grok
  1. An admin grants MCP Access

    In the Dashboard, an Owner or Admin picks the person and the Scope of accounts they can use.

    MCP AccessScope: Sales team

  2. Add Unipile to your assistant

    Add Unipile as a custom connector with the URL from your Dashboard. Step by step for ChatGPT and Claude.

  3. Sign in and approve

    Authorize the client with OAuth. Consent lasts up to 30 days, revocable in My MCP accounts.

    Authorize this clientup to 30 daysAuthorize

Capabilities

What an AI agent can do on LinkedIn through Unipile

Both MCP servers sit on the same Unipile LinkedIn API, which covers LinkedIn Classic, Sales Navigator and Recruiter accounts. Each action runs on behalf of the authenticated user, with what their own seat allows.

Feature familyWhat the agent can doLinkedIn account
MessagingList chats and messages, send and reply, InMail, attachmentsClassicSales NavigatorRecruiter
Profiles and invitationsView profiles and company pages, send and manage invitationsClassic
PostsRead posts, comments and reactions; publish, comment and reactClassic
SearchPeople and company search with LinkedIn filters, lead search with a Sales Navigator seatClassicSales Navigator
RecruiterHiring projects, job postings and applicantsRecruiter
WebhooksNew messages, reactions, read receipts and account statusAll accounts

Seat-specific routes are detailed on the Sales Navigator MCP and LinkedIn Recruiter MCP pages. The full list lives on the Unipile LinkedIn API page.

Developer MCP

In a coding agent: a LinkedIn feature, written and tested

Describe the feature. The agent reads the exact schema, tests on your Development application and writes the code your product runs against the REST API.

Claude Codeclaude code · crm-app

Add a LinkedIn inbox to the contact page of our CRM.

unipilesearch endpoints"chats messages"3 matches

unipileread endpointGET /v2/{account_id}/chatsschema loaded

unipilerun requestGET /v2/{account_id}/chats/{chat_id}/messages200 OK

// src/linkedin/inbox.ts
export async function listChats(accountId, apiKey) {
  const res = await fetch(
    `https://api.unipile.com/v2/${accountId}/chats`,
    { headers: { 'X-API-KEY': apiKey } }
  );
  return res.json();
}

Added the inbox sync and a reply box on the contact page.3 files changed · tested on the Development app

User MCP

What you can ask your assistant about LinkedIn

Pick a chat to see the request, the Unipile calls the assistant makes on your own LinkedIn account, and the answer. Anything it writes stays a draft until you confirm.

ClaudeClaude

New chat Recent

Sort my unread LinkedIn messages by priority.

Unipile2 calls

  • LinkedInLinkedInlist chats18 unread
  • LinkedInLinkedInread messages18 threads

By priority:

  • High: Claire Lambert wants the pricing deck before Friday.
  • Medium: Marc Keller proposes a call on Thursday.
  • Low: 16 event invites and newsletters.

Draft a reply to ClaireAnswer Marc

Prepare my call with Marc Keller tomorrow.

Unipile2 calls

  • LinkedInLinkedInview profileMarc Keller
  • LinkedInLinkedInread messages7 messages

Your brief for the call:

  • Role: Head of Sales at Northwind since March.
  • Need: pricing for a team of 20.
  • Last message: Monday, he proposed Thursday at 3 pm.

Add talking pointsSuggest an opener

Claire never replied to my last message. Draft a follow-up.

Unipile2 calls

  • LinkedInLinkedInread chatClaire Lambert
  • LinkedInLinkedInprepare messageDraft ready

You sent the deck on Tuesday and Claire has not answered. A short follow-up:

LinkedInDraft to Claire Lambert

Hi Claire, did the deck answer your questions? Happy to go through it in 15 minutes this week.

ReviewNot nowNothing is sent until you confirm.

Sort my pending LinkedIn invitations.

Unipile2 calls

  • LinkedInLinkedInlist invitations received12 pending
  • LinkedInLinkedInview profiles12 profiles

Four look relevant: two work at clients, two in your market. Five are agencies, three have empty profiles. Your call:

LinkedInAccept 4 invitations

Julia Martin, Hugo Silva, Emma Novak and Ravi Shah. The other eight stay pending.

ReviewNot nowNothing changes until you confirm.

Which candidates replied to me this week?

Unipile2 calls

  • LinkedInLinkedInlist chatsThis week
  • LinkedInLinkedInread messages6 replies

Four candidates replied:

  • Ines Dubois is free for a call on Tuesday.
  • Tom Becker asks for the salary range.
  • Two others declined politely.

Draft a reply to TomBook a call with Ines

Draft a short comment on Julia Martin's latest post.

Unipile2 calls

  • LinkedInLinkedInlist postsJulia Martin
  • LinkedInLinkedInread comments14 comments

Julia announced her team's new onboarding flow yesterday. A comment for you to check:

LinkedInComment on Julia's post

Congrats on the launch, Julia. The new onboarding looks much simpler for first-time users.

ReviewNot nowNothing is sent until you confirm.

Reply to Claude

UnipileUnipile

Use it in your assistant

  1. 1An Owner or Admin gives you MCP Access and picks the accounts in your Scope.
  2. 2Link your LinkedIn account once in Unipile.
  3. 3Add Unipile as a custom connector in ChatGPT or Claude and approve with OAuth.
Good practice

How Unipile handles LinkedIn data and limits

An AI agent on LinkedIn sees and does what the linked account can do on linkedin.com, nothing more, whichever MCP server it goes through.

Data handling

Every call runs on behalf of the authenticated user, with the conversations, profiles and posts that user can already see. Unipile keeps no independent database of LinkedIn members.

How Unipile operates

Unipile is an independent technical intermediary. It is not affiliated with, endorsed by, or sponsored by LinkedIn. An assistant stays inside the Scope an admin sets.

Platform limits

LinkedIn's own limits on invitations, messages and searches still apply to every account. What to send, to whom and how often is a customer-side decision. See the limits on the LinkedIn MCP server page.

Build LinkedIn into your product with an AI agent

Start with the developer MCP and a Development application, then ship on the REST API. Your users link their own LinkedIn accounts, and the same API covers WhatsApp, Instagram, Telegram, email and calendars.

LinkedIn API and MCP: FAQ

Quick answers on the LinkedIn API, the two Unipile MCP servers and how to connect an AI agent.

LinkedIn has an API, but its messaging, search and Recruiter features sit behind partner programs, and it publishes no MCP server. The Unipile MCP servers fill the gap and act on behalf of each authenticated user. The LinkedIn MCP server page goes into the details.

Both, at different moments. Production code calls the REST API. A coding agent uses the developer MCP while it builds. A person who wants their own LinkedIn in ChatGPT, Claude or Grok uses the user MCP.

For a coding agent: create a scoped Account API key, add the developer MCP to Claude Code, Cursor, Codex or Gemini CLI, and let your users link LinkedIn through Hosted Auth. For an assistant: an admin grants MCP Access, you add Unipile as a custom connector and approve with OAuth.

The developer MCP serves developers: it gives a coding agent the Unipile API reference and test requests with an API key, to build LinkedIn features into a product. The user MCP serves people: it lets ChatGPT, Claude or Grok use the accounts in their Scope, with OAuth and no API key in the client.

The customer. Unipile is an independent technical intermediary: each action runs on behalf of the authenticated user and within LinkedIn's own limits. What is sent, to whom and how often is a customer-side decision.

No. Unipile is not affiliated with, endorsed by, or sponsored by LinkedIn. It is an independent technical intermediary: every call runs on behalf of the authenticated user who linked their own LinkedIn account.

Still have questions? Our team is here to help.

Talk to an expert