-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat: support list mcp servers in app server #7505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1d54eb5 to
819954e
Compare
| 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>, | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this 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".
| let mut mcp_connection_manager = McpConnectionManager::default(); | ||
| let (tx_event, rx_event) = unbounded(); | ||
| drop(rx_event); | ||
| let cancel_token = CancellationToken::new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 👍 / 👎.
There was a problem hiding this 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; |
There was a problem hiding this comment.
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
|
/merge |
Summary
Added
mcp/servers/listwhich is equivalent to/mcpslash command in CLI for response. This will be used in VSCE MCP settings to show log in status, available tools etc.