Listing configured Model Context Protocol (MCP) servers makes it clear which external tools and context sources Codex can load during a session, which helps validate integrations and spot unexpected entries before they run.
The codex mcp commands manage MCP server definitions stored in ~/.codex/config.toml, which is shared between the Codex CLI and IDE extension. The codex mcp list subcommand prints a summary of each server entry so transport, launch command or URL, and enablement state can be reviewed at a glance.
MCP servers can launch local processes or connect to remote endpoints, so unknown entries should be treated like untrusted executables. Listing output can include commands, arguments, and environment variable assignments stored in config.toml, so avoid pasting it into public logs or tickets when it may expose sensitive values.
Related: How to add an MCP server URL in Codex
Related: How to get Codex MCP server details
Steps to list Codex MCP servers:
- List the configured MCP servers.
$ codex mcp list Name Command Args Env Cwd Status Auth chrome-devtools npx chrome-devtools-mcp@latest - - enabled Unsupported Name Url Bearer Token Env Var Status Auth analytics http://127.0.0.1:9010 - enabled Unsupported playwright-mcp http://127.0.0.1:8931 - enabled Unsupported
Status indicates whether the server entry is enabled in config.toml, while Command and Args show the stdio launcher or the HTTP endpoint details.
- Confirm required servers show enabled under Status.
Unexpected servers can still be invoked during a session if enabled, so disable or remove anything untrusted before using Codex in sensitive workspaces.
- Save the server list to a file for change tracking.
$ codex mcp list > codex-mcp-servers.txt
Store the file in a private location if it contains internal endpoints.
- Print the MCP server list in JSON format for scripting.
$ codex mcp list --json
Machine-readable output can surface stored arguments and environment variable assignments; treat it as sensitive when sharing.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
