Skip to content

Conversation

dylan-hurd-oai
Copy link
Collaborator

Summary

Adds a /mcp command to list active tools. We can extend this command to allow configuration of MCP tools, but for now a simple list command will help debug if your config.toml and your tools are working as expected.

Testing

  • Ran locally
Screenshot 2025-08-18 at 11 38 04 AM

@dylan-hurd-oai dylan-hurd-oai added the codex-rust-review Perform a detailed review of Rust changes. label Aug 18, 2025
@dylan-hurd-oai dylan-hurd-oai removed the codex-rust-review Perform a detailed review of Rust changes. label Aug 18, 2025
@dylan-hurd-oai dylan-hurd-oai added the codex-rust-review Perform a detailed review of Rust changes. label Aug 18, 2025
@github-actions github-actions bot added codex-rust-review-in-progress and removed codex-rust-review Perform a detailed review of Rust changes. labels Aug 18, 2025
Copy link

Summary
Adds a new /mcp TUI slash command that requests and displays available MCP tools by wiring a new Op::ListMcpTools + EventMsg::McpListToolsResponse through protocol, core, and TUI. Exec and MCP server runner explicitly ignore the new event in their outputs.

Review
Nice, focused addition with clear plumbing from protocol → core → TUI, and a helpful PR body. A few small nits for clarity and polish:

  • codex-rs/protocol/src/protocol.rs (@@ -137,0 +139,4 @@): Doc says EventMsg::ListMcpToolsResponse; enum is McpListToolsResponse. Update the doc to match.
  • codex-rs/core/src/codex.rs (@@ -1201,0 +1202,16 @@): Align log text “ListMcpToolsResponse” → “McpListToolsResponse” for consistency.
  • codex-rs/tui/src/history_cell.rs (@@ -636,0 +637,109 @@): Remove the unused servers variable; it’s never used.
  • codex-rs/tui/src/history_cell.rs (same hunk): Consider deleting the large commented-out block to keep the file tidy.
  • codex-rs/tui/src/history_cell.rs (same hunk): Make the “🔌” header spacing consistent (\"🔌 \" vs \"🔌 \").
  • codex-rs/tui/src/chatwidget.rs (@@ -687,0 +690,8 @@): Add/update snapshot tests for empty_mcp_output/new_mcp_tools_output (and run cargo insta accept -p codex-tui if the changes are intended).

View workflow run

Copy link
Collaborator

@easong-openai easong-openai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@dylan-hurd-oai dylan-hurd-oai merged commit e7e5fe9 into main Aug 19, 2025
15 checks passed
@dylan-hurd-oai dylan-hurd-oai deleted the dh--mcp-command branch August 19, 2025 16:00
@github-actions github-actions bot locked and limited conversation to collaborators Aug 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants