Skip to content

Speed up /mcp inventory listing#16831

Merged
etraut-openai merged 8 commits intomainfrom
etraut/list_mcp_perf
Apr 6, 2026
Merged

Speed up /mcp inventory listing#16831
etraut-openai merged 8 commits intomainfrom
etraut/list_mcp_perf

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented Apr 5, 2026

Addresses #16244

This was a performance regression introduced when we moved the TUI on top of the app server API.

Problem: /mcp rebuilt a full MCP inventory through mcpServerStatus/list, including resources and resource templates that made the TUI wait on slow inventory probes.

Solution: add a lightweight detail mode to mcpServerStatus/list, have /mcp request tools-and-auth only, and cover the fast path with app-server and TUI tests.

Testing: Confirmed slow (multi-second) response prior to change and immediate response after change.

I considered two options:

  1. Change the existing mcpServerStatus/list API to accept an optional "details" parameter so callers can request only a subset of the information.
  2. Add a separate mcpServer/list API that returns only the servers, tools, and auth but omits the resources.

I chose option 1, but option 2 is also a reasonable approach.

Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

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

Tested the performance difference between main and this branch.

Approved.

Copy link
Copy Markdown
Collaborator

@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.

API design lgtm

@etraut-openai etraut-openai merged commit 9f737c2 into main Apr 6, 2026
22 checks passed
@etraut-openai etraut-openai deleted the etraut/list_mcp_perf branch April 6, 2026 23:27
@github-actions github-actions bot locked and limited conversation to collaborators Apr 6, 2026
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