> ## Documentation Index
> Fetch the complete documentation index at: https://postmesh.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Post to social media from Claude, Cursor and Codex (MCP)

> Connect PostMesh's remote MCP server to Claude, Cursor, Codex or any MCP client, then schedule and publish posts by asking in plain words.

Schedule and publish from Claude, Cursor, Codex or any MCP client.

> [!NOTE]
>
> **In short:** PostMesh runs a remote MCP server at [https://postmesh.app/api/mcp](https://postmesh.app/api/mcp). Create an API key in Settings, API & MCP, add the server to your assistant with that key, then ask it to post. Assistants send text posts to Facebook Pages, Threads, Reddit, X, LinkedIn, Bluesky, Mastodon, Telegram and Discord.

## How it works

![Your assistant, PostMesh, your accounts](https://mintcdn.com/post-mesh/GTIDUtOl4fYRkpa7/images/mcp.svg?fit=max\&auto=format\&n=GTIDUtOl4fYRkpa7\&q=85\&s=f4055458086aaf23f858b21156e30d4f)

Your assistant, PostMesh, your accounts · 31 tools

**1. Create an API key**

Settings, API & MCP. The key is shown once; copy it then. See [API keys](https://postmesh.app/docs/api-keys.md).

**2. Add PostMesh to your assistant**

Use the setup for your client below.

**3. Ask**

For example: "Schedule this to LinkedIn and Threads for Friday at 10am."

## Setup by client

```bash Claude Code theme={null}
claude mcp add --transport http postmesh https://postmesh.app/api/mcp --header "Authorization: Bearer YOUR_API_KEY"
```

```json Cursor theme={null}
// ~/.cursor/mcp.json
{
  "mcpServers": {
    "postmesh": {
      "url": "https://postmesh.app/api/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}
```

```bash Codex theme={null}
export POSTMESH_API_KEY="YOUR_API_KEY"
codex mcp add postmesh --url https://postmesh.app/api/mcp --bearer-token-env-var POSTMESH_API_KEY
```

```json Other clients theme={null}
{
  "mcpServers": {
    "postmesh": {
      "url": "https://postmesh.app/api/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}
```

**Claude Desktop and claude.ai:** open Settings, Connectors, Add custom connector. Name it PostMesh and paste the connector URL shown in PostMesh's Settings, API & MCP.

> [!WARNING]
>
> A key that may post sends posts right away, with no second confirmation, unless it [asks first](https://postmesh.app/docs/api-keys.md#ask-before-posting). Keep it private and revoke it if it leaks. New keys can read and write drafts but not post; see [API keys](https://postmesh.app/docs/api-keys.md#scopes).

## What assistants can do

* Publish or schedule text posts to Facebook Pages, Threads, Reddit, X, LinkedIn, Bluesky, Mastodon, Telegram and Discord
* Read your connected accounts, scheduled posts and history
* Cancel a scheduled post, retry a failed one and manage drafts
* Start a draft from one of your templates
* Check a post against each network's limits before sending

To approve each post before it goes out, switch on **Ask first** for the assistant's key. See [Ask before posting](https://postmesh.app/docs/api-keys.md#ask-before-posting).

> [!NOTE]
>
> Instagram, TikTok and YouTube need a photo or video. A key with the `media` [scope](https://postmesh.app/docs/api-keys.md#scopes) can bring one in: `create_upload_url` gives a 10-minute link for one file of an exact size (up to 1 GB, less for photos), then `finish_upload` checks it; `attach_media_from_url` downloads a public link of up to 80 MB within 60 seconds. Both return a `media_ref` to pass in `media` on schedule\_post or publish\_post\_now, or to save in a draft. `generate_image` makes a picture from a description and saves it to your media library, with a `media_ref` the same way; each image counts toward your plan's monthly AI images.

Every tool and its parameters: [MCP tool reference](https://postmesh.app/docs/mcp-tools.md).


## Related topics

- [PostMesh docs](https://postmesh.app/docs/index.md)
- [Schedule posts to every network](https://postmesh.app/docs/schedule-posts.md)
- [MCP tool reference](https://postmesh.app/docs/mcp-tools.md)
- [Different captions for each social network](https://postmesh.app/docs/captions-per-network.md)
- [API keys](https://postmesh.app/docs/api-keys.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.