ChatGPT can post to social media, and schedule posts, once a plugin connects it to your accounts: a provider's plugin, which posts and schedules through that provider's app after you link your accounts to it, or your own MCP server on each network's API. On its own it can only write the post. This guide builds your own for Instagram, for posting now: an MCP server on Meta's official API, reached by ChatGPT through OpenAI's Secure MCP Tunnel, so your server never listens on the public internet.
The server is the one from our Claude guide, and its API calls are the ones from our Instagram API guide. This page is about what changes for ChatGPT.
The short version
- Get an Instagram token and account id from a Meta app with Instagram Login.
- Save the four-tool
server.mjs, with the token in a.envfile next to it. - Create a tunnel in OpenAI Platform and run
tunnel-clienton your computer, pointed at the server. - In ChatGPT, add a custom MCP server with Connection: Tunnel, create it as a plugin and install it.
- Type
@and pick the plugin in a chat. ChatGPT asks you to confirm before each tool that changes something.
Three ways to connect ChatGPT to Instagram
ChatGPT adds MCP servers as plugins, from ChatGPT Plugins, on the web. Under Connection it takes a server URL or a Secure MCP Tunnel, and for sign-in it offers OAuth, No authentication, or both (Add custom MCP server).
| Route | What it takes | Covered |
|---|---|---|
| Secure MCP Tunnel | Your server on your computer, tunnel-client running beside it, an OpenAI Platform organization |
This guide |
| Public server URL | The server on the public internet over HTTPS, with its own OAuth | Below |
| A provider's plugin | Your Instagram account linked to the provider, its server URL, OAuth to the provider | Instagram MCP servers |
Blotato (llms.txt), Metricool (help) and Upload-Post (MCP) say they are in ChatGPT's plugin directory, and so is Rizamo (ChatGPT on Rizamo); the directory cannot be read without signing in.
The tunnel is what makes a personal server practical. tunnel-client opens an outbound HTTPS connection to OpenAI, pulls the MCP requests waiting for your server and sends back the answers. Your server needs no public listener, and the docs list "a developer machine" among the places it can run (Secure MCP Tunnel).
Before you start
- An Instagram professional account, business or creator. Meta's API only serves professional accounts.
- A Meta app with Instagram Login and a token with
instagram_business_basicandinstagram_business_content_publish. For your own account, Generate token in the App Dashboard gives a 60-day token, with no App Review (get started). - The account's
user_idfromGET /me?fields=user_id,username, as in the Instagram API guide. - Node.js 20.6 or later, for its
--env-fileoption. - An OpenAI Platform organization where you have Tunnels Read, Manage and Use, and a ChatGPT workspace that lets you add custom MCP servers. Both are permissions an admin can grant or withhold (permissions).
- The image or video at a public URL. Meta fetches the file itself, so it must be on a publicly accessible server. A file attached in the chat will not work.
OpenAI's pages do not say which ChatGPT plans can add custom MCP servers, and third-party pages disagree. If Add custom MCP server is not in your Plugins page, that is the first thing to check with your workspace admin.
The server
Follow The server in our Claude guide: the folder, the two npm packages and server.mjs are the same for ChatGPT. Its four tools are:
| Tool | What it does | Marked read-only |
|---|---|---|
create_instagram_container |
Uploads an image or reel as an unpublished container | No |
get_instagram_container |
Reads the container's status_code |
Yes |
publish_instagram_container |
Publishes a FINISHED container, never twice |
No |
get_instagram_publishing_limit |
Reads Meta's count of API posts in the last 24 hours | Yes |
Why publishing is its own tool, and why the server never retries a publish: Why four tools and not one.
Claude Desktop passes the token through its config file. Here tunnel-client starts the server, so put the token in a .env file next to server.mjs and let Node load it:
IG_TOKEN=<INSTAGRAM_USER_ACCESS_TOKEN>
IG_ID=<USER_ID>chmod 600 ~/instagram-mcp/.envCheck that the server starts: node --env-file=$HOME/instagram-mcp/.env $HOME/instagram-mcp/server.mjs should wait silently for input. If it exits with "Set IG_TOKEN and IG_ID", the file was not read. Stop it with Ctrl+C.
Run the tunnel
Create a tunnel in Platform tunnel settings and copy its tunnel_id. Then create a runtime API key for tunnel-client in the same organization's API keys (onboarding).
On macOS, Homebrew is the supported install. On other systems, use the download in Platform tunnel settings or the latest release (tunnel-client).
brew install openai/tools/tunnel-client
tunnel-client --versionPoint a profile at the server. The command is the one you just checked, with absolute paths:
export CONTROL_PLANE_API_KEY="<RUNTIME_API_KEY>"
tunnel-client init \
--sample sample_mcp_stdio_local \
--profile instagram \
--tunnel-id <TUNNEL_ID> \
--mcp-command "node --env-file=/Users/you/instagram-mcp/.env /Users/you/instagram-mcp/server.mjs"
tunnel-client doctor --profile instagram --explaintunnel-client run --profile instagramChatGPT finds the tools and calls them only while tunnel-client run is up. Run one tunnel-client per tunnel id: with a stdio server, two at once (even briefly, during a restart) each start their own copy of the server, and requests can land on either (tunnel-client).
Add it to ChatGPT
In ChatGPT Plugins, on the web:
- Choose +, then Add custom MCP server, and name it
Instagram. - Under Connection, choose Tunnel and select your tunnel. If it is not listed, the tunnel is not associated with this ChatGPT workspace, or you lack Tunnels Use (connect from ChatGPT).
- For authentication, choose No authentication. The server has no sign-in of its own: who can reach it is decided by who can use the tunnel in your Platform organization and workspace.
- Read the risk warning, choose I understand and want to continue, then Create as a plugin.
- Install the plugin from your plugins (Add custom MCP server).
Create it in your personal plugins, not in a shared workspace: a plugin there could publish to your Instagram account for whoever else can use it.
When you change server.mjs, restart tunnel-client and refresh the app in its settings page to pull the new tools and descriptions (same page).
Confirm every publish
ChatGPT asks you to confirm write actions by default, and it decides what a write is from one annotation: tools marked readOnlyHint run without asking, and "Tools without this hint are treated as write actions" (Add custom MCP server). With this server:
get_instagram_containerandget_instagram_publishing_limitcarryreadOnlyHint, so ChatGPT runs them without a prompt.create_instagram_containerasks. It publishes nothing, and a container never published expires after 24 hours (IG User Media).publish_instagram_containerasks, and it is the prompt that matters. Expand the tool call to read the exact input before you approve.
ChatGPT can remember an approval for one tool for the rest of a conversation. Never do that for the publish tool: every later post in that chat would go out without a prompt. A new conversation asks again (same page).
Post something
Pick the plugin with @ and name the tools. OpenAI's own advice for custom servers is to be explicit about the app and the tool, and to rule out other tools (same page):
@Instagram Write an Instagram caption for https://example.com/photos/autumn-menu.jpg:
the new autumn menu, three drinks, warm tone, at most 5 hashtags.
Show me the caption first. Then use create_instagram_container,
and use publish_instagram_container only after I say yes.
Do not use any other tools.What follows: ChatGPT shows the caption, you ask for changes or say yes, ChatGPT asks to run create_instagram_container, then asks to run publish_instagram_container once the container is FINISHED, and replies with the post id. For a reel, it checks get_instagram_container until the video is processed; Meta recommends checking at most once a minute, for no more than five minutes (content publishing).
Before a batch, ask how many posts you can still publish today: get_instagram_publishing_limit reads Meta's own count (content publishing limit).
Tunnel limits that matter here
From the limits table:
- 120 seconds per request, from when it enters OpenAI's queue to the answer. Each tool call here is one short request:
create_instagram_containerwaits 5 seconds and returns, and the long wait for a reel is spread over separate status checks. - 10 MiB per request or response. The server sends URLs and ids, never the media itself.
- 600 requests a minute per tunnel. Far above what one person posting needs.
A public URL needs OAuth
Without a tunnel, the server has to be on the public internet over HTTPS, using SSE or streaming HTTP (Add custom MCP server). The SDK serves the same tools over HTTP (serving). The catch is sign-in: the options ChatGPT lists are OAuth and no authentication, with no field for a fixed API key. A public server with no authentication lets anyone who finds its URL publish to your account, so on this route the server needs OAuth, which is a login service to build and keep safe.
For one account, the tunnel is less to run. A public URL is the route when other people's accounts are involved, and then each of them needs your Meta app to pass App Review (App Review).
What it does not do
- Files from the chat. An image you attach in ChatGPT is not at a public URL, and Meta only takes media it can fetch (content publishing). Something has to host the file first.
- Carousels and stories. Both use the same container flow (our guide). Add a tool for each when you need them.
- Scheduling. The server only acts when you ask in a chat, and only while your computer and
tunnel-clientare running. A post for later needs something that callsmedia_publishat that time. - Other networks. Each one is another set of tools, another login and another app review.
Where Rizamo fits
Rizamo is a social media API and MCP server built to take that layer off your hands: one call to publish to each network, with Rizamo hosting the server, handling the sign-in, creating and publishing the containers and refreshing the tokens. In ChatGPT it is listed in the plugins, with OAuth sign-in (ChatGPT on Rizamo). Rizamo is open: start free. Free for 2 social accounts, with unlimited posts, profiles, seats and agents, and the API and MCP included. No card.