Skip to content

Connect Unipile to Claude: Sync unified emails and calendar events

Learn how to connect Unipile to Claude using a managed MCP server. Give your AI agents secure, authenticated access to unified messaging, calendars, and LinkedIn.

Sidharth Verma Sidharth Verma · · 9 min read
Connect Unipile to Claude: Sync unified emails and calendar events

If you need to connect Unipile to Claude to sync unified emails, automate LinkedIn prospecting, or manage multi-provider calendar events, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's LLM tool calls and Unipile's REST API. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL. If your team uses ChatGPT, check out our guide on /connect-unipile-to-chatgpt-automate-messaging-linkedin-recruiting/ or explore our broader architectural overview on /connect-unipile-to-ai-agents-automate-outreach-and-linkedin-search/.

Giving a Large Language Model (LLM) read and write access to an omnichannel messaging API like Unipile is an engineering challenge. Unipile acts as an abstraction layer over wildly different ecosystems - WhatsApp, LinkedIn, Google Workspace, Microsoft 365, and IMAP. You have to handle complex authentication checkpoints, map sprawling unified schemas to MCP tool definitions, and deal with strict underlying provider rate limits.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Unipile, connect it natively to Claude Desktop, and execute complex messaging and scheduling workflows using natural language.

The Engineering Reality of the Unipile API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against a multi-provider abstraction API like Unipile is painful.

If you decide to build a custom Unipile MCP server, here are the specific integration challenges you will face:

Complex Headless Auth Checkpoints Unipile handles integrations like LinkedIn and WhatsApp by managing headless browser sessions and mobile app pairing. This means the authentication flow is not a simple OAuth redirect. When connecting an account, the API frequently returns "checkpoints" - challenges requiring the user to scan a QR code, input a 2FA OTP, or solve a CAPTCHA. An LLM cannot natively handle this async polling process. The MCP server must expose specific tools (create_a_unipile_auth_checkpoint, create_a_unipile_checkpoint_request) to allow the agent to facilitate these state transitions if you are building account-linking agents.

Opaque Sub-Provider Rate Limiting Because Unipile wraps multiple underlying networks, your rate limit is dictated by the upstream provider. A LinkedIn search query has vastly different quota constraints than a Gmail message fetch. When an upstream API aggressively throttles a request, Unipile returns an HTTP 429 Too Many Requests.

It is critical to note: Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream API returns an HTTP 429, Truto passes that error directly to the caller. Truto normalizes the upstream rate limit info into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec. Your AI agent or MCP client is completely responsible for interpreting these errors, applying exponential backoff, and deciding whether to abandon the workflow.

Binary Attachment Handling Omnichannel messaging APIs deal heavily with attachments - resumes on LinkedIn, PDFs via email, images via WhatsApp. Unipile standardizes the message payload, but retrieving the actual file requires fetching from a private_picture_download_url or a specific attachment endpoint. These endpoints return raw binary data, not JSON objects. Passing raw binary streams back through the JSON-RPC-based MCP protocol directly to an LLM will crash the context window. Your MCP architecture must handle intermediary storage or base64 encoding strategies for these specific endpoints.

Generating the Unipile MCP Server

Instead of hardcoding tool schemas for every Unipile endpoint, Truto dynamically derives MCP tools from the integration's documented API resources. If a Unipile endpoint has documentation describing its parameters, it becomes an AI tool. If the schema changes, the tool updates automatically.

Truto creates a secure, dedicated MCP server scoped entirely to a single Unipile linked account. You can spin up this server via the Truto dashboard or programmatically via the API.

Method 1: Via the Truto UI

For internal tooling, one-off agents, or testing, the UI is the fastest path:

  1. Log into your Truto account and navigate to the Integrated Accounts section.
  2. Select your connected Unipile account.
  3. Click the MCP Servers tab.
  4. Click Create MCP Server.
  5. Select your desired configuration. You can optionally filter by specific methods (e.g., only allow read operations) or tags (e.g., only expose messaging or calendar endpoints).
  6. Copy the generated MCP server URL (e.g., https://api.truto.one/mcp/a1b2c3d4e5f6...).

Method 2: Via the API

For production applications where you need to spin up AI agents dynamically for your end-users, you can generate MCP servers programmatically.

Send a POST request to /integrated-account/:id/mcp. You can pass a configuration object to strictly define what the AI agent is allowed to do.

curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Unipile Sales Agent Server",
    "config": {
      "methods": ["read", "write"],
      "tags": ["linkedin", "messaging"]
    },
    "expires_at": "2026-12-31T23:59:59Z"
  }'

The Truto API will validate that the integration has available tools matching your filters, generate a cryptographically secure token, store it in a distributed key-value store, and return a payload with the ready-to-use URL:

{
  "id": "mcp_srv_987654321",
  "name": "Unipile Sales Agent Server",
  "config": {
    "methods": ["read", "write"],
    "tags": ["linkedin", "messaging"]
  },
  "expires_at": "2026-12-31T23:59:59Z",
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f67890bcdef"
}

This URL is completely self-contained. It encodes the tenant, the connected Unipile account, and the security constraints.

Connecting the Unipile MCP Server to Claude

Once you have the Truto MCP URL, providing Claude with access to Unipile takes seconds. No OAuth dancing, no token refreshes, no SDK wrangling.

Method A: Via the Claude UI

If you are using Claude Desktop (or similar web-based AI clients that support custom connectors like ChatGPT):

  1. Copy the MCP server URL from Truto.
  2. In Claude, navigate to Settings -> Integrations -> Add MCP Server (or in ChatGPT: Settings -> Apps -> Advanced settings -> Custom connectors).
  3. Name the connector (e.g., "Unipile Production").
  4. Paste the URL and click Add.

Claude will perform the initial handshake, request the list of tools, and immediately populate them into its available context.

Method B: Via Manual Config File (Claude Desktop)

If you prefer to define your servers declaratively for Claude Desktop, you can add the Truto URL to your claude_desktop_config.json file. Because Truto MCP servers use the standard Server-Sent Events (SSE) transport over HTTPS, you can use the official @modelcontextprotocol/server-sse package as the command.

{
  "mcpServers": {
    "unipile-production": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/a1b2c3d4e5f67890bcdef"
      ]
    }
  }
}

Restart Claude Desktop. The model now has real-time access to the Unipile linked account.

Hero Tools for AI Agents

Unipile offers dozens of endpoints for managing omnichannel communications. When exposed as MCP tools, these endpoints unlock powerful autonomous workflows.

Here are the most critical "hero tools" generated by Truto for Unipile.

list_all_unipile_linkedin_jobs

Allows the AI agent to list LinkedIn job postings created by the linked account, filtering by state (open, closed, drafted). Essential for building recruiting agents that monitor open reqs.

"Claude, check our connected Unipile account and list all the currently OPEN LinkedIn jobs. Give me the job IDs and application counts."

create_a_unipile_messages_send

The core outbound messaging tool. Sends a message to an existing chat thread across any provider (LinkedIn, WhatsApp, Email, etc.). It abstracts the provider logic entirely - the agent just needs the chat_id and the text payload.

"Send a follow-up message to the chat ID 'chat_8832' saying 'Hi David, checking in on the proposal we sent over yesterday. Let me know if you have questions.'"

list_all_unipile_emails

Fetches a paginated list of emails from the connected account across all folders. The agent can use search parameters like q, from, or to to filter messages, making it perfect for inbox triage.

"Search my inbox for recent emails from 'billing@vendor.com' and summarize any outstanding invoices."

Executes a LinkedIn Classic search using a search URL on behalf of the linked account. This allows the AI to prospect for people, companies, or posts natively.

"Run a LinkedIn search for 'VP of Engineering in San Francisco' using the standard search URL format. Extract the top 5 profiles."

create_a_unipile_calendar_event

Creates a calendar event on a specific calendar (Google, Outlook, IMAP). The agent can handle parsing natural language times into the required ISO formats and populating attendees.

"Schedule a 45-minute technical screen with sarah@example.com for next Tuesday at 2 PM PST on my primary calendar."

list_all_unipile_recruiter_search_people

If the linked account has a LinkedIn Recruiter seat, this tool allows the agent to execute highly targeted recruiter searches using complex facets like skills, current companies, and seniority.

"Use the Recruiter search tool to find software engineers who currently work at Stripe or Plaid, and who have 'Python' listed in their skills."

create_a_unipile_users_relation_request

Sends a connection request from the linked account to another user on the network, optionally including a personalized connection message.

"Send a connection request to user ID 'usr_5541'. Include a short, professional note mentioning we are both in the B2B SaaS space."

For the complete list of available tools, query schemas, and required parameters, refer to the Unipile integration page.

Workflows in Action

By chaining these tools together, Claude can execute complex, multi-step operations that previously required dedicated software platforms. Here are two real-world examples.

Autonomous B2B Prospecting

An SDR wants to find relevant prospects on LinkedIn, send them a connection request, and log the outreach.

"Claude, search LinkedIn for 'Director of Marketing' at healthcare companies. Pick the top result, send them a connection request with a personalized note about AI in healthcare, and let me know when it's done."

Tool Execution Sequence:

  1. list_all_unipile_search_search_people: Claude calls the search tool with parameters targeting "Director of Marketing" and "Healthcare". It parses the response to find the top profile's user_id.
  2. create_a_unipile_users_relation_request: Claude constructs a short, relevant message and sends the connection request using the retrieved user_id.

Result: The agent autonomously discovers a lead and initiates contact, eliminating the manual clicking and typing out of connection notes.

sequenceDiagram
    participant User as User
    participant Claude as Claude
    participant TrutoMCP as Truto MCP
    participant Unipile as Unipile API

    User->>Claude: "Find marketing directors in healthcare..."
    Claude->>TrutoMCP: Call list_all_unipile_search_search_people
    TrutoMCP->>Unipile: GET /v1/users/search
    Unipile-->>TrutoMCP: Return profiles
    TrutoMCP-->>Claude: JSON array of prospects
    Claude->>TrutoMCP: Call create_a_unipile_users_relation_request
    TrutoMCP->>Unipile: POST /v1/users/relation
    Unipile-->>TrutoMCP: 200 OK (Request sent)
    TrutoMCP-->>Claude: Success confirmation
    Claude-->>User: "Connection request sent to John Doe."

Candidate Interview Scheduling

A recruiting coordinator asks the AI to find an applicant's email, check calendar availability, and propose times.

"Claude, check my recent emails from the candidate Sarah Smith. Find the email where she asks for interview times. Then, check my calendar for open slots next Wednesday and send her an email proposing those times."

Tool Execution Sequence:

  1. list_all_unipile_emails: Claude searches the inbox for messages from Sarah Smith.
  2. list_all_unipile_calendar_events: Claude checks the primary calendar ID for events occurring next Wednesday to determine free blocks.
  3. create_a_unipile_emails_send: Claude composes an email offering the open time slots and sends it to Sarah.

Result: The agent seamlessly crosses the boundary between email and calendar systems, handling the context-heavy task of schedule reconciliation.

Security and Access Control

Giving AI agents access to unified communications infrastructure requires strict security boundaries. Truto provides multiple mechanisms to lock down MCP servers:

  • Method Filtering: By defining methods: ["read"] during creation, the server drops all POST, PATCH, and DELETE tools at generation time. The agent cannot send emails, delete events, or post messages.
  • Tag Filtering: Limit the server to specific domains. Using tags: ["calendar"] ensures the agent only sees calendar-related endpoints, completely walling off the LinkedIn or Email APIs.
  • API Token Authentication: Enabling require_api_token_auth forces the client to pass a valid Truto API token in the Authorization header. This prevents unauthorized execution even if the MCP server URL is leaked in a log file.
  • Automatic Expiration: Setting an expires_at timestamp ensures the server self-destructs. The database record and the underlying key-value tokens are wiped automatically by a background cleanup task, ideal for temporary agent sessions.

Escaping the API Abstraction Trap

Building an AI agent that can reliably navigate omnichannel messaging, LinkedIn prospecting, and calendar management requires a translation layer. Unipile does the heavy lifting of standardizing the underlying providers, but formatting that massive API surface area into clean, deterministic MCP tools is a separate burden.

By leveraging Truto, you bypass the need to write JSON-RPC handlers, manage webhook endpoints, or manually map complex JSON schemas. You generate an authenticated URL, plug it into Claude, and immediately start executing cross-platform workflows.

FAQ

How does the Unipile MCP server handle rate limits from underlying providers like LinkedIn?
Truto does not retry, throttle, or absorb rate limit errors. If Unipile (or its underlying provider) returns an HTTP 429, Truto passes that error directly to Claude, normalizing the headers to the IETF standard (ratelimit-limit, ratelimit-remaining, ratelimit-reset). Your AI agent is responsible for executing backoff and retry logic.
Can I restrict the Unipile MCP server to only read operations?
Yes. When creating the MCP server via Truto, you can pass a method filter (e.g., methods: ["read"]). This ensures the generated MCP server only exposes safe, non-destructive tools like listing emails or searching profiles, completely omitting write or delete operations.
Do I need to maintain code to update Unipile MCP tools?
No. Truto dynamically generates the MCP tools based on the integration's underlying schema and documentation. As endpoints are added or updated, the MCP server automatically reflects those changes without requiring code deployments.

More from our Blog