MCP Tools vs Building Your Own: When to Use a Tool Marketplace with Codex
Codex CLI is extensible through MCP, which means you can add custom tools when the defaults aren’t enough. That’s powerful, but it also means there’s a decision to make every time you need a new capability: build it or find it. For most generic tools, the answer is find it.
Why This Matters
Building an MCP tool for Codex isn’t hard, but it has real costs: time to write it, time to maintain it, and the API account you still need behind it anyway. For something like web search or image generation, you’re not building differentiated functionality — you’re doing plumbing.
A tool marketplace changes the calculus. AgentPatch gives Codex access to a growing set of tools with one MCP connection. If you need Google Search, it’s there. If you need image generation, it’s there. You add one server config and stop thinking about it.
When to Use a Tool Marketplace
Reach for AgentPatch when:
- The tool is a commodity service (search, email, maps, image gen)
- Managing yet another API key isn’t something you want to do
- The capability is a means to an end, not the end itself
- You want to add tools without revisiting your Codex config repeatedly
Build your own tool when:
- Your integration requires access to internal systems
- You need custom auth or business logic on top of an API
- The tool you need doesn’t exist on any marketplace
Both can coexist. Custom tools and AgentPatch tools show up alongside each other in Codex’s tool discovery.
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.
Example
You’re building a project management tool and you ask Codex:
“Search for recent GitHub issues in the linear-app/linear repository and summarize the top open bugs.”
Codex calls Google Search through AgentPatch to retrieve current data. You didn’t build that integration. You spent zero time on it. But Codex can now do that kind of lookup in any session.
Your custom tool for querying your own project’s Postgres database is a different story — worth building because it’s specific to you and doesn’t exist anywhere else.
Wrapping Up
The smart move is to use AgentPatch for the commodity layer and reserve custom tool builds for what’s genuinely unique to your setup. One config entry, full marketplace access, more time for the work that matters. Visit agentpatch.ai to get started.