- Works in: the Codex app, CLI and IDE extension.
- Connection: A Moonya API key, sent as an Authorization header (up to 10 keys per workspace).
- Server address:
https://moonya.ai/mcp - Files from your computer: Yes: local photos and videos up to 95 MB through a one-time upload link.
- Nothing is published without your approval, and anything that costs credits asks first.
Why use Moonya from Codex
Codex is built for getting work done in a project, so Moonya fits in as one more tool it can call. Point it at a README, release notes or a folder of screenshots and ask for posts. Because Codex works with your files, it can also upload local photos and videos to Moonya directly.
If you also use ChatGPT, you can connect Moonya there as well. Both connections work on the same Moonya workspace, so a draft you start in Codex can be approved later from ChatGPT or the Moonya app on your phone.
Moonya is a social media autopilot for small businesses and agencies. It learns your brand from your website, creates carousels, single image posts, Stories and short videos in your brand colors and fonts, and publishes them to Instagram, Facebook, LinkedIn, TikTok, Threads, YouTube, Pinterest and Google Business, plus X as a paid add-on.
What you can do from Codex
These are the things the Moonya connector actually exposes to Codex. Every tool is listed in plain language in the MCP documentation.
- Brand Brain. Read and update what Moonya knows about your brand, analyse your website, add a PDF or DOCX brand document and save rules every future post follows.
- Posts and drafts. Get topic ideas, then create carousels, single image posts and Stories from a topic or from your own text. The slides come back as images.
- Review and schedule. Edit captions, hashtags and slide text, rewrite a draft from a plain instruction, change a slide photo, then approve, schedule, skip or move posts, up to 30 at once.
- Your own photos and videos. Use your Gallery, schedule up to 10 of your own photos at once and invite up to 3 Instagram collaborators on a feed post, carousel or Reel.
- Automations. Recurring post automations that create drafts on a schedule, plus comment-to-DM automations for Instagram and Facebook with results.
- Inbox and analytics. Read messages, comments and reviews, reply as the brand after you approve the exact text, and see reach, engagement, best time and top posts.
- Video. Reels from your clips or photos with a voiceover, a talking AI presenter and animated explainers: you see the script and the credit price before anything renders. Video tools appear when video is enabled for your workspace.
- Agencies. On the Agency plan one connection can cover all client brands. Say which brand you mean and Moonya switches, keeping brands strictly separate.
Connect Moonya to Codex in 3 steps
Before you start
- A Moonya account with an active plan or the 7-day trial for $1. Every plan includes the AI assistant connector.
- A Moonya API key. In Moonya open Settings, AI assistants (MCP), click Create key, give it a name and pick Codex as the tool. The key is shown once, and Moonya shows the ready-made setting for Codex with the key already filled in. Only the workspace owner can create keys.
- To publish, at least one social network connected in Moonya. Drafts work without one.
Codex (OpenAI)
- Open the file ~/.codex/config.toml (the same file works for the Codex app, CLI and extension)
- Paste the block below at the end of the file
- Restart Codex
Configuration (replace <KEY> with your key):
[mcp_servers.moonya]
url = "https://moonya.ai/mcp"
http_headers = { Authorization = "Bearer <KEY>" }
To check that it works, ask: “What do you know about my brand?” Codex should answer with what Moonya has in your Brand Brain. Moonya's tools load when a session starts, so new features show up in a new session.
Things to ask in Codex
Write in your own words, in English or Serbian. Here is what happens behind each request.
“Turn the feature list in README.md into three single image posts for Instagram and LinkedIn.”
Moonya confirms the cost once, then creates three drafts from your text and shows the slides.
“Upload the screenshots in ./docs/img to my Moonya Gallery and schedule the best two as posts next week.”
Codex uploads the files with one-time links, then Moonya schedules your own photos at the times you agree.
“Pull last month's analytics from Moonya and write a short summary to reports/social-october.md.”
Moonya returns reach, engagement and top posts, and Codex writes the summary file in your project.
“Set up a comment-to-DM automation: anyone who comments DEMO gets the booking link.”
Moonya creates the automation for Instagram or Facebook and shows the message it will send.
Your photos and videos
Codex can upload files from your project folder: it asks Moonya for a one-time upload link (15 minutes), uploads a photo or video up to 95 MB and finalizes it, so it appears in your Gallery. You never need to open the app just to add media.
Good to know
- Nothing is published without your approval. New posts and videos are drafts. They go out only after you approve or schedule them, in Codex or in the Moonya app.
- Credits are confirmed first. Tools that cost credits tell you the exact cost and wait for your yes. A repeated request never charges twice. Drafts take 2 to 4 minutes, and Codex checks back until the draft is ready.
- Irreversible actions ask first. Publishing right now, deleting and replying to a message, comment or review need your confirmation.
- Posting limits protect your accounts. Moonya spaces out posts on the same network and moves a post to the nearest safe time when needed, and tells you why.
- Plans. The connector is included in Starter ($29), Pro ($79) and Agency ($199) per month, each with a 7-day trial for $1. Some video formats unlock once the trial ends and the plan is paid. See pricing.
- You stay in control of access. Revoke a key at any time in Moonya under Settings, AI assistants (MCP); it stops working immediately. Moonya does not read your chat history.
Troubleshooting
- Moonya tools do not show up. Check that the block is at the end of ~/.codex/config.toml with your real key instead of <KEY>, then restart Codex.
- Calls fail with an authorization error. The key was revoked or copied wrong. Create a new one in Moonya and replace it in the file.
- A tool returns an error. Moonya explains the fix in plain words and gives a link when the fix needs the browser, for example connecting a network or billing.
FAQ
Does one setup work in the Codex app, CLI and extension?
Yes. All three read the same ~/.codex/config.toml file, so adding the Moonya block once is enough.
Does Codex use a sign-in or an API key?
An API key, sent as an Authorization header from config.toml. Create it in Moonya under Settings, AI assistants (MCP); up to 10 keys per workspace.
Can I use Moonya in ChatGPT and Codex at the same time?
Yes. ChatGPT connects with a sign-in and Codex with a key, and both work on the same Moonya workspace.
Will Codex publish anything on its own?
No. Drafts wait for your approval, and paid or irreversible actions are confirmed with you first.
Other AI tools
See all AI assistant integrations, the full tool list in the MCP documentation, or the guide how to manage your Instagram and Facebook from ChatGPT or Claude.
Codex is a trademark of its owner and is named here only to describe compatibility. Moonya is an independent product and is not affiliated with the maker of Codex.