{% extends "dashboard/base.html" %} {% block title %}{% if lang == 'fa' %}کلیدهای API{% else %}API Keys{% endif %} - MCP Hub{% endblock %} {% block page_title %}{% if lang == 'fa' %}کلیدهای API{% else %}API Keys{% endif %}{% endblock %} {% block content %}
{% if lang == 'fa' %}مدیریت کلیدهای API (Admin){% else %}Manage project API keys (admin){% endif %}
| {% if lang == 'fa' %}شناسه{% else %}Key ID{% endif %} | {% if lang == 'fa' %}پروژه{% else %}Project{% endif %} | {% if lang == 'fa' %}دسترسی{% else %}Scope{% endif %} | {% if lang == 'fa' %}توضیحات{% else %}Description{% endif %} | {% if lang == 'fa' %}وضعیت{% else %}Status{% endif %} | {% if lang == 'fa' %}استفاده{% else %}Usage{% endif %} | {% if lang == 'fa' %}عملیات{% else %}Actions{% endif %} |
|---|---|---|---|---|---|---|
|
{{ key.key_id[:12] }}...
|
{% if key.project_id == '*' %} {% if lang == 'fa' %}همه پروژهها{% else %}All Projects{% endif %} {% else %}{{ key.project_id }}{% endif %} |
{% for scope in key.scope.split() %}
{{ scope }}
{% endfor %}
|
{{ key.description or '-' }} |
{% if key.revoked %} {% if lang == 'fa' %}لغو شده{% else %}Revoked{% endif %}
{% else %}{% if lang == 'fa' %}فعال{% else %}Active{% endif %} {% endif %}
|
{{ key.usage_count }} |
{% if not key.revoked %}
{% endif %}
|
|
{% if lang == 'fa' %}کلید API یافت نشد{% else %}No API keys found{% endif %} | ||||||
{% if lang == 'fa' %}نمایش {{ ((page_number-1)*per_page)+1 }} تا {{ [page_number*per_page, total_count]|min }} از {{ total_count }}{% else %}Showing {{ ((page_number-1)*per_page)+1 }}–{{ [page_number*per_page, total_count]|min }} of {{ total_count }}{% endif %}
{% if lang == 'fa' %}کلیدهای API شخصی برای دسترسی به MCP{% else %}Your personal API keys for MCP access{% endif %}
{% if lang == 'fa' %}فیلتر ابزارهای هر سایت در تنظیمات سایت انجام میشود.{% else %}Per-site tool filters are configured in Site Settings.{% endif %}
| {% if lang == 'fa' %}نام{% else %}Name{% endif %} | Prefix | {% if lang == 'fa' %}دسترسی{% else %}Scope{% endif %} | Uses | {{ t.actions }} |
|---|---|---|---|---|
| {{ key.name }} | mhu_{{ key.key_prefix }}... | {% if key.site_id %} {% for site in sites %}{% if site.id == key.site_id %}{{ site.alias }}{% endif %}{% endfor %} {% else %} {% if lang == 'fa' %}همه سرویسها{% else %}All Services{% endif %} {% endif %} | {{ key.use_count }} | |
|
{{ t.no_api_keys }} | ||||
{% if lang == 'fa' %}در حال بارگذاری...{% else %}Loading...{% endif %}
{% if lang == 'fa' %}
نکته: تنظیمات بالا شامل نوع اتصال (streamableHttp برای Claude Desktop و http برای VS Code/Claude Code) میباشد. از sse استفاده نکنید — باعث خطای 400 Bad Request میشود.
{% else %}
Note: Config above includes the correct transport type (streamableHttp for Claude Desktop, http for VS Code/Claude Code). Do not use sse — it will cause 400 Bad Request errors.
{% endif %}
{% if lang == 'fa' %} API Key: از بخش API Keys بالا بسازید و مقدار آن را در تنظیمات وارد کنید: {% else %} API Key: Create one above and use it in your config: {% endif %}
"Authorization": "Bearer mhu_YOUR_API_KEY_HERE"
{% if lang == 'fa' %}ابتدا یک سایت اضافه کنید.{% else %}Add a site first to see configuration snippets.{% endif %} {{ t.add_site }}
{% endif %}