in between state for mcp implementation
This commit is contained in:
@@ -30,5 +30,29 @@
|
||||
</div>
|
||||
{% empty %}<p>No API tokens yet.</p>{% endfor %}
|
||||
</section>
|
||||
<section class="settings-card mcp-helper" data-mcp-helper>
|
||||
<h2>Connect an AI assistant</h2>
|
||||
<p>Compatible assistants can use your Food and Kitchen data through MCP. Access is limited to the permissions you grant.</p>
|
||||
<div class="form-field">
|
||||
<label for="mcp-server-url">MCP server URL</label>
|
||||
<input id="mcp-server-url" type="url" value="{{ mcp_url }}" readonly data-mcp-url>
|
||||
<button class="button button--secondary" type="button" data-mcp-copy-url>Copy URL</button>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<label for="mcp-token-input">Paste your TaskNest API token</label>
|
||||
<input id="mcp-token-input" type="password" autocomplete="new-password" spellcheck="false" data-mcp-token>
|
||||
<div class="mcp-helper__actions">
|
||||
<button class="button button--secondary" type="button" aria-pressed="false" data-mcp-show>Show token</button>
|
||||
<button class="button button--secondary" type="button" data-mcp-copy-token>Copy bearer token</button>
|
||||
</div>
|
||||
</div>
|
||||
<p data-mcp-status role="status" aria-live="polite"></p>
|
||||
<p class="mcp-helper__hint">Treat this token like a password. TaskNest does not save the token you paste here. You can revoke access from your API tokens.</p>
|
||||
<div class="mcp-helper__clients">
|
||||
<section><h3>ChatGPT</h3><p>Add a custom MCP app in ChatGPT and enter the MCP server URL. Select OAuth authentication, then sign in to TaskNest and approve the requested permissions. ChatGPT does not use the pasted token field.</p></section>
|
||||
<section><h3>Open WebUI</h3><p>In Admin Settings → Integrations → External Tool Servers, add an MCP (Streamable HTTP) connection. Use the URL above, choose Bearer authentication, and paste your token into its Key field.</p></section>
|
||||
<section><h3>Generic MCP client</h3><p>Use Streamable HTTP at the URL above and send <code>Authorization: Bearer <your token></code> as a separate header. Never put the token in the URL.</p></section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{% extends 'planner/base.html' %}
|
||||
{% block title %}Connect an AI assistant · Tasknest{% endblock %}
|
||||
{% block content %}
|
||||
<section class="settings-page">
|
||||
<p class="eyebrow">Secure connection</p>
|
||||
<h1>Connect an AI assistant</h1>
|
||||
{% if error %}
|
||||
<section class="settings-card" role="alert"><h2>Connection could not be approved</h2><p>{{ error.description }}</p></section>
|
||||
{% else %}
|
||||
<section class="settings-card">
|
||||
<h2>Allow {{ application.name }}?</h2>
|
||||
<p>This assistant is requesting access to your TaskNest account. It can only use the permissions listed here.</p>
|
||||
<ul>{% for scope in scopes_descriptions %}<li>{{ scope }}</li>{% endfor %}</ul>
|
||||
<form method="post" id="authorizationForm">
|
||||
{% csrf_token %}
|
||||
{% for field in form %}{% if field.is_hidden %}{{ field }}{% endif %}{% endfor %}
|
||||
{{ form.non_field_errors }}
|
||||
<button class="button" type="submit" name="allow" value="Authorize">Allow access</button>
|
||||
<button class="button button--secondary" type="submit" value="Cancel">Cancel</button>
|
||||
</form>
|
||||
<p>Review and revoke connected tokens anytime in <a href="{% url 'food:tokens' %}">API tokens</a>.</p>
|
||||
</section>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user