Post, Find Outliers, and Track Sales from Codex
Let Codex write the launch posts for the code it just helped you ship, track the sales they bring in, and research outlier videos for what to post next. One setup covers the Codex CLI, the IDE extension and the ChatGPT desktop app.
Around 2 minutes.
How to connect ViewsMax to Codex
- 1
Link the accounts you publish to
≈2 min · one-timeSign up for ViewsMax, go to Dashboard → Connections, and link each channel. The platform logins happen inside ViewsMax, so your AI only ever holds a ViewsMax permission — and new channels you add later show up for it straight away.
- 2
Plug ViewsMax into Codex
≈1 min · one-time- aRegister the server
Paste this into your terminal.
Terminalcodex mcp add viewsmax --url https://api.viewsmax.com/api/mcp
- bLog in
Run the login command then approve ViewsMax in the browser window that opens (read-only or full access).
Terminalcodex mcp login viewsmax
The CLI, the IDE extension and the ChatGPT desktop app read the same config, so this only has to be done once.
No browser (CI, servers)?
Generate an API key in ViewsMax under Settings → AI Assistant Access, put it in a VIEWSMAX_API_KEY environment variable, and reference it from ~/.codex/config.toml.
~/.codex/config.toml[mcp_servers.viewsmax] url = "https://api.viewsmax.com/api/mcp" bearer_token_env_var = "VIEWSMAX_API_KEY"
- a
- 3
Run a quick test
≈30 secOpen a new conversation and paste this. The reply proves the connection works and gives you your channel names to reuse in later requests.
Which of my social accounts can you reach through ViewsMax?
Got two accounts on the same platform? Name the one you mean ("my @brand Instagram") so your AI doesn't have to stop and ask.
- 4
Give it a real job
≈1 minCodex checks with you before touching your account. Want something live straight away? Just say so. Would rather look first? Ask for a draft.
Summarise what changed in the last three commits as a LinkedIn update and a shorter X version. Keep both as ViewsMax drafts.
Example replyRead the last three commits and saved two ViewsMax drafts: a LinkedIn update (4 short paragraphs) and a 240-character X post. Neither is scheduled — say when and I'll queue them.
What happens next- Before it uses a ViewsMax tool that changes something, Codex asks for your OK.
- ViewsMax stores the post as a draft, or queues it for the time you gave.
- At publish time ViewsMax sends it to each channel separately and keeps a result per platform, so one failure never blocks the rest.
What can you ask Codex to do?
Look at the changes on this branch and write a short X thread explaining the new feature to non-developers. Save it as a ViewsMax draft.
Take the video at https://example.com/reel.mp4 and make it an Instagram Reel and a TikTok draft. Give TikTok a shorter caption than Instagram.
I'm promoting my ebook at https://example.com/ebook. Set it up as an offer with sales as the goal, and make separate tracked links for YouTube and Instagram.
Rank my offers by revenue for the past 30 days and tell me which traffic source is actually converting.
Pull YouTube outliers in personal finance from this month and explain the hook behind the top three. Save the best one to my library.
What's going out this weekend? Push anything on X back by two hours.
Which platforms can Codex post to?
Media is added by link. A channel has to be linked in ViewsMax before Codex can use it.
Troubleshooting
Codex reports it isn't authorized
Run codex mcp login viewsmax again and finish the login in the browser.
Reads work, but posting is refused
The connection was approved as read-only. Reconnect and pick full access on the ViewsMax approval screen, or swap in a full-access API key.
Media won't upload
Uploading a file into the chat window isn't enough — ViewsMax downloads media from a link. Host the file at a public https address that serves the file itself, not a preview page. Accepted: JPEG, PNG, WebP, GIF, MP4, MOV.
A channel isn't listed
Link it under Dashboard → Connections in ViewsMax (your AI can also hand you a connect link), then run the test prompt again.
One platform published, another didn't
Each platform is published separately in the background and keeps its own status. Ask for the status of that post to see the exact error the platform sent back.
Frequently asked questions
Can Codex post to social media?
Yes, once ViewsMax is connected. Codex can't log in to Instagram, TikTok or any other platform itself, so ViewsMax acts as the bridge: Codex drafts, times and sends out posts on YouTube, TikTok, Instagram, X, LinkedIn, Threads, Bluesky through the channels you've linked in ViewsMax.
Does Codex see my social media passwords?
Never. Your platform logins never leave ViewsMax. Codex holds a ViewsMax permission — read-only or full, your choice — and every action it takes is logged under Settings → AI Assistant Access.
Will Codex post without asking me?
Codex checks with you before it runs anything that changes your account. If you want an extra safety net, tell it to keep everything as drafts and approve them yourself in ViewsMax.
How much does it cost?
Connecting an AI agent costs nothing extra. What it can do follows your ViewsMax plan, such as monthly posts and active offers. The free plan is $0, and paid plans start at $29 a month — compare them on viewsmax.com.
What is MCP, and why does ViewsMax use it?
MCP (Model Context Protocol) is the open standard AI apps use to call outside tools. ViewsMax runs an MCP server, so any agent that speaks MCP gets the same 30 tools — posting, offers, analytics and outlier research — after a single sign-in.
What else can it do besides posting?
Quite a lot. The same connection sets up offers and tracked links, reports clicks, booked calls, sign-ups and revenue per offer, and digs into outlier videos on YouTube, TikTok and Instagram with an AI breakdown of each.
Using a different AI agent?
From one chat to every channel
Link your accounts once. After that, publishing, tracked links and sales reports are a message away.