`codex mcp get --json` omits the configured `required` flag
I maintainer di solito rispondono entro 1 giorno
@akhil9tiet ci sta già lavorando.
Dal 22/10/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
Direzione di ricerca
Inizia da codex-rs/cli/src/mcp_cmd.rs, dove run_get crea l’oggetto JSON, e controlla come legge la configurazione del server MCP. Aggiungi all’output il valore configurato di required e coprilo con un test di integrazione che carichi required = true e verifichi il JSON. Il lavoro è terminato quando codex mcp get docs --json include "required": true.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 131k
- Fork
- 20.7k
- Merge medio
- 1m
- PR unite (30g)
- 997
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openai/codex
-
bug CLI
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 82/100
openai/codex#58818 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
TUI: submitted prompt fallback paints DarkGray without a foreground, making user messages unreadable on light terminalsForse già presa @akhil9tiet l’ha presa 1 giorno fa. Apertabug CLI TUI
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
openai/codex#58711 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug memory windows-os
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Skill Creator quick validator rejects standard compatibility frontmatterForse già presa @akhil9tiet l’ha presa 3 giorni fa. Apertabug skills
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
openai/codex#58538 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di openai/codex
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
GiganticMinecraft/seichi-portal-backend#1651 ·
I maintainer di solito rispondono entro 1 giorno
-
Android visitors are offered the Linux .deb on cap.so's homepage and download pageForse già presa @patrickballard l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CapSoftware/Cap#3677 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno