`codex mcp get --json` omits the configured `required` flag
メンテナーはふだん 1 日以内に返信
@akhil9tiet がすでに取り組んでいます。
2026年10月22日 から。
評価
調査の方向性
codex-rs/cli/src/mcp_cmd.rsから始め、run_getがJSONオブジェクトを構築する箇所で、MCPサーバー設定の読み取り方を確認します。設定されたrequiredの値を出力に追加し、required = trueを読み込んでJSONを確認する統合テストでカバーします。codex mcp get docs --jsonに"required": trueが含まれれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What version of Codex CLI is running?
codex-cli 0.163.0
What subscription do you have?
Not relevant. This is a local configuration command.
Which model were you using?
Not relevant. The command does not start a model turn.
What platform is your computer?
Linux x86_64
What terminal emulator and version are you using?
zsh 5.9. The terminal does not matter here because the command is non-interactive.
Codex doctor report
Not included because this reproduction uses an isolated CODEX_HOME and does not depend on machine state.
What issue are you seeing?
codex mcp get docs --json omits required when the server is configured with required = true. The command exits successfully and prints the other server settings, so users and scripts cannot determine from this output whether the server is required.
The CLI reference says this command prints the raw config entry: https://learn.chatgpt.com/docs/cli/reference
What steps can reproduce the bug?
Run this with Codex CLI 0.163.0:
test_home="$(mktemp -d)" && printf '%s\n' '[mcp_servers.docs]' 'command = "printf"' 'required = true' > "$test_home/config.toml" && CODEX_HOME="$test_home" codex mcp get docs --json
The output is:
{
"name": "docs",
"enabled": true,
"disabled_reason": null,
"transport": {
"type": "stdio",
"command": "printf",
"args": [],
"env": null,
"env_vars": [],
"cwd": null
},
"enabled_tools": null,
"disabled_tools": null,
"startup_timeout_sec": null,
"tool_timeout_sec": null
}
required is absent.
What is the expected behavior?
The JSON should include the configured value:
"required": true
Additional information
McpServerConfig retains this value in codex-rs/config/src/mcp_types.rs:244-248:
run_get manually builds the JSON object in codex-rs/cli/src/mcp_cmd.rs:999-1012 and does not copy server.required:
The smallest fix is to add "required": server.required to that object and cover it with an integration test that loads required = true and checks the JSON output.
- 主要言語
- Rust
- スター
- 130k
- フォーク
- 20.5k
- 平均マージ
- 1分
- マージ済み PR(30日)
- 996
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openai/codex のほかの issue
-
bug CLI documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
openai/codex#56630 · コメント 3 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bug CLI connectivity
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
openai/codex#56616 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
app enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
openai/codex#56578 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
app enhancement session
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
openai/codex#56420 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
install.sh: standalone release pruning always skipped on macOS because `lsof +D` exit status 1 is treated as an error when matches are found対応中かも @akhil9tiet が 2 日前に担当しました。 オープンbug CLI
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
openai/codex#56412 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
farion1231/cc-switch#8829 ·
メンテナーはふだん 1 日以内に返信
-
Validate CI command vectors before indexing Cargo subcommands対応中かも @amandeavor が今日担当しました。 オープンbug ci good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
longbridge/gpui-kit#3677 ·
メンテナーはふだん 1 日以内に返信
-
E-pr-welcome
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
seanmonstar/reqwest#3121 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
ilya-zlobintsev/LACT#1235 ·
メンテナーはふだん 1 日以内に返信