Skip to content

[BUG]: UI: Export Config button missing from Virtual Servers table after pagination #2362

@crivetimihai

Description

@crivetimihai

Summary

The "Export Config" button disappeared from the Virtual Servers table in the Admin UI. This button allowed users to export JSON configuration for MCP clients in three formats: stdio (Claude Desktop/CLI), SSE (LangChain/LlamaIndex), and HTTP (REST clients).

Root Cause

When pagination was implemented in PR #1955 (commit 1a8c50c44, Jan 8, 2026), the servers_partial.html template was created for HTMX-based pagination. The "Export Config" button that exists in admin.html was not copied to the partial template.

Affected Files

File Has Export Config Button
mcpgateway/templates/admin.html (lines 2498-2505) ✅ Yes
mcpgateway/templates/servers_partial.html Missing

Current Behavior

The Virtual Servers table shows only these action buttons:

  • View
  • Edit
  • Deactivate/Activate
  • Delete

Expected Behavior

The Virtual Servers table should also include:

  • Export Config button (between Edit and Deactivate rows)

The Export Config button opens a modal (config-selection-modal) with three options:

  1. Stdio - For Claude Desktop, CLI tools, and stdio-based MCP clients
  2. SSE - For frameworks supporting Server-Sent Events transport
  3. HTTP - For REST clients and HTTP-based MCP integrations

Proposed Fix

Add the Export Config button to servers_partial.html matching the implementation in admin.html:

<!-- Row 2: Export Config -->
<button
  onclick="Admin.showConfigSelectionModal('{{ server.id }}', '{{ server.name }}')"
  class="col-span-2 flex items-center justify-center px-2 py-1 text-xs font-medium rounded-md text-purple-600 hover:text-purple-900 hover:bg-purple-50 dark:text-purple-400 dark:hover:bg-purple-900/20 transition-colors"
  x-tooltip="'💡Generate client configuration files for this server'"
>
  Export Config
</button>

Note: The onclick handler should use Admin.showConfigSelectionModal (namespaced) to match the recent refactoring in commit c5cfbafa3.

Related PRs

Screenshots

N/A - The button is simply missing from the action buttons column.

Acceptance Criteria

  • Export Config button appears in Virtual Servers table (paginated view)
  • Button opens config selection modal with stdio/SSE/HTTP options
  • Generated configs work correctly for all three formats
  • Button styling matches other action buttons (purple color scheme)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfrontendFrontend development (HTML, CSS, JavaScript)uiUser Interface

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions