# Postbase MCP server

> Draft and schedule social media posts, threads, and videos to X, LinkedIn, Bluesky, Mastodon, and YouTube using an AI agent.

- Repository: https://github.com/postbasehq/mcp
- Page: https://hostedmcp.org/servers/postbasehq/mcp
- Transport: stdio, remote
- Stars: 10
- License: AGPL-3.0
- Latest version: 0.3.0

## Install

### Claude Code

```sh
claude mcp add --env 'POSTBASE_API_KEY=<YOUR_POSTBASE_API_KEY>' mcp -- npx -y @postbasehq/mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@postbasehq/mcp"
      ],
      "env": {
        "POSTBASE_API_KEY": "<YOUR_POSTBASE_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@postbasehq/mcp"
      ],
      "env": {
        "POSTBASE_API_KEY": "<YOUR_POSTBASE_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mcp","type":"stdio","command":"npx","args":["-y","@postbasehq/mcp"],"env":{"POSTBASE_API_KEY":"<YOUR_POSTBASE_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@postbasehq/mcp"
      ],
      "env": {
        "POSTBASE_API_KEY": "<YOUR_POSTBASE_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add mcp --env 'POSTBASE_API_KEY=<YOUR_POSTBASE_API_KEY>' -- npx -y @postbasehq/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mcp]
command = "npx"
args = ["-y", "@postbasehq/mcp"]

[mcp_servers.mcp.env]
POSTBASE_API_KEY = "<YOUR_POSTBASE_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'POSTBASE_API_KEY=<YOUR_POSTBASE_API_KEY>' mcp npx -- -y @postbasehq/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@postbasehq/mcp"
      ],
      "env": {
        "POSTBASE_API_KEY": "<YOUR_POSTBASE_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `POSTBASE_API_KEY` | yes | yes | API key from Postbase → Developers |
| `POSTBASE_API_URL` | no | no | API base URL, for self-hosted instances (default https://www.postbase.so/api/v1) |

## Tools (11)

- `list_channels`
- `create_post`
- `get_post`
- `update_post`
- `retry_post`
- `get_analytics`
- `list_media`
- `add_media`
- `list_scheduled`
- `cancel_post`
- `schedule_thread`

## FAQ

### Which social media platforms can I post to?

You can draft and schedule posts and threads to X, LinkedIn, Bluesky, and Mastodon. YouTube and TikTok require specific handling.

### Do I need an API key to use the hosted server?

No, the hosted server at mcp.postbase.so uses OAuth sign-in instead of an API key.

### How do I schedule a thread?

You can use the schedule_thread tool or the create_post tool with the thread parameter to create a sequence of posts.

### Can I use this with a self-hosted Postbase instance?

Yes, you can use the npm package and point it to your local instance by setting the POSTBASE_API_URL environment variable.
