npm package: @publio/mcp
Description: Publish to LinkedIn from Claude, ChatGPT, Cursor, or any AI assistant. Text posts, images, and document carousels.
Latest version: 0.3.0

# @publio/mcp

MCP server for [Publio](https://publio-app.com) — publish LinkedIn posts directly from Claude. Supports text posts, image posts, and document carousels. Every post is previewed before it goes live.

## What Publio Does

Publio connects Claude to your LinkedIn account so you can publish posts without leaving your AI conversation. You describe what you want to post, Claude drafts it, you preview it, then it goes live.

**Features:**
- Text posts up to 3000 characters
- Image posts (JPEG, PNG, GIF, WebP — up to 20 images per post)
- Document carousels (PDF, DOCX, PPTX as swipeable LinkedIn slides)
- Dry-run preview before every publish — you always approve first
- Connection status check to verify your LinkedIn is linked

## Prerequisites

1. **A Publio account** — sign up at https://publio-app.com
2. **LinkedIn connected** — link your LinkedIn account from the dashboard
3. **API key** — generate one in the dashboard. It looks like `pub_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`

## Tools

| Tool | Description |
|------|-------------|
| `publio_publish` | Publish a post to LinkedIn. Always previews first (dry_run). Supports text, images, and documents. |
| `publio_status` | Check your LinkedIn connection status and subscription plan. |

## Installation

### Option 1: Claude Desktop Extension (Recommended)

Download [publio.mcpb](https://publio-app.com/download/publio.mcpb) and double-click to install. Claude Desktop will prompt you to enter your API key during setup.

Or install via URL:

```
https://publio-app.com/download/publio.mcpb
```

### Option 2: Claude Desktop (Manual)

Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):

```json
{
  "mcpServers": {
    "publio": {
      "command": "npx",
      "args": ["-y", "@publio/mcp"],
      "env": {
        "PUBLIO_API_KEY": "pub_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}
```

Restart Claude Desktop after saving.

### Option 3: Claude Code

Add via CLI:

```bash
claude mcp add publio \
  --env PUBLIO_API_KEY=pub_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
  -- npx -y @publio/mcp
```

Or add manually to your project's `.mcp.json`:

```json
{
  "mcpServers": {
    "publio": {
      "command": "npx",
      "args": ["-y", "@publio/mcp"],
      "env": {
        "PUBLIO_API_KEY": "pub_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}
```

## Configuration

| Variable | Required | Description |
|----------|----------|-------------|
| `PUBLIO_API_KEY` | Yes | Your Publio API key from the dashboard |
| `PUBLIO_API_URL` | No | Override API base URL (for local development) |

## Usage Examples

### Example 1: Publish a text post

```
Publish a LinkedIn post about 3 productivity tips for remote workers.
Keep it under 1500 characters and make it practical.
```

Claude will draft the post, show you a preview, and wait for your confirmation before publishing.

### Example 2: Publish a post with an image

```
Post this to my LinkedIn with the image at https://example.com/my-chart.png:
"Q1 results are in — our team hit 120% of target. Here's what we did differently."
```

Claude calls `publio_publish` with `media` and `media_type: "image"`, shows you the preview, then publishes on confirmation.

### Example 3: Publish a PDF document as a carousel

```
Publish my presentation as a LinkedIn carousel.
Document URL: https://example.com/2024-strategy.pdf
Caption: "Our 2024 strategy in 10 slides. Swipe to see the full picture."
```

Claude attaches the PDF as a LinkedIn document post (swipeable carousel), previews it, and publishes after your approval.

## Safe Publishing Workflow

The MCP server enforces a two-step publish flow:

1. `publio_publish` is called with `dry_run: true` by default — preview only, nothing posted
2. Claude shows you the full post text and attached media
3. You confirm ("yes, publish it") or request changes
4. Claude calls with `dry_run: false` to actually publish

You are always in control. Nothing is published without your explicit approval.

## Free Tier

Free plan posts include `\n\nPublished via Publio App` appended automatically. Upgrade to Starter ($5.99/mo) at https://publio-app.com/dashboard to remove it.

## Privacy Policy

https://publio-app.com/privacy.html

Publio stores only what is necessary to publish on your behalf: your LinkedIn access token (encrypted at rest) and post history. We do not sell your data.

## Support

- Email: info@timconsulting.co
- Telegram community: https://t.me/+xZi_d3rHaqpmZTMy
- Issues: https://publio-app.com

## Development

```bash
cd mcp
npm install
PUBLIO_API_KEY=pub_your_key node index.js
```