EN
MCP Server

Unipile MCP Server: build LinkedIn, WhatsApp and email integrations with an AI coding agent

Give Codex, Cursor, Claude Code or Gemini CLI an agent that understands the Unipile API. It finds the right endpoints, writes the integration into your project and tests it on a Development application, for LinkedIn, WhatsApp, Instagram, Telegram, Gmail, Outlook, IMAP and calendars.
Codex
Cursor
Claude Code
Gemini CLI
Windsurf
Any MCP client
Start with a Development application. 7-day free trial, no credit card.
Your coding agent
Unipile MCP connected
Sarah
Add LinkedIn account connection to my CRM. Users must link their own account from the Settings page.
Read endpointPOST /v2/auth/linkschema loaded
Added POST /api/accounts/connect on the backend: it creates the hosted auth link and returns the URL. The Settings page opens it and stores the account ID on return.
3 files changed · tested on the Development app
Now sync each user's LinkedIn inbox into the contact timeline.
Run requestGET /v2/{account_id}/chats200 OK
Writing the sync job
Describe the next feature…
Nine channels, one server

One MCP server, every channel your product needs

Whether you need a LinkedIn MCP, a WhatsApp MCP, an email MCP or a calendar MCP, it is one server, one scoped key and the same common routes. Tell your coding agent what to build; it finds the endpoints behind it and writes the code in your project.
LinkedIn

LinkedIn

Classic, Recruiter and Sales Navigator accounts
"Add LinkedIn messaging and Sales Navigator search to my ATS."
What your agent can build with
Read, sync and send messages and InMails
Search people and companies, including Sales Navigator
Retrieve profiles and send connection requests
WhatsApp

WhatsApp

Personal and Business accounts, no per-message fee
"Let my CRM users send and receive WhatsApp from their own number."
What your agent can build with
Send and receive messages, attachments included
List groups, members and group messages
Sync conversation history in real time
GmailOutlookIMAP

Email

Gmail, Outlook and any IMAP mailbox
"Build a shared inbox that syncs Gmail, Outlook and IMAP mailboxes."
What your agent can build with
List, read and search emails and threads
Send, reply and forward from the user's mailbox
Handle attachments, folders and drafts
Instagram

Instagram

Direct messages on connected accounts
"Add Instagram DMs to our customer support console."
What your agent can build with
Read and reply to direct messages
Sync conversation history and contacts
Retrieve profile data on connected accounts
Telegram

Telegram

User accounts, not bots
"Sync Telegram groups into the team activity feed."
What your agent can build with
Send and receive messages in chats and groups
Sync history and attachments
List contacts and group members
Google CalendarOutlook Calendar

Calendar

Google Calendar and Outlook Calendar
"Book meetings from a conversation into the user's Google or Outlook calendar."
What your agent can build with
List calendars and events
Create, update and delete events
Find free slots from existing events
Quick start

Add Unipile to your coding agent in one line

The Unipile MCP server is hosted, with one URL for every channel. Point your coding agent at it with a scoped API key, and it reads the API contract and runs requests against your Development application. The snippets below are the ones from the official documentation.
Cursor~/.cursor/mcp.json
Claude Codeclaude mcp add --transport http …
Codex CLI and IDE extension~/.codex/config.toml
Gemini CLI~/.gemini/settings.json
Windsurf~/.codeium/windsurf/mcp_config.json
~/.cursor/mcp.json
# Register the hosted Unipile MCP server in Claude Code claude mcp add --transport http --scope user \ unipile "https://developer.unipile.com/mcp?branch=v2.0" \ --header "X-API-KEY: your-scoped-api-key" # Verify the connection, or type /mcp inside a session claude mcp list
{ "mcpServers": { "unipile": { "url": "https://developer.unipile.com/mcp?branch=v2.0", "headers": { "X-API-KEY": "your-scoped-api-key" } } } }
{ "mcpServers": { "unipile": { "url": "https://developer.unipile.com/mcp?branch=v2.0", "headers": { "X-API-KEY": "your-scoped-api-key" } } } }
# Codex CLI and the Codex IDE extension share this file [mcp_servers.unipile] url = "https://developer.unipile.com/mcp?branch=v2.0" http_headers = { X-API-KEY = "your-scoped-api-key" } # Verify: codex mcp list
{ "mcpServers": { "unipile": { "httpUrl": "https://developer.unipile.com/mcp?branch=v2.0", "headers": { "X-API-KEY": "your-scoped-api-key" } } } } # Verify: /mcp inside Gemini CLI
Server connected. Your coding agent now reads the Unipile API contract and can run requests on your Development app.
1
Start with a Development applicationIn the Unipile dashboard, work in your Development application: create a Scope with your test accounts and a scoped Account API key for it. Production stays untouched, and an MCP client never gets a global or Service key.
2
Add the server to your coding agentPaste the config for your client, with the scoped key in the X-API-KEY header. Restart the client if it does not pick it up right away.
3
Describe the feature, review the codeAsk for the integration you need. The agent reads the endpoints, writes the code in your project and runs requests on the Development app. Switch the key to Production when the flow passes.
Prompts, not glue code

What your coding agent builds with it

Pick an integration job. Each transcript shows the prompt you give the agent, the Unipile endpoints it reads and runs through the MCP server, and what lands in your project. Paths are complete, on the API base URL https://api.unipile.com, with a scoped key in the X-API-KEY header.
Cursor · ats-appDevelopment app
Add LinkedIn messaging to my ATS: sync each recruiter's inbox and let them reply from the candidate page.
Search endpoints"chats messages send"3 matches
Run requestGET /v2/{account_id}/chats12 chats
Created linkedin/inbox-sync.ts (polls chats and messages, upserts them on the candidate) and POST /candidates/:id/reply, which calls the send route with the chat's own account ID. Ran the sync on the Development app: 12 chats, 87 messages imported.3 files changed · tested on the Development app

A LinkedIn inbox inside your product, from one prompt

The agent reads the chat and message contracts, writes the sync job and the reply endpoint in your stack, and runs the first requests on your Development application. Instagram, WhatsApp and Telegram use the same chat routes, so the second channel is a smaller prompt than the first.
Endpoints the agent uses
GET/v2/{account_id}/chatsGET/v2/{account_id}/chats/{chat_id}/messagesPOST/v2/{account_id}/chats/{chat_id}/messages/send
Common mistake: mixing IDs. A message is always sent on the account that owns the chat; keep account_id and chat_id together from the list call to the send call.
Build a LinkedIn integration
Claude Code · crm-appDevelopment app
Implement Unipile Hosted Auth in this React and Fastify app so users connect their own LinkedIn account from Settings.
Read endpointPOST /v2/auth/linkschema loaded
Run requestPOST /v2/auth/link201 · link
Added POST /api/accounts/connect in Fastify: it creates the auth link server-side and returns the hosted URL. The React Settings page opens it and, on return, stores the new account_id on the workspace. Verified on the Development app with a test LinkedIn account.4 files changed · connect flow tested end to end

Your users connect their own accounts, your app gets an account ID

Hosted Auth is the page Unipile serves to your users so they link LinkedIn, WhatsApp, Gmail, Outlook or a calendar themselves. The agent wires the link creation on your backend, the redirect on your frontend and the storage of the account ID, which every later request needs.
Endpoints the agent uses
POST/v2/auth/linkPOST/v2/auth/intentGET/v2/accounts/{account_id}
Common mistake: creating the auth link from the browser. The link is created on your server with your key; the frontend only receives the hosted URL.
Implement Hosted Auth with an agent
Codex · support-consoleDevelopment app
Build a unified LinkedIn, WhatsApp and Email inbox for our support console, one thread list with the channel as a badge.
Search endpoints"inbox chats emails"5 matches
Run requestGET /v2/{account_id}/emails200 OK
Added a Thread model that maps chats and email threads to one shape (channel, participants, last message, unread), a sync worker per connected account, and the thread list with channel badges. Cursor-based pagination on both routes. Tested with 3 accounts on the Development app.6 files changed · 3 channels in one list

One thread list for messaging and email

Chats (LinkedIn, WhatsApp, Instagram, Telegram) and emails (Gmail, Outlook, IMAP) come from two families of routes with one schema each. The agent reads both contracts, designs the common model and writes the sync so your product shows one inbox whatever the channel.
Endpoints the agent uses
GET/v2/{account_id}/inboxesGET/v2/{account_id}/chatsGET/v2/{account_id}/emailsGET/v2/{account_id}/threads/{thread_id}
Common mistake: re-fetching whole inboxes on every refresh. Paginate with the cursor the API returns and let webhooks bring the new messages.
Build a unified inbox with an agent
Cursor · crm-appDevelopment app
Subscribe to new-message webhooks and update the contact timeline in real time.
Read endpointPOST /v2/webhooks/endpoints/schema loaded
Run requestPOST /v2/webhooks/endpoints/201 · endpoint
Registered a webhook endpoint for message events on the Development app, added POST /webhooks/unipile that returns 200 immediately and pushes the event to a queue, and the worker that appends the message to the contact timeline. Sent a test message: the timeline updated in under a second.3 files changed · event received and processed

Real time without polling

Unipile pushes events (new message, new email, account status) to the endpoint you register. The agent creates the endpoint, writes the receiver in your framework and the processing job, then checks the delivery log through the webhook conversations route.
Endpoints the agent uses
POST/v2/webhooks/endpoints/GET/v2/webhooks/endpoints/GET/v2/webhooks/conversations/
Common mistake: doing the work inside the webhook handler. Acknowledge with a 2xx right away and process the event asynchronously, or deliveries time out and retry.
Wire webhooks with an agent
Gemini CLI · saas-backendDevelopment app
Each workspace in my SaaS has several users with their own LinkedIn and email accounts. Isolate them: one Scope and one scoped key per workspace.
Search endpoints"scopes api-keys"4 matches
Run requestPOST /v2/scopes/201 · scope
On workspace creation the backend now creates a Scope, a scoped Account API key stored encrypted on the workspace, and every account a member connects is assigned to that Scope. All account calls use the workspace key, so one tenant can never read another tenant's accounts. Tested with two workspaces on the Development app.5 files changed · isolation verified

Many users, many accounts, one boundary per tenant

Scopes are the access boundary of the Unipile API: a scoped key only sees the accounts assigned to its Scope. The agent turns that into your tenant model, so the multi-account logic lives in the API rather than in your code.
Endpoints the agent uses
POST/v2/scopes/POST/v2/api-keys/GET/v2/accounts/
Common mistake: using one global Account key for every tenant. The global key stays on your backend for administration; each tenant gets its own scoped key.
Accounts, Scopes and keys
Claude Code · crm-appDevelopment app
Handle account reconnect and checkpoint states, and show the right message to the user instead of a silent failure.
Read endpointGET /v2/accounts/{account_id}schema loaded
Read endpointPOST /v2/auth/checkpointschema loaded
Mapped the account status values to three UI states (connected, needs a code, needs reconnection), added the checkpoint form that submits the code the user receives, and the reconnect action that reopens Hosted Auth for that account. Status changes arrive by webhook, no polling.4 files changed · checkpoint flow tested

The states every provider integration has to handle

Sessions expire, providers ask for a verification code, users change their password. The account status and the checkpoint routes carry those states; the agent maps them to your UI so users know what to do, and your code never retries blindly.
Endpoints the agent uses
GET/v2/accounts/{account_id}POST/v2/auth/checkpointPOST/v2/auth/checkpoint/resend
Common mistake: retrying a checkpoint in a loop. The code comes from the end user; ask once, submit once, and wait for the status event.
Account states in the documentation
Development to production

Where the agent runs, and on whose accounts

While you build, the agent works on your Development application with test accounts and a scoped key. In production, your users connect their own LinkedIn, WhatsApp, mailbox or calendar through Hosted Auth, and your code calls the same routes on their behalf.
1 · Your coding agent Codex, Cursor, Claude Code Reads the prompt, picks an endpoint
2 · Unipile MCP server Hosted, one scoped key Reads the contract, runs the request
3 · Unipile API One schema, nine channels Scoped to one account ID
4 · Provider LinkedIn, WhatsApp, Gmail LinkedInWhatsAppInstagramGmailOutlook Each provider's own rules and limits apply
5 · The user's account The user Connected through Hosted Auth Their inbox, their contacts, their limits
unipile-mcp · server cardLive
A hosted Model Context Protocol server that exposes the Unipile API to coding agents, generated from the same OpenAPI specification as the REST API.
Endpointhttps://developer.unipile.com/mcp?branch=v2.0
TransportStreamable HTTP (remote, nothing to install)
AuthHeader X-API-KEY, scoped Account API key
ActionsEvery Unipile API operation: chats and messages, emails, calendars, profiles and invitations, posts, LinkedIn search, Sales Navigator, Recruiter
ChannelsLinkedIn, WhatsApp, Instagram, Telegram, Gmail, Outlook, IMAP, Google Calendar, Outlook Calendar
ClientsCodex CLI, Cursor, Claude Code, Gemini CLI, Windsurf, any MCP client
EnvironmentsDevelopment application to build and test, Production for your users
ScopeOnly the accounts assigned to the key's Scope, one account ID per request
UpdatesAutomatic: regenerated from every OpenAPI release, nothing to maintain
Connected by the user Each end user links their own account through hosted authentication. Unipile keeps the session; your agent only ever receives an account ID.
One key, scoped by account Create a Scope with only the accounts the agent should reach, and a scoped Account API key for it. The agent cannot touch any other account, and you revoke the key from the dashboard at any time.
User-initiated workflows Actions run inside workflows the user starts and controls, within the limits each provider enforces. See how this applies to LinkedIn accounts.
Test on Development first Build and test on your Development application with test accounts; switch the key to Production when the flow passes. Nothing the agent tries while building touches a real user. Security and compliance.
The API, as the agent reads it

The whole Unipile API, readable by your coding agent

The server exposes the Unipile API itself: 179 operations across nine channels, the same ones your product will call over REST once the agent has written the code. An operation is one HTTP method on one path of the Unipile API v2. Paths below are complete, on the API base URL https://api.unipile.com, with the scoped key in the X-API-KEY header.
179operations in the Unipile API v2, readable and runnable by the agent
9channels: LinkedIn, WhatsApp, Instagram, Telegram, Gmail, Outlook, IMAP, Google and Outlook calendars
1server URL and one scoped key for every channel
0glue code to maintain: the server is regenerated from every API release
25 operations
Messages and conversations LinkedIn, WhatsApp, Instagram and Telegram share the same chat routes: list the inbox, read a thread, start a chat, send, forward, react, manage participants.
GET/v2/{account_id}/chats
GET/v2/{account_id}/chats/{chat_id}/messages
POST/v2/{account_id}/chats/{chat_id}/messages/send
"Add a reply box to the conversation view that sends on the right channel."
23 operations
Emails, threads, drafts, folders Gmail, Outlook and IMAP through one schema: list and read emails, send, reply in the thread, create drafts, move between folders, list contacts.
GET/v2/{account_id}/emails
GET/v2/{account_id}/emails/{email_id}
POST/v2/{account_id}/emails/send
"Sync each mailbox into the CRM timeline and thread the replies."
13 operations
Calendars and events Google and Outlook calendars: list calendars and events, create, update, cancel or restore an event, respond to an invitation.
GET/v2/{account_id}/calendars
GET/v2/{account_id}/calendars/{calendar_id}/events
POST/v2/{account_id}/calendars/{calendar_id}/events
"Let users book a meeting from a chat and create it in their calendar."
14 operations
Profiles, invitations, network Read a LinkedIn profile, send or accept a connection request, list pending invitations, relations, followers, follow a member.
GET/v2/{account_id}/users/{user_id}
POST/v2/{account_id}/users/me/relation-requests
GET/v2/{account_id}/users/{user_id}/relations
"Enrich a contact from their LinkedIn profile and offer a connection request."
20 operations
Posts, comments, reactions List a member's posts, read comments and reactions, publish a post or a story, comment or reply, from the connected LinkedIn or Instagram account.
GET/v2/{account_id}/users/{user_id}/posts
GET/v2/{account_id}/posts/{post_id}/comments
POST/v2/{account_id}/posts
"Show who commented on a company post in the engagement dashboard."
60 operations
LinkedIn search, Sales Navigator, Recruiter, jobs People, company, post and job searches with LinkedIn filters, Sales Navigator lead lists, Recruiter projects and pipelines, job postings and applicants, company pages, InMail credits.
POST/v2/{account_id}/linkedin/search/people
POST/v2/{account_id}/linkedin/sales-navigator/search/people
POST/v2/{account_id}/linkedin/recruiter/projects/{project_id}/pipeline
"Add a Sales Navigator search screen with saved lead lists."Build a LinkedIn integration
One complete request, exactly as the agent runs it
POSThttps://api.unipile.com/v2/{account_id}/chats/{chat_id}/messages/sendX-API-KEY: your-scoped-api-key200 OK
The server follows every Unipile API release, so a new endpoint reaches your agent the day it ships, on every channel through the same common routes. Accounts, hosted auth, scopes and webhooks (23 more operations) are available to the agent as well. Full contracts in the API reference.
Same API, two moments

MCP to build, REST to run

The MCP server is how your coding agent understands and tests the Unipile API. The REST API and the SDKs are what the generated code calls in production. Same endpoints, same scoped key, one before the commit and one after.
REST API, in your productProduction
send-linkedin-message.js
// Your app decides when and what to send const res = await fetch(`https://api.unipile.com/v2/${accountId}/chats/${chatId}/messages/send`, { method: 'POST', headers: { 'X-API-KEY': API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ text: 'Thursday 3 pm works for the demo.' }) }); // Same call for WhatsApp, Instagram, Telegram chats
MCP server, in your coding agentBuild and test
cursor · agent
Implement the send endpoint for the conversation view, with the exact body schema.
Read endpointPOST /v2/{account_id}/chats/{chat_id}/messages/sendschema loaded
Run requestPOST /v2/{account_id}/chats/{chat_id}/messages/send200 OK · Development
Added sendMessage() in messages.ts with the body schema from the contract, and a test against the Development app. Ready for review.
Use the MCP server when
You are building or changing an integration with a coding agent, and want it to read the real contract instead of guessing.
You are exploring what the API can do before designing a feature: which routes, which fields, which limits.
You are reviewing an existing integration for wrong IDs, missing pagination or unsafe retries.
Use the REST API when
The code runs in production: inbox sync, sequences, CRM logging, a reply box in your product.
You need webhooks, background sync and high volume across thousands of connected accounts.
Determinism and cost matter: the generated code calls the API directly, with the SDKs when they fit. The MCP server stays in the toolbox for the next feature.
Coding agents

Works with Codex, Cursor, Claude Code and Gemini CLI

Any coding agent that speaks the Model Context Protocol over HTTP can use the server. Every client below takes a scoped API key in the X-API-KEY header, with the configuration published in the official documentation.
CodexCodex CLI and the Codex IDE extension
API key · supported Add the server to ~/.codex/config.toml with http_headers, then run codex mcp list to verify. From there, describe the feature and let Codex read the Unipile contract before it writes code. Connect Unipile to Codex
Cursor~/.cursor/mcp.json
API key · supported Add the server to mcp.json and the agent panel lists the Unipile actions. Build and test the integration from the editor, against your Development application. Add Unipile to Cursor
Claude CodeOne command, user scope
API key · supported One claude mcp add command with the header, then /mcp inside a session to check the connection. Connect to Claude Code
Gemini CLI~/.gemini/settings.json
API key · supported Gemini CLI reads remote servers from settings.json with httpUrl and custom headers. Add the Unipile URL and the X-API-KEY header, then /mcp lists the server. Add to Gemini CLI
Windsurf~/.codeium/windsurf/mcp_config.json
API key · supported Same JSON block as Cursor, in the Windsurf config file. Documented in the official Unipile MCP docs. MCP documentation
Any MCP clientFrameworks and custom agents
Streamable HTTP · header auth The OpenAI Agents SDK, the Claude Agent SDK, LangChain, LlamaIndex, CrewAI or your own MCP client: point it at the URL, pass X-API-KEY, and the Unipile API is readable and runnable from your agent. Server details
Official SDKs and integrations

From the agent to your product: official SDKs and integrations

The hosted MCP server is how your coding agent understands the Unipile API. When the code it wrote goes to production, the same API is available through the official SDKs and the no-code connectors.
Official SDK
Node.js / TypeScript Typed client for the whole API, the same endpoints the agent discovers through MCP. npm install unipile-node-sdk
Official SDK
Python The official Python SDK for the Unipile API v2, for agent frameworks and backends written in Python.
No-code
n8n The official Unipile node for n8n: LinkedIn Classic, Sales Navigator and Recruiter, messaging, email, calendar and posts as ready-made operations. Install @unipile/n8n-nodes-unipile from Community nodes.
No-code
Make The Unipile app for Make, to connect LinkedIn, WhatsApp, email and calendar actions to the rest of your stack.
All of these are maintained by Unipile under the unipile organization on GitHub and npm. The hosted server lives at https://developer.unipile.com/mcp, with its registry manifest and setup guide in unipile/unipile-mcp.

Discover More from Our API Suite

The MCP server sits on top of the same API your product can call directly. Explore the messaging, email and calendar APIs, and the LinkedIn API, to build the features your agent will use.
WhatsApp
Instagram
Telegram

Messaging API

Connect WhatsApp, Instagram and Telegram to send, receive, and manage conversations programmatically. Build unified inbox features and conversation workflows in your app.
Gmail
Outlook
IMAP

Email API

Integrate Gmail, Outlook, and IMAP providers to send, receive, and sync emails in real time. Build powerful email features with tracking, threading, and attachment support.
Google Calendar
Outlook Calendar

Calendar API

Sync Google Calendar and Outlook events in real time. Create, update, and manage meetings directly from your product. Ideal for scheduling features and CRM integrations.

Unipile MCP Server FAQ

Straight answers on what the server is, what your coding agent can do with it, which clients work, and what it costs.
An MCP server is a program that exposes tools to an AI model through the Model Context Protocol, an open standard introduced by Anthropic in late 2024 and now supported by Codex, Cursor, Claude Code, Gemini CLI, Windsurf, VS Code and most agent frameworks. The client asks the server which tools exist, the model picks one, the server runs it and returns the result. The Unipile MCP server exposes the Unipile API this way, so a coding agent can read the contract, run requests and write the integration for the messaging, email and calendar accounts your users connect.
Read the Unipile API contract and run requests against your application. In practice it finds the right endpoints for a feature (chats and messages, emails, profiles and invitations, LinkedIn, Sales Navigator and Recruiter searches, posts, calendar events), writes the integration in your project with the exact schemas, and tests it on your Development application with a scoped key. It covers LinkedIn, WhatsApp, Instagram, Telegram, Gmail, Outlook, IMAP and calendars through the same common routes.
Every client that supports remote MCP servers over HTTP with a custom header: Codex CLI and the Codex IDE extension, Cursor, Claude Code, Gemini CLI, Windsurf, and agent frameworks such as the OpenAI Agents SDK, the Claude Agent SDK, LangChain, LlamaIndex or CrewAI. The configuration for each one is in the official documentation and on the client pages of this site.
You paste a short configuration into your coding agent and describe the feature you want, in plain language. The agent writes the integration code; you review it like any pull request. The MCP server is a build-time tool: in production your product calls the REST API or the SDKs directly.
Use the MCP server while building: the agent reads the contract, generates the code and tests it on a Development application. Use the REST API and the SDKs for what runs in production: inbox sync, sequences, CRM logging, webhooks across thousands of accounts. Same endpoints, same scoped key.
While you build, the test accounts of your Development application, through a scoped key. In production, only the accounts your users connected through hosted authentication: your code receives account IDs, not credentials, and every action is scoped to one account and performed on behalf of that user, inside workflows the user initiates and controls. Unipile is not affiliated with LinkedIn, Meta, Google or Microsoft, and each provider's own limits apply.
Use a scoped Account API key on your Development application: create a Scope in the dashboard with only the test accounts, and a key for that Scope. The agent cannot touch any other account, and you revoke the key from the dashboard at any time. Production accounts only enter the picture when your reviewed code ships with its own scoped keys. Unipile is SOC 2 Type II certified and GDPR compliant.
The MCP server is included in every Unipile plan. Billing is per connected account, whatever the channel and however many requests the agent makes: from 49 EUR per month for up to 10 accounts, then 5 EUR per additional account, down to 3 EUR at volume, with no per-message or per-call fee. The 7-day free trial needs no credit card. Full grid on the pricing page.