Skip to content

Conversation

@shijie-oai
Copy link
Collaborator

Summary

Added mcp/servers/list which is equivalent to /mcp slash command in CLI for response. This will be used in VSCE MCP settings to show log in status, available tools etc.

@shijie-oai shijie-oai force-pushed the shijie/app-server-list-mcp-servers branch from 1d54eb5 to 819954e Compare December 2, 2025 23:45
Comment on lines 625 to 630
pub struct ListMcpServersResponse {
pub tools: std::collections::HashMap<String, McpTool>,
pub resources: std::collections::HashMap<String, Vec<McpResource>>,
pub resource_templates: std::collections::HashMap<String, Vec<McpResourceTemplate>>,
pub auth_statuses: std::collections::HashMap<String, McpAuthStatus>,
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same shape as crate::protocol::McpListToolsResponseEvent - I would like to do a ref here but not familiar enough with Rust... We can do pub type ListMcpServersResponse = crate::protocol::McpListToolsResponseEvent but then codegen decoration does not work.

@shijie-oai shijie-oai marked this pull request as ready for review December 2, 2025 23:49
Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +28 to +31
let mut mcp_connection_manager = McpConnectionManager::default();
let (tx_event, rx_event) = unbounded();
drop(rx_event);
let cancel_token = CancellationToken::new();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge MCP list endpoint hangs when servers prompt for elicitation

collect_mcp_snapshot builds a fresh McpConnectionManager but drops the event receiver immediately, so any MCP server that issues an elicitation request (e.g., OAuth or other interactive auth) will block waiting for a response that can never arrive. When the new mcp/servers/list handler calls this helper, AsyncManagedClient::client().await will wait indefinitely on those elicitation futures, leaving the request without a response for such servers.

Useful? React with 👍 / 👎.

@shijie-oai shijie-oai requested a review from owenlin0 December 3, 2025 01:10
Copy link
Contributor

@owenlin0 owenlin0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome thanks, one remaining comment but otherwise API design lgtm!

use codex_protocol::plan_tool::StepStatus as CorePlanStepStatus;
use codex_protocol::protocol::CodexErrorInfo as CoreCodexErrorInfo;
use codex_protocol::protocol::CreditsSnapshot as CoreCreditsSnapshot;
use codex_protocol::protocol::McpAuthStatus;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use the v2_enum_from_core macro to define a camel case'd version of this enum and expose that instead. we do this because we want to be consistently exposing camelCase everywhere in the API

@shijie-oai
Copy link
Collaborator Author

/merge

@shijie-oai shijie-oai merged commit 4785344 into main Dec 3, 2025
26 checks passed
@shijie-oai shijie-oai deleted the shijie/app-server-list-mcp-servers branch December 3, 2025 17:51
@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants