Head terms

Posting to social media from Claude Code with PostGate's MCP server

How to register PostGate as an MCP server in Claude Code with claude mcp add, and ask it to draft and schedule social posts as part of a release workflow — safely, with draft-first defaults and scoped keys.

Quick answer

Register PostGate's hosted MCP server from a terminal with claude mcp add --transport http, passing your API key as an Authorization header. Once claude mcp list shows it connected, ask Claude Code in plain language to draft and schedule posts. Two checkpoints protect live accounts: Claude Code's tool-permission prompt and PostGate's draft-by-default create_post contract.

Claude Code already reaches your issue tracker, your database, and your browser through MCP servers you register with one command. There's no reason a launch announcement should be different — once PostGate's hosted MCP server is registered the same way, you can ask Claude Code to draft and schedule social posts as a step in a workflow it's already running, like shipping a feature or closing out a release.

PostGate handles OAuth, publishing and delivery evidence for every network through one API. Start free or read the docs.

01

Register the server with claude mcp add

Claude Code connects to MCP servers through the claude mcp CLI, run from a terminal — not from inside a Claude Code session. For a hosted HTTP server like PostGate's, that's a --transport http registration with the API key passed as a header, the same way Claude Code's own docs show connecting to any server that authenticates with a static token rather than an OAuth sign-in flow.

Register PostGate as an MCP serverPostGate API
claude mcp add --transport http postgate https://postgate.studio/mcp \
  --header "Authorization: Bearer $POSTGATE_API_KEY"
02

Pick a scope, then verify the connection

By default, claude mcp add registers the server at local scope — private to you, active only in the project you ran the command from. Add --scope user to make it available in every project, or --scope project to write it into .mcp.json and share it with the rest of the team through version control (teammates get an approval prompt the first time they open the project). Whichever scope you pick, claude mcp list confirms the server is reachable, and /mcp inside a session shows the same status plus the tools it exposes.

03

Ask Claude Code to draft and schedule a post

Once the server shows as connected, Claude Code picks its tools up automatically — you don't need to name the server in every prompt, though it can help to during testing so you can confirm which tool actually answered. A natural place this fits is the tail end of a release workflow, where Claude Code already has the context of what just shipped:

Example promptPostGate API
Use the postgate MCP server to draft a LinkedIn and X post
about the v2.4 release we just shipped, scheduled for
tomorrow at 9am ET. Don't publish it — leave it as a draft
for me to review.
04

Why two independent checkpoints, not one?

The first time Claude Code calls a tool from a newly connected server, it asks for your permission before the call goes through — the same approval step it uses for any MCP server, not something specific to PostGate. That's the first checkpoint, and it's entirely on Claude Code's side of the boundary.

The second is PostGate's own tool contract: create_post creates a draft unless the call explicitly sets confirm: true. Even a prompt like the one above, which already asks for a draft, is redundant with a default that's enforced at the API boundary regardless of what the prompt says — which matters, because a prompt is something a model reasons over, and reasoning can be wrong. Nothing reaches a live account from a coding agent session without clearing both the permission prompt and the confirm flag.

05

Scope the key you hand a coding agent

A Claude Code session can run fairly autonomously across a chunk of your workflow, so the credential matters as much as the tool defaults. Issue a key with publish scope — not full, which adds destructive and administrative operations no drafting workflow needs — and bind it permanently to one profile group. Start against a pg_test_ key while you get the prompt and the workflow right; it runs the entire create-and-schedule lifecycle without ever reaching a real connected account.

Frequently asked questions

Can Claude Code publish a social media post without my approval?

No — two independent checkpoints sit in the way. The first time Claude Code calls a tool from a newly connected MCP server, it asks for your permission before the call goes through. Separately, PostGate's create_post tool creates a draft unless the call explicitly sets confirm: true, a default enforced at the API boundary regardless of what the prompt says.

How do I share a PostGate MCP server with my whole team in Claude Code?

Run claude mcp add with --scope project, which writes the server into .mcp.json so it ships with the repo through version control. Teammates get an approval prompt the first time they open the project. By default the server registers at local scope — private to you, active only in that project — and --scope user makes it available across all your projects.

What API key scope should I give a coding agent like Claude Code?

Issue a key with publish scope — not full, which adds destructive and administrative operations no drafting workflow needs — and bind it permanently to one profile group. Start against a pg_test_ key while you get the prompt and workflow right; it runs the entire create-and-schedule lifecycle without ever reaching a real connected account.

How do I verify Claude Code is actually connected to the PostGate MCP server?

From a terminal, claude mcp list confirms the server is reachable. Inside a Claude Code session, /mcp shows the same connection status plus the tools the server exposes. During testing it also helps to name the server in your prompt so you can confirm which tool actually answered.

Build it with PostGate

One API for every social platform your customers care about — sandboxed, documented, and ready today.

Start building Read the docs