{# MCP install widget: server-rendered client × method matrix. widget_name, clients, methods, panels, pip_prereq, variant are provided by MCPInstallWidget.context() / the directive's option merge. Each code block runs through the `highlight` filter (defined in docs._ext.widgets._base.make_highlight_filter) which wraps Sphinx's PygmentsBridge — so the output is byte-identical to a native ``.. code-block::`` block, meaning sphinx-copybutton + its prompt-strip regex work automatically. #}
{% for client in clients %} {% endfor %}
{% for method in methods %} {% endfor %}
{% for panel in panels %}
{% if panel.method.doc_url %}

With {{ panel.method.label }} installed:

{% elif panel.method.id == 'pip' %}

Install the packages first:

{{ ("$ " ~ pip_prereq) | highlight("console") }}

Then {{ 'register' if panel.client.kind == 'cli' else 'use this config' }}:

{% endif %} {{ panel.body | highlight(panel.language) }} {% if variant != 'compact' %}

Config file: {{ panel.client.config_file }}

{% endif %}
{% endfor %}