Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Codex CLI supports a rich set of configuration options, with preferences stored
- [Example prompts](./docs/getting-started.md#example-prompts)
- [Custom prompts](./docs/prompts.md)
- [Memory with AGENTS.md](./docs/getting-started.md#memory-with-agentsmd)
- [Shared agents workspace](./docs/getting-started.md#agents-home-agents)
- [Configuration](./docs/config.md)
- [**Sandbox & approvals**](./docs/sandbox.md)
- [**Authentication**](./docs/authentication.md)
Expand Down
1 change: 1 addition & 0 deletions codex-rs/app-server/src/codex_message_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1668,6 +1668,7 @@ async fn derive_config_from_params(
sandbox_mode,
model_provider,
codex_linux_sandbox_exe,
agents_home: None,
base_instructions,
include_apply_patch_tool,
include_view_image_tool: None,
Expand Down
56 changes: 56 additions & 0 deletions codex-rs/cli/tests/mcp_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,59 @@ async fn get_disabled_server_shows_single_line() -> Result<()> {

Ok(())
}

#[test]
fn list_includes_agents_home_servers() -> Result<()> {
let codex_home = TempDir::new()?;
let project = TempDir::new()?;
let agents_mcp_dir = project.path().join(".agents").join("mcp");
std::fs::create_dir_all(&agents_mcp_dir)?;
std::fs::write(
agents_mcp_dir.join("mcp.json"),
r#"
{
"docs": {
"command": "docs-server",
"args": ["--port", "8080"],
"env": {"TOKEN": "secret"}
}
}
"#,
)?;

let mut cmd = codex_command(codex_home.path())?;
let output = cmd
.current_dir(project.path())
.args(["mcp", "list", "--json"])
.output()?;
assert!(output.status.success());
let stdout = String::from_utf8(output.stdout)?;
let parsed: JsonValue = serde_json::from_str(&stdout)?;
assert_eq!(
parsed,
json!([
{
"name": "docs",
"enabled": true,
"transport": {
"type": "stdio",
"command": "docs-server",
"args": [
"--port",
"8080"
],
"env": {
"TOKEN": "secret"
},
"env_vars": [],
"cwd": null
},
"startup_timeout_sec": null,
"tool_timeout_sec": null,
"auth_status": "unsupported"
}
])
);

Ok(())
}
Loading