Unipile MCP server

Integrates with Unipile to provide unified access to messages across LinkedIn, WhatsApp, Instagram, Messenger, and Telegram, enabling efficient multi-platform communication management.
Back to servers
Provider
Bary Huang
Release date
Jan 07, 2025
Language
Python
Stats
8 stars

The Unipile MCP server enables AI models to interact with messages from various messaging platforms (including Mobile, Email, WhatsApp, LinkedIn, Slack, Twitter, Telegram, Instagram, and Messenger) through a standardized interface based on Anthropic's Model Context Protocol.

Getting Started with Unipile MCP

To use the Unipile services, you'll need a subscription. Visit the Unipile Messaging API page for details on subscription options and features.

Supported Messaging Platforms

This MCP server provides access to messages across multiple platforms:

  • LinkedIn: Professional messaging and contact management
  • WhatsApp: Chat messages and conversations
  • Instagram: Direct messages and follower interactions
  • Messenger: Facebook Messenger communications
  • Telegram: Chat conversations and messages

Installation

Prerequisites

Before setting up the server, you need:

  • A Unipile DSN and API key (available from your Unipile dashboard)
  • Docker installed on your system

Environment Variables

The server requires two environment variables:

  • UNIPILE_DSN: Your Unipile DSN (e.g., api8.unipile.com:13851)
  • UNIPILE_API_KEY: Your Unipile API key

Docker Installation

The MCP server can be installed using Docker with two options:

Option 1: Pull from Docker Hub

docker pull buryhuang/mcp-unipile:latest

Option 2: Build Locally

docker build -t mcp-unipile .

Running the Server

After installation, run the container with your credentials:

docker run \
  -e UNIPILE_DSN=your_dsn_here \
  -e UNIPILE_API_KEY=your_api_key_here \
  buryhuang/mcp-unipile:latest

Using with Claude Desktop

To integrate the Unipile MCP server with Claude Desktop, add the following to your configuration:

{
  "mcpServers": {
    "unipile": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "UNIPILE_DSN=your_dsn_here",
        "-e",
        "UNIPILE_API_KEY=your_api_key_here",
        "buryhuang/mcp-unipile:latest"
      ]
    }
  }
}

Available Resources and Tools

Resources

The server exposes the following resource:

  • unipile://messages: Access to messages from connected messaging platforms

Message Management Tools

unipile_get_chat_messages

Retrieves all messages from a specific chat with pagination support.

Input parameters:

  • chat_id (required): The ID of the chat to retrieve messages from
  • batch_size (optional, default: 100): Number of messages to retrieve per batch

Returns: Array of message objects

Example Usage

Retrieving Messages

To get all messages from a specific chat, you can use a prompt like:

Get all messages from chat ID "chat_123"

This will use the unipile_get_chat_messages tool to retrieve the messages from the specified chat.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later