docs(examples): add codex_with_skill_and_mcp example#642
Merged
Conversation
A runtime=codex agent that uses both a local skill (SkillToolset) and an MCP tool (MCPToolset, stdio) on a chat backend. Shows how the codex runtime routes each: skills are materialized into Codex's skill dir, MCP tools are executed by the Responses shim. Also skip skill toolsets in tools_bridge, so their internal tools (list_skills/load_skill/...) aren't shim-executed — skills go through the materialization path instead.
zakahan
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A runnable example (
examples/codex_with_skill_and_mcp/) of aruntime="codex"agent that uses both a local skill and an MCP tool on a chat backend (Ark) — tying together #640 (skill passthrough) and #641 (MCP/function tool passthrough).The agent wires them the ordinary way —
SkillToolset(skills=[load_skill_from_dir(...)])+MCPToolset(StdioServerParameters(...))— and the codex runtime routes each: the skill is materialized into$CODEX_HOME/skills/, the MCP tool is executed by the Responses shim.Small code change
tools_bridgenow skips skill toolsets (SkillToolset/SkillsToolset) so their internal tools (list_skills/load_skill/ …) aren't also shim-executed — skills are handled by the materialization path (#640). Without this, an agent with both a skill and an MCP tool would double-expose the skill machinery.Validation
Ran end to end on the bundled Codex binary + Ark (deepseek):
Skill materialized + discovered, MCP tool bridged + executed + used, and the two coexist.
🤖 Generated with Claude Code