{% from '_helpers.html' import render_checkbox_field, render_button %} {% from '_stab.html' import stab_shell, stab_pane %} {# The "MCP Server" part of /settings/ai/mcp, included by llm-settings.html (the wrapper with the tab rows and the scripts). Vertical sub-tabs (_stab.html) like the AI / LLM part, the on/off switch at the top of Overview; everything can be set up while the switch is off. One form with its Save button at the bottom; the access tokens are managed in an overlay after it (nested forms are invalid), with ajax (mcp-tokens.js). Requires template context: form (forms.globalMCPSettingsPageForm), token_form (forms.MCPTokenForm), mcp_disabled, mcp_enabled, mcp_url, mcp_tokens (see mcp_template_context()). #} {% macro copyable(text, id, block=False) -%} {%- if block -%}
{{ text }}{{ text }}
{%- endif -%}
{%- endmacro %}
{% from '_mcp-permissions-grid.html' import permissions_grid %}
{% if not mcp_disabled %}
{# Add / edit an access token, sent with ajax by mcp-tokens.js (X-CSRFToken header from csrf.js). After "Add" it shows
the new token once #}
{% endif %}