How I Used OpenAI Codex to Add New Tools to My MCP Server — Here’s What Happened
Codex didn’t build my MCP integration — but it helped me expand it, faster than I expected.
Photo by Brooke Cagle on Unsplash
🚀 A Chance to Try Codex in the Real World
In a previous post, I shared how I linked Redmine — a legacy project management system — to an AI agent using the Model Context Protocol (MCP).
That setup worked great for reading data — the agent could retrieve issues and display context. But I wanted to go further.
This was the perfect excuse to try something I had been meaning to explore:
What if I used OpenAI Codex to help me add new tools to my MCP server?
Specifically:
create_redmine_issue(project_id, subject, description)update_redmine_issue(issue_id, status, notes)
Two simple actions — but enough to make my AI agent feel a whole lot more capable.
🔗 Link to my previous post: https://medium.com/the-first-commit/how-i-linked-a-legacy-system-to-a-modern-ai-agent-with-mcp-1b14e634a4b3
🛠️ My Starting Point
I already had get_redmine_issue working, and my MCP server was running fine.
What I needed was:
- Python handlers for the new tools
- A faster way to prototype Redmine interactions using the
python-redmineSDK
🤖 Where Codex Came In
I didn’t want to dive deep into every method of the python-redmine SDK.
Instead, I turned to OpenAI Codex and gave it clear task instructions:
Write a Python function that creates a new issue in Redmine using the
_python-redmine_library.
Parameters: project_id, subject, description
Then a similar prompt for the update tool.
🧠 How Codex Actually Works Here (Not Like Copilot)
When people hear Code Agent, they might think of GitHub Copilot/WindSurf/Cursor.
But this workflow is very different.
🧑💻 GitHub Copilot/WindSurf/Cursor is like an overenthusiastic intern sharing your IDE.
They open tabs you didn’t ask for, rename your variables mid-debug, and occasionally highlight everything.
But hey, they try.
👩💻👨💻 OpenAI Codex , on the other hand, is like a team of interns — each with their own laptop.
You assign one a task: “Write me a Python function to update a Redmine issue.”
They go off, do the work, and return with a solution…
…sometimes a great one. Sometimes not.
And your only option? “Thanks — but redo it.”
In practice:
- I linked my GitHub repo so Codex could read real code.
- Each request ran in its own clean Docker environment.
- Codex checked out the repo, processed the codebase, and returned a full result.
It’s not interactive. It’s not inline.
It’s batch-task, repo-aware AI coding assistance.
🧪 Why CI/CD Matters When Using Codex
Because Codex submits changes as pull requests, your CI pipeline becomes your sanity check.
Every time Codex finishes a task, my GitHub Actions pipeline kicks in:
- It runs unit tests
- Validates formatting and type checks
- Flags any broken assumptions early — before I even review the diff
Think of it this way: Codex is the intern, but CI is the gatekeeper.
You don’t want mystery code hitting main.
You want fast feedback when Codex does something “creative.”
✅ Codex Output and Adjustments
Codex gave me functional Python handlers using the python-redmine SDK:
- It correctly instantiated the client and authenticated
- Used
redmine.issue.create(...)andredmine.issue.update(...)appropriately - Even added basic comments and parameter validation
But it wasn’t perfect — I had to:
- Adjust parameter types
- Tweak optional fields like
notesorstatus_id - Test against my real Redmine server to verify field names and behavior
🚀 Now the Agent Can Take Action
After deployment, the agent can do things like:
“Create an issue in project
_infra_titled Redis server crash detected .”
or
“Update issue __#1539__to status_Resolved_with notes: Restarted service.”
That’s a real capability shift — from read-only to interactive.
💡 What I Learned
Codex is powerful when you use it with intent:
- It won’t replace understanding, but it speeds up prototyping
- You stay in control — Codex just accelerates the boring bits
- The isolated, repo-aware task model is surprisingly effective
I didn’t ask Codex to do my job — I asked it to help me move faster.
🙌 Let’s Build Smarter, Not Slower
Whether you’re working with MCP, building plugins, or just extending an internal toolchain — Codex can be a powerful companion.
It won’t magically do everything for you.
But when you give it focused tasks and a repo to work from, it can dramatically cut down the time between idea and implementation.
Think of it as a fast, tireless coding assistant — one that thrives in a clean workflow with clear tests and guardrails.
👏 If this post sparked any ideas, hit the clap or drop a comment. I’d love to hear how you’re using Codex (or want to).
Tags : #AI #OpenSource #MCP #LegacySoftware #LLMIntegration #Agents