How to Connect Codex to AgentPatch
OpenAI’s Codex CLI is a capable terminal agent for software tasks. It reads files, writes code, and runs commands iteratively. AgentPatch extends what it can do — one MCP config entry gives your agent access to image generation, email, Google Maps, Google Trends, YouTube transcripts, and more from a single tool marketplace.
What You’ll Need
- Codex CLI installed and working (github.com/openai/codex)
- An AgentPatch API key — sign up at agentpatch.ai and grab your key from the dashboard
Setup
Add AgentPatch to ~/.codex/config.toml:
[mcp_servers.agentpatch]
url = "https://agentpatch.ai/mcp"
bearer_token_env_var = "AGENTPATCH_API_KEY"
Then set your API key:
export AGENTPATCH_API_KEY=your_api_key
Replace your_api_key with your actual key from the AgentPatch dashboard. Codex discovers all AgentPatch tools automatically on next start.
Verify It Works
Try this prompt in Codex to confirm everything is connected:
“Search the web for the latest Node.js LTS release and tell me the version number.”
If Codex returns search results, you’re all set.
Available Tools
Once connected, Codex can call any tool on the AgentPatch marketplace. The current lineup includes:
- Google Search and Bing Search — search the web for docs, error messages, articles, or anything else
- Google News — find recent news about technologies, companies, or topics
- Google Maps — look up addresses, business listings, and location data
- Google Trends — check search interest data for keywords and topics
- Image Generation — generate images from text descriptions using Recraft
- Email — send emails with research results, summaries, or notifications
- YouTube Transcripts — pull transcripts from YouTube videos for reference
New tools are added to the marketplace and become available automatically — no config changes needed.
Example
You’re building a data pipeline and want to know if a particular library is still actively maintained. You ask Codex:
“Search for recent GitHub activity and community discussion around the
bulljob queue library. Is it still being maintained?”
Codex calls the Google Search tool through AgentPatch, retrieves current results, and gives you a summary. No browser tab needed.
Later in the same session, you want a diagram for a README:
“Generate a simple flowchart-style illustration showing the pipeline stages: Ingest, Transform, Load, Notify.”
Codex calls the Recraft image generation tool through AgentPatch and produces the image. Same connection, different tool.
Wrapping Up
One config entry gets you the full AgentPatch tool marketplace. New tools become available without any changes on your end. Get your API key at agentpatch.ai.