Connect Ampost to your AI agent

Give Claude Code, Cursor, VS Code, Codex or another MCP client Ampost's publishing tools: one command or one click per client, authenticated with your Ampost API key.

Config files are not shell scripts. If your client does not expand ${AMPOST_API_KEY}, paste the key itself. Some clients (npx arguments, some Windows apps) do not expand variables: the header then arrives empty, and the client opens Ampost's sign-in page instead of using the key.

Works on every plan, Free included

The REST API and MCP need no paid plan and no credit card. Free includes 3 social accounts, 50 posts a month, posts to several platforms at once and 60 read requests a minute; scheduling needs the Pro plan or higher. On Free a social account can be connected in one Ampost workspace only (also for 30 days after it is disconnected), and its 50 posts a month count per social account, whichever workspace publishes. See pricing.

1. Create an API key

In the dashboard, open Settings, API keys and generate a key. The key is shown once, and the page then shows the commands below with your key filled in. Your agent never needs your Ampost password or your social media logins: accounts are connected in the browser.

2. Add Ampost to your client

Fills the key into the commands and enables the one-click buttons. It stays in this browser tab and is not sent anywhere.

For the claude CLI, the Code tab of the Claude desktop app and the Claude Code IDE extensions: they are all Claude Code. Run this in a terminal. --scope user adds Ampost to every project; leave it out to add it to the current project only.

Add with the CLI

claude mcp add --transport http --scope user ampost https://api.ampost.io/mcp --header "Authorization: Bearer amp_live_YOUR_KEY"

Or share it with a project; each person sets AMPOST_API_KEY

.mcp.json
{
  "mcpServers": {
    "ampost": {
      "type": "http",
      "url": "https://api.ampost.io/mcp",
      "headers": {
        "Authorization": "Bearer ${AMPOST_API_KEY}"
      }
    }
  }
}

No claude command (the Code tab of the Claude app): add it to the user config instead

~/.claude.json
{
  "mcpServers": {
    "ampost": {
      "type": "http",
      "url": "https://api.ampost.io/mcp",
      "headers": {
        "Authorization": "Bearer amp_live_YOUR_KEY"
      }
    }
  }
}
  • With .mcp.json, AMPOST_API_KEY must be set where Claude Code starts. macOS and Linux: in the environment that launches it (a shell profile reaches the terminal, not an app started from the Dock or a menu). Windows: setx AMPOST_API_KEY amp_live_YOUR_KEY, then restart the app or terminal. Without it the header is empty and Claude Code shows "Dynamic Client Registration rejected".
  • With .mcp.json, Claude Code first lists Ampost as "Pending approval (run claude to approve)": start claude in the project and approve the server. The --scope user command needs no approval.
  • The Code tab of the Claude desktop app does not put claude on PATH (it bundles its own copy). Install the CLI (macOS, Linux: curl -fsSL https://claude.ai/install.sh | bash; Windows PowerShell: irm https://claude.ai/install.ps1 | iex) and run the command above, or merge the ~/.claude.json entry into that file: top-level mcpServers for every project, or projects.<project path>.mcpServers for one. Do not use the Claude (app) section for the Code tab.
  • Start a new session after adding the server.
  • Without a key: leave out --header, then run /mcp in a session, pick Ampost and sign in with your Ampost account in the browser.

Check it: claude mcp list or /mcp in a session shows Ampost as connected. Ask the assistant to call platforms_list. A working setup answers with the platforms Ampost supports (Instagram, Facebook, LinkedIn, TikTok, Threads, X, YouTube, Pinterest, Bluesky, Telegram, Discord) and their rules, such as text limits and media types. The raw result is { "data": [{ "platform": "instagram", "name": "Instagram", "text": { "maxLength": 2200 }, ... }], "pagination": { ... } }.

3. Check the connection

Each client tab ends with its check: ask your agent to call platforms_list, which returns the supported platforms and their rules. Then connect a social account with accounts_connect and create a draft with posts_create. Agents find every tool and rule in llms.txt and the MCP server docs.

If it fails

  • 401 with UNAUTHORIZED: The key is wrong or revoked. Copy it again without spaces or line breaks, or create a new one in Settings, API keys.
  • "No API key or access token arrived", or an Ampost sign-in page opens although the config has a key: The key did not arrive, so the client fell back to signing in with OAuth. Signing in works too (the client then shows under Settings, Connected apps). To use the key, check that the Authorization header is in the config; if it uses ${AMPOST_API_KEY}, set the variable where the client starts or paste the key itself.
  • 403 with INSUFFICIENT_SCOPE: The key or connected app lacks the scope the tool needs (in details.requiredScope). Create a key with it, or disconnect the app in Settings, Connected apps and connect it again with that access.
  • 403 with UPGRADE_REQUIRED: The plan does not include that feature, for example scheduling on Free. Upgrade on the pricing page.
  • claude: command not found in the Code tab of the Claude app: The app bundles its own Claude Code and does not put claude on PATH. Install the CLI or edit ~/.claude.json, as in the Claude Code section.
  • Changes not taking effect: Clients load MCP servers at start. Quit and restart the client fully (also from the system tray); in Claude Code and the Claude app, start a new session.

Continue browsing

Related docs

The MCP tool reference, the REST API behind it, and the plans that include API access.