{% extends "base.html" %} {# Import the macro #} {% from "_server_form_macro.html" import render_server_form %} {% block title %}Add Servers - MCP Manager{% endblock %} {% block page_title %}Add Server Definitions{% endblock %} {% block page_subtitle %}Add a single server via form or multiple servers from JSON{% endblock %} {% block content %}
{% if single_server_error %}
error_outlineError adding server: {{ single_server_error }}
{% endif %}

info_outlineFirst select "Server type" to see the corresponding fields (Command/Arguments or URL).

{{ render_server_form( action_url=single_add_action_url, submit_button_text='Add this server', server=single_server_form_data, error=None, is_add_form=True, request=request, cancel_url=url_for('ui_root') ) }}
{% if bulk_error %}
error_outlineError processing JSON: {{ bulk_error }}
{% endif %} {% if bulk_success_count is not none and bulk_success_count > 0 %}
check_circle_outlineSuccess: Added {{ bulk_success_count }} server definitions from JSON. Return to list.
{% elif bulk_success_count is not none and bulk_success_count == 0 and not bulk_error %}
info_outlineNote: No new server definitions were added from JSON (they may already exist, JSON is empty/invalid, or contains errors).
{% endif %}
{# Buttons on the left #} cancelCancel (to main)
{# Switch on the right #}
{# Small padding for alignment #} Will added servers be enabled immediately? {# Adjusted margin #}
data_object
{# End of .row for tabs and content #} {% endblock %}