How to connect a Gamma MCP with Codex (4 steps)

When you hand Codex a task to build a Gamma deck generator or an export pipeline, you'd describe the deck format in the prompt.
That description leaves things out.
The exact section structure, the theme ID your team actually uses, the shape of the generation job's status field: those live in Gamma, not in a paragraph of task instructions. As a result, Gamma's outputs fall far short of your expectations.
To give Codex direct access to Gamma as it works through your coding tasks, we'll show you how to connect Gamma with Merge Agent Handler's Gamma MCP server.
How it works
Merge Agent Handler connects Codex to the Gamma API through the Merge CLI.
You'd install the CLI, authenticate once, and run a single setup command from your project root.
That command writes a Merge CLI section to your project's AGENTS.md file, which tells Codex when to call merge search-tools and merge execute-tool to reach Gamma.
Merge will manage your Gamma API key on your behalf, so no key lives in your repo or your environment variables.
Related: How to use the Gamma MCP in Claude Code
Prerequisites
Before getting started, you'll need the following:
- A Merge Agent Handler account
- Codex access (available via the OpenAI platform)
- pipx installed (run
pipx --versionto confirm, or install viapip install pipx) - A Gamma account with API access enabled
If you want to connect Merge Agent Handler's Gamma MCP with internal or customer-facing agentic products, you can follow the steps in our docs.
1. Install the Merge CLI
Install the Merge CLI with pipx: pipx install merge-api
Verify the install: merge --version
2. Log in to Merge
Run the following to authenticate the CLI with your Merge Agent Handler account: merge login
This links the CLI to your Merge account and stores your session credentials locally.
3. Add Agent Handler to Codex
From the root of the project where you want Codex to reach Gamma, run:
This writes a Merge CLI section to your project's AGENTS.md file so Codex knows to use the CLI when a task needs Gamma data. The command is idempotent, safe to re-run if you need to reset the configuration.
Commit the updated AGENTS.md so the configuration travels with the repo.
Related: A guide to integrating the Gamma MCP with Cursor
4. Authenticate Gamma
Create a Codex task that needs live Gamma data, for example: "Read the structure of our most recent sprint retro deck, then scaffold a generator that turns a list of closed tickets into a deck with the same section layout and theme."
The first time Codex invokes a Gamma tool, a Magic Link will appear to complete connector authentication.

Once authenticated, Codex can reach your Gamma account through Merge for every later task in this project.
{{this-blog-only-cta}}
Gamma MCP FAQ
In case you have more questions on setting up and using the Gamma MCP with Codex, we've addressed several more commonly-asked questions below.
What can you do once the Gamma MCP is connected to Codex?
With Gamma connected, Codex can:
- Read a real deck's structure before scaffolding a generator: pull an existing deck's sections and slide layout so the generator it writes matches how your team actually structures decks, not an assumed outline
- Pull the real generation job response before writing the poller: fetch actual status transitions from a live generation request so the polling logic it scaffolds matches Gamma's real job lifecycle instead of a guessed state machine
- Read real theme and export data before generating type definitions: pull actual theme IDs and export response formats so the types it produces match Gamma's real values, not placeholders
- Check workspace and sharing structure before scaffolding access control: read real folder and permission data so the code it generates gates access correctly instead of assuming a flat structure
- Pull real deck content before generating test fixtures: fetch an actual deck payload to use as a test fixture, instead of a hand-typed mock that drifts from the real API shape
Why use Merge Agent Handler vs. a self-hosted Gamma MCP server?
You can build a self-hosted MCP server on the Gamma API. For one workspace and one use case, it's workable: get an API key and start making calls.
It gets harder once tasks span more than one Gamma workspace or more than one presentation tool. Each API key carries full access, with no way to scope which operations a given Codex task can call, and a key that generates decks can usually also read and export every deck it can see.
A Gamma-specific server also only ever solves Gamma. The moment a task needs Google Slides or another tool instead, you're building and authenticating a separate integration.
Merge Agent Handler handles Gamma authentication centrally and exposes the same tool pattern across connectors through one connection.
You can scope exactly which Gamma operations a Codex task can call, and every call is logged with identity, timestamp, and inputs.
For a team running autonomous coding tasks against decks that might hold customer data or unreleased plans, scoped access plus an audit log is the foundation you want in place first.
Why connect Gamma to Codex?
Gamma holds the deck structure, generation job behavior, and theme data that presentation automation code has to match exactly.
Codex tasks that build generators, exporters, or syncs need that ground truth to produce code that works against a real workspace.
The alternative is describing your Gamma setup in the prompt, and those descriptions are always incomplete. An assumed section layout, a guessed status value, or a missed export field is enough to make Codex generate code that breaks on real data.
Connecting Gamma lets Codex read the actual structure when a task needs it. The real deck before a generator, the real job status before a poller, the real theme ID before a type definition: Codex works from the workspace itself, not a paraphrase of it.
Can I use Merge Agent Handler's Gamma MCP with my employees?
Yes, Agent Handler for Employees is built to help organizations provision, secure, and govern how employees connect AI tools like Codex to systems like Gamma.
Common patterns include:
- Provisioning and access control via SCIM with identity providers like Okta and Microsoft Entra ID, so IT can manage which employees or agents can generate or edit Gamma decks by role or team
- DLP and policy enforcement on tool calls, so admins can restrict which workspaces or folders an agent's task can reach before a deck is created or exported
- User-level audit logging so security and IT teams can review which decks were generated, exported, or updated, by which employee identity, and when
Taken together, employees can use the Gamma MCP to scaffold deck generators against real workspace structure, validate export logic against actual response data, build automations grounded in real theme and permission data, and more. All the while, IT keeps centralized control over which workspaces and operations each agent can reach.
.jpg)




.png)