Schedule Instagram, Threads and TikTok posts from Claude with MCP
AI agents are good at the tedious half of social media: turning a folder of screenshots and a few notes into an Instagram caption, a short Threads post and a TikTok title, then putting it all on a calendar. What they can't do on their own is post. The Model Context Protocol (MCP) fixes that: it lets an agent call tools in other apps, and NextDeck has an MCP server built in.
This guide connects Claude Code to NextDeck, so you can say "schedule these three screenshots for Tuesday at 9:30 on Instagram, Threads and TikTok" and have it done.
What you need
- A NextDeck account with Instagram, Threads or TikTok connected.
- An API key: in NextDeck, open Settings → API keys and create one. It starts with
nd_. Treat it like a password. - Claude Code, or another MCP client that can connect over HTTP with a custom header.
Connect Claude Code
One command adds the server:
claude mcp add --transport http nextdeck \
https://nextdeck.app/mcp \
--header "Authorization: Bearer nd_…"
Other MCP clients need the same two things: the URL https://nextdeck.app/mcp and an Authorization: Bearer header with your key. Each key can be revoked on its own in Settings, so give each agent or machine its own.
What the agent can do
| Tool | What it does |
|---|---|
list_projects, list_accounts | Find where to post: projects and the connected accounts in each |
upload_media | Upload a photo from a URL or as base64 |
create_post, update_post | Draft a post, with a shared text, hashtags and per-platform overrides |
validate_post | Check it against every platform's limits and see the final text for each |
schedule_post, unschedule_post | Put it on the calendar or take it off |
publish_post_now | Post right away, or retry only the accounts that failed |
get_post_stats, get_account_insights | Views, likes, comments, shares and follower totals |
tiktok_creator_info, update_tiktok_settings | A TikTok account's posting options and settings |
A typical session
> Schedule the three new screenshots in ./launch for
Tuesday 9:30 on Instagram, Threads and TikTok. Write
a caption for each and use the topic "Indie Dev" on Threads.
● upload_media ×3
● create_post
● validate_post Photo 2 is 1170×2532; Instagram needs between 4:5 and 1.91:1.
(crops photo 2 to 4:5 and uploads it again)
● update_post
● validate_post no problems
● schedule_post Tue 9:30 AM
The useful part is validate_post. The agent gets the same checks as the web composer (photo counts, aspect ratios, caption lengths, the Threads topic rules, TikTok's privacy choice), so it fixes problems before the post is scheduled rather than finding out at 9:30 on Tuesday.
Prompts that work well
- Give it the voice once. "Captions are casual, first person, no emoji, five hashtags at most." Put it in your project's
CLAUDE.mdso it applies every time. - Ask for different texts per platform. "A full caption for Instagram, one or two sentences and a question for Threads, a 90-character title for TikTok."
- Plan a week at once. "Here are seven photos. Schedule one a day at 9:00 starting Monday, as drafts first so I can check them."
- Close the loop. "Which of last week's posts did best on Threads? Write the next one in that style."
Keeping a human in the loop
Posts are public, and they can't be cleanly taken back. A few habits keep an agent safe:
- Draft first. Ask the agent to create drafts, review them in NextDeck, then schedule.
- Confirm before publishing.
publish_post_nowis marked as destructive, so well-behaved clients ask before running it. - Use TikTok inbox drafts if you want the final say on TikTok: the post waits in your TikTok inbox until you post it.
- One key per agent. If a machine or a script goes away, revoke its key and nothing else changes.
Prefer plain HTTP?
The same actions are in NextDeck's REST API at https://nextdeck.app/api/v1, with the same API key, for scripts, cron jobs and automation tools that don't speak MCP.