feat(#444): MCP tab parity — add servers, catalog, env vars, restart, diagnostics (#462)

* feat(#444): add MCP API endpoints and data models

- Add McpServer.status and McpServer.error fields for diagnostics
- Add AddMcpServerRequest, McpCatalogResponse/Entry/EnvVar models
- Add McpServerTestResponse model
- Add POST addMcpServer, PUT updateMcpServer, POST restartMcpServer
- Add GET getMcpCatalog, POST installMcpCatalogEntry

* feat(#444): add server form, enriched server cards, catalog section

- Add HTTP/stdio inline server form with tabs
- Enriched server cards with status badge, restart, env var editing
- Add/edit/remove environment variables per server
- Catalog section with search, result cards, install flow with env vars
- Status badge colors: running=green, error=red, stopped/gray
- Server diagnostics shown as error badges on cards
- New string resources for all MCP UI elements

* fix(#444): add missing McpServer import to HermesApiService

* fix(#444): cleanup review issues — dead code, spinner, unused strings

- Remove unused serverDiagnostics from UiState
- Remove unused showDiagnostics local state in ServerCard
- Remove unused McpServerTestResponse model
- Remove redundant refreshDiagnostics() alias
- Replace catalog loading text with CircularProgressIndicator
- Remove unused string resources (action_restarting, diagnostics, catalog_load)

* fix(#444): remove remaining showDiagnostics reference at line 348

---------

Co-authored-by: Hermes Agent <hermes@agent.local>
This commit is contained in:
M57andHermes Agent authored and GitHub committed 2026-07-03 22:27:28 +03:00
1 parent d181851670
commit 5be4075d95
5 files changed
+962 -145

No files matched your search

+29 -2
View File
@@ -601,8 +601,35 @@
<string name="mcp_servers_label_transport">Transport: %1$s</string>
<string name="mcp_servers_label_command">Command:</string>
<string name="mcp_servers_action_test">Test</string>
<!-- Gateway Screen -->
<string name="mcp_servers_add_server">Add server</string>
<string name="mcp_servers_add_http">HTTP URL</string>
<string name="mcp_servers_add_stdio">Stdio command</string>
<string name="mcp_servers_field_name">Server name</string>
<string name="mcp_servers_field_url">URL (e.g. http://localhost:8000/sse)</string>
<string name="mcp_servers_field_command">Command (e.g. npx)</string>
<string name="mcp_servers_field_args">Arguments</string>
<string name="mcp_servers_action_submit">Add server</string>
<string name="mcp_servers_action_adding">Adding…</string>
<string name="mcp_servers_status_running">running</string>
<string name="mcp_servers_status_stopped">stopped</string>
<string name="mcp_servers_status_error">error</string>
<string name="mcp_servers_status_unconfigured">unconfigured</string>
<string name="mcp_servers_action_restart">Restart</string>
<string name="mcp_servers_env_vars">Env vars</string>
<string name="mcp_servers_env_add">Add env var</string>
<string name="mcp_servers_env_key">Key</string>
<string name="mcp_servers_env_value">Value</string>
<string name="mcp_servers_env_no_vars">No environment variables configured.</string>
<string name="mcp_servers_section_catalog">Catalog</string>
<string name="mcp_servers_catalog_search">Search catalog…</string>
<string name="mcp_servers_catalog_loading">Loading catalog…</string>
<string name="mcp_servers_catalog_empty">No catalog entries match your search.</string>
<string name="mcp_servers_catalog_install">Install</string>
<string name="mcp_servers_catalog_installing">Installing…</string>
<string name="mcp_servers_catalog_source">source: %1$s</string>
<string name="mcp_servers_catalog_required_env">Required env vars</string>
<!-- Gateway Screen -->
<string name="gateway_status_running">GATEWAY RUNNING</string>
<string name="gateway_status_stopped">GATEWAY STOPPED</string>
<string name="gateway_label_version">Version: %1$s</string>