/MCP command returns raw results in CLI

Open 💬 1 comment Opened Aug 12, 2026 by ChrisSwain-RV

What version of Codex CLI is running?

codex-cli 0.147.0

What subscription do you have?

Business

Which model were you using?

gpt-5.6-sol medium

What platform is your computer?

Windows 11

What terminal emulator and version are you using (if applicable)?

Powershell

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1786555600s since unix epoch",
  "overallStatus": "ok",
  "codexVersion": "0.147.0",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "C:\\Users\\chris\\.codex\\app-server-control\\app-server-control.sock",
        "daemon state dir": "C:\\Users\\chris\\.codex\\app-server-daemon",
        "mode": "ephemeral",
        "pid file": "C:\\Users\\chris\\.codex\\app-server-daemon\\app-server.pid (missing)",
        "settings": "C:\\Users\\chris\\.codex\\app-server-daemon\\settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "C:\\Users\\chris\\.codex\\app-server-daemon\\app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 0
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "C:\\Users\\chris\\.codex\\auth.json",
        "auth storage mode": "File",
        "stored API key": "false",
        "stored ChatGPT tokens": "true",
        "stored agent identity": "false",
        "stored auth mode": "chatgpt"
      },
      "remediation": null,
      "durationMs": 0
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "C:\\Users\\chris\\.codex",
        "config.toml": "C:\\Users\\chris\\.codex\\config.toml",
        "config.toml parse": "ok",
        "cwd": "C:\\Users\\chris",
        "enabled feature flags": "<redacted>",
        "feature flag overrides": "none",
        "feature flags enabled": "39",
        "log dir": "C:\\Users\\chris\\.codex\\log",
        "mcp servers": "1",
        "model": "gpt-5.6-sol",
        "model provider": "openai",
        "sqlite home": "C:\\Users\\chris\\.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.55.0.windows.3",
      "details": {
        "PATH git #1": "C:\\Program Files\\Git\\cmd\\git.exe",
        "PATH git entries": "1",
        "git build options": "git version 2.55.0.windows.3; cpu: x86_64; built from commit: 52ca1113d651127f89477a8763f86ab20f645e1d; sizeof-long: 4; sizeof-size_t: 8; shell-path: D:/git-sdk-64/usr/bin/sh; rust: disabled; feature: fsmonitor--daemon; gettext: enabled; libcurl: 8.21.0; OpenSSL: OpenSSL 3.5.7 9 Jun 2026; zlib: 1.3.2; SHA-1: SHA1_DC; SHA-256: SHA256_BLK; default-ref-format: files; default-hash: sha1",
        "git exec path": "C:/Program Files/Git/mingw64/libexec/git-core",
        "git version": "git version 2.55.0.windows.3",
        "repo detected": "false",
        "selected git": "C:\\Program Files\\Git\\cmd\\git.exe"
      },
      "remediation": null,
      "durationMs": 45
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "C:\\Users\\chris\\AppData\\Local\\Programs\\OpenAI\\Codex\\bin\\codex.exe",
        "PATH codex #2": "C:\\Users\\chris\\AppData\\Local\\Programs\\OpenAI Codex CLI\\codex.exe",
        "PATH codex #3": "C:\\Users\\chris\\AppData\\Roaming\\npm\\codex",
        "PATH codex #4": "C:\\Users\\chris\\AppData\\Roaming\\npm\\codex.cmd",
        "PATH codex entries": "4",
        "current executable": "C:\\Users\\chris\\AppData\\Local\\Programs\\OpenAI\\Codex\\bin\\codex.exe",
        "install context": "standalone (windows, package C:\\Users\\chris\\.codex\\packages\\standalone\\releases\\0.147.0-x86_64-pc-windows-msvc, bin C:\\Users\\chris\\.codex\\packages\\standalone\\releases\\0.147.0-x86_64-pc-windows-msvc\\bin, resources C:\\Users\\chris\\.codex\\packages\\standalone\\releases\\0.147.0-x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\chris\\.codex\\packages\\standalone\\releases\\0.147.0-x86_64-pc-windows-msvc\\codex-path)",
        "managed by bun": "false",
        "managed by npm": "false",
        "managed by pnpm": "false",
        "managed package root": "not set"
      },
      "remediation": null,
      "durationMs": 28
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "MCP configuration is locally consistent",
      "details": {
        "configured servers": "1",
        "disabled servers": "0",
        "stdio servers": "1"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "proxy env vars": "none"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.provider_reachability": {
      "id": "network.provider_reachability",
      "category": "reachability",
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP",
      "details": {
        "ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 403)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 71
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 0 IPv6, first IPv4",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake result": "HTTP 101 Switching Protocols",
        "model provider": "openai",
        "models etag present": "true",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 552
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running standalone on windows-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "C:\\Users\\chris\\AppData\\Local\\Programs\\OpenAI\\Codex\\bin\\codex.exe",
        "install method": "standalone (windows, package C:\\Users\\chris\\.codex\\packages\\standalone\\releases\\0.147.0-x86_64-pc-windows-msvc, bin C:\\Users\\chris\\.codex\\packages\\standalone\\releases\\0.147.0-x86_64-pc-windows-msvc\\bin, resources C:\\Users\\chris\\.codex\\packages\\standalone\\releases\\0.147.0-x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\chris\\.codex\\packages\\standalone\\releases\\0.147.0-x86_64-pc-windows-msvc\\codex-path)",
        "platform": "windows-x86_64",
        "version": "0.147.0"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (bundled)",
      "details": {
        "search command": "C:\\Users\\chris\\.codex\\packages\\standalone\\releases\\0.147.0-x86_64-pc-windows-msvc\\codex-path\\rg.exe",
        "search command readiness": "file exists",
        "search provider": "bundled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "ok",
      "summary": "sandbox configuration is readable",
      "details": {
        "approval policy": "Never",
        "codex-linux-sandbox helper": "none",
        "execve wrapper helper": "none",
        "filesystem sandbox": "restricted",
        "network sandbox": "restricted"
      },
      "remediation": null,
      "durationMs": 0
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "C:\\Users\\chris\\.codex (dir)",
        "active rollout files": "17 files, 17849009 total bytes, 1049941 average bytes",
        "archived rollout files": "1 files, 207604 total bytes, 207604 average bytes",
        "goals DB": "C:\\Users\\chris\\.codex\\goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "C:\\Users\\chris\\.codex\\logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "C:\\Users\\chris\\.codex\\log (missing)",
        "memories DB": "C:\\Users\\chris\\.codex\\memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "queue DB": "C:\\Users\\chris\\.codex\\queue_1.sqlite (file)",
        "queue DB integrity": "ok",
        "sqlite home": "C:\\Users\\chris\\.codex (dir)",
        "standalone release cache": "1 entries in C:\\Users\\chris\\.codex\\packages\\standalone\\releases",
        "state DB": "C:\\Users\\chris\\.codex\\state_5.sqlite (file)",
        "state DB integrity": "ok",
        "thread history DB": "C:\\Users\\chris\\.codex\\thread_history_1.sqlite (file)",
        "thread history DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 77
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "ok",
      "summary": "rollout files and state DB thread inventory agree",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "17",
        "rollout DB active rows": "17",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "1",
        "rollout DB archived rows": "1",
        "rollout DB duplicate DB paths": "0",
        "rollout DB duplicate rollout thread ids": "0",
        "rollout DB malformed file names": "0",
        "rollout DB missing active rows": "0",
        "rollout DB missing archived rows": "0",
        "rollout DB model providers": "openai=18",
        "rollout DB rows": "18",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "vscode=10, cli=6, exec=1, subagent:other=1",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 15
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language en-US",
      "details": {
        "EDITOR": "not set",
        "VISUAL": "not set",
        "os": "Windows 10.0.26200 (Windows 11 Professional) [64-bit]",
        "os language": "en-US",
        "os type": "Windows",
        "os version": "10.0.26200"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "WT_SESSION": "present",
        "color output": "enabled",
        "console input code page": "437",
        "console output code page": "437",
        "stderr console mode": "0x00000007 (VT processing: true)",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout console mode": "0x00000007 (VT processing: true)",
        "stdout is terminal": "true",
        "terminal": "Windows Terminal",
        "terminal size": "270x72"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.title": {
      "id": "terminal.title",
      "category": "title",
      "status": "ok",
      "summary": "terminal title default",
      "details": {
        "terminal title activity": "true",
        "terminal title items": "activity, project-name",
        "terminal title project source": "cwd",
        "terminal title project value": "chris",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.147.0",
        "check for update on startup": "true",
        "last checked at": "2026-08-12T15:34:10.426386100Z",
        "latest version": "0.147.0",
        "latest version status": "current version is not older",
        "update action": "standalone installer",
        "version cache": "C:\\Users\\chris\\.codex\\version.json"
      },
      "remediation": null,
      "durationMs": 550
    }
  }
}

What issue are you seeing?

Title: /mcp status output is unreadable when many plugin tools are enabled

Product and environment:

  • Codex CLI/TUI: 0.147.0
  • Codex desktop-bundled engine: 0.147.0-alpha.6.6
  • Operating system: Windows
  • MCP servers: codex_apps and node_repl
  • Active plugins/connectors include GitHub, Gmail, Google Calendar, Google Drive, Linear, Slack, Browser, Documents, PDF, Presentations, Spreadsheets, Sites, and others.

Problem:
Running the built-in /mcp slash command produces a very large, poorly structured status display. Authentication labels, tools, resources, and resource templates are rendered as long inline sections. With hundreds of tools exposed by codex_apps, the output becomes an unreadable wall of text.

The display includes labels such as:

  • Auth: Not logged in
  • Bearer token
  • Tools
  • Resources
  • Resource templates

“Bearer token” appears to be an authentication-method label rather than an exposed credential, but its placement is confusing and makes the output look as though authentication data is mixed into the tool list.

Expected behavior:
The /mcp view should present each server as a clearly separated, readable block. For example:

Server: codex_apps
Status: Connected
Authentication: [concise status]
Tools: 361 available
Resources: 0
Resource templates: 0
[Expand or search tools]

Server: node_repl
Status: Connected
Transport: STDIO
Authentication: Not applicable
Tools: 3 available
Resources: 0
Resource templates: 0

Large tool catalogs should be collapsed, paginated, searchable, or summarized by count. Authentication status should be visually separated from tool names. Credential values must remain redacted.

Actual behavior:
The complete tool catalog is printed inline alongside authentication and resource information. The result is difficult to scan, wraps badly, and makes the relationship between servers, authentication methods, and tools unclear.

Reproduction steps:

  1. Enable plugins/connectors that expose a large number of tools.
  2. Ensure codex_apps and node_repl are connected.
  3. Open a Codex chat.
  4. Enter /mcp.
  5. Observe that the complete tool catalog and authentication labels are rendered in a long, hard-to-read layout.

Diagnostic findings:

  • codex_apps and node_repl initialize successfully.
  • MCP tool calls execute successfully.
  • The node_repl MCP process remains running.
  • An independent MCP initialization handshake succeeds using protocol version 2025-06-18.
  • Logs show zero unavailable MCP servers after successful initialization.
  • This is reproducible after starting a new thread and restarting Codex.
  • The problem is specific to the built-in /mcp presentation; it is not an MCP connectivity failure.
  • The MCP server responses themselves are valid.
  • There are two installed Codex executables, but /mcp is rendered by the Codex client, and reinstalling the standalone CLI would not address this UI path.

Suggested improvements:

  1. Group output by MCP server.
  2. Show connection and authentication status as dedicated fields.
  3. Summarize tools, resources, and templates with counts.
  4. Collapse large tool lists by default.
  5. Add expansion, paging, filtering, or search.
  6. Display “Not applicable” for authentication on local STDIO servers instead of “Unsupported.”
  7. Clearly distinguish an authentication-method label such as “Bearer token” from an actual configured credential.
  8. Preserve redaction for all secrets.
  9. Handle terminal/window width and line wrapping gracefully.
  10. Avoid showing a stale “MCP startup interrupted” banner after all servers subsequently initialize successfully.

Please review both the /mcp status renderer and the handling of transient startup-state updates. I am including logs with this feedback.

What steps can reproduce the bug?

Uploaded thread: 019ff6ec-d547-7c02-a9e3-c05d737e1538

What is the expected behavior?

Show the MCP servers in a readable form.

Additional information

Using the /MCP command in the CLI should show a readable list of MCP, not the raw response from the server.

View original on GitHub ↗

1 Comment

jdcodes1 · 9 days ago

Confirmed in the renderer: the /mcp status cell joins every tool name into one unbounded line — lines.push(vec![" • Tools: ".into(), names.join(", ").into()]) — and does the same for resources and resource templates (https://github.com/openai/codex/blob/1f41cc5d92/codex-rs/tui/src/history_cell/mcp.rs#L533-L558). With codex_apps exposing hundreds of tools there's no cap, no wrapping structure, no count summary — hence the wall of text.

Low-risk fix shape, consistent with the TUI's existing truncation conventions (format_and_truncate_tool_result caps tool output in this same file): render Tools: 214 (first 10 shown: a, b, … — /mcp <server> for full list), i.e. per-section item caps with a count and an opt-in expansion path (/mcp <server> already narrows scope). Same treatment for Resources/Templates lines. That keeps the common "is my server up / authed" glance usable regardless of catalog size.