Add MCP management wizard UX and harden Seatbelt symlink policies#3805
Closed
AmirTlinov wants to merge 10 commits intoopenai:mainfrom
Closed
Add MCP management wizard UX and harden Seatbelt symlink policies#3805AmirTlinov wants to merge 10 commits intoopenai:mainfrom
AmirTlinov wants to merge 10 commits intoopenai:mainfrom
Conversation
# MCP Management Overhaul – September 2025 (Phase 3 Delivery) ## Highlights - Added a fully interactive MCP manager + wizard to the TUI, covering the user-facing pieces of RFC “MCP Management Overhaul” Section 6 (Unified UX). Manager views surface templates/servers with health placeholders, and wizard flows provide multi-step validation with snapshot coverage. - Extended the CLI with a production-ready `codex mcp wizard`, supporting both interactive and non-interactive usage, JSON summaries, and direct persistence. This aligns the CLI experience with the TUI (RFC Section 6.7) while remaining fully scriptable. - Hardened the registry layer (RFC Section 7.3) so MCP server rename/update operations are atomic and cannot lose existing configurations even if persistence fails mid-flight. - Enhanced Seatbelt sandbox symlink support by introducing `SeatbeltPathExpr` and SBPL string escaping so lexical symlink paths are whitelisted alongside canonical ones, eliminating duplicate `-D` arguments while preserving security. - Ensured CRLF-aware patch application by preserving original line endings in `apply_patch`, maintaining correctness for Windows-authored files. - Updated documentation artifacts (`todo.machine.md`, plan.md excerpts, thought logs) to reflect the wizard/manager architecture and progress tracking, keeping the repo consistent with MCP-MANAGEMENT.md. ## Details - Introduced `tui/src/mcp/` modules (`types`, `manager_view`, `wizard_view`) with unit and snapshot tests (`mcp_manager_*`, `mcp_wizard_*`) to verify layout and interactions. - Wired new `AppEvent` variants and handlers in `tui/src/app.rs` and `chatwidget.rs`, enabling live config edits (create, edit, delete, reload) and feature-flag based fallbacks. - Added `core/src/mcp/health.rs` and expanded `McpRegistry` (upsert/remove/load, health stubs, validation). Added regression tests ensuring rename safety. - Implemented CLI wizard helpers under `cli/src/mcp/` with shared argument parsing, English-language prompts, validation, and JSON rendering; integrated with existing CLI command surface. - Hardened `apply-patch`’s CRLF handling, updated integration test `suite::apply_patch::test_apply_patch_freeform_tool`, and added non-interactive JSON path tests for the wizard to guarantee cross-platform stability. - Added `create_seatbelt_args_with_symlink_root_includes_lexical_paths` (Seatbelt tests) to ensure policies include both canonical and lexical paths when the workspace root is a symlink. - Ran full QA suite (`cargo test --all-features`, focused crate tests, clippy `-D warnings`) to provide audited evidence of quality. ## Testing - `cargo clippy --workspace --all-targets -- -D warnings` - `cargo test --all-features` - `cargo test -p codex-tui` - `cargo test -p codex-cli` - `cargo test -p codex-core --lib -- mcp` - `cargo test -p codex-exec --test all suite::apply_patch::test_apply_patch_freeform_tool`
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Delivered MCP management overhaul (Phase 3): TUI manager & wizard (codex-rs/tui/src/mcp/...,
codex-rs/tui/src/app.rs:444) plus matching CLI wizard (codex-rs/cli/src/mcp/..., codex-rs/cli/src/
mcp_cmd.rs:289) in line with RFC 0001.
a health stub; ensured CRLF-safe patch handling (codex-rs/apply-patch/src/lib.rs:640).
core/src/seatbelt.rs:11).
overhaul.md.
Test plan