Add an MCP server at SITE_URL/mcp so AI assistants (claude.ai connectors, Claude Code) can search, read and write notes. - starpunk/mcp_server: official MCP SDK 2.3, stateless Streamable HTTP with JSON responses, served by uvicorn as a sidecar from the same image. Ten tools; writes go through the Micropub handlers. - IndieAuth: RFC 8707 resource indicators bound to codes and tokens (migration 022), client ID metadata document + public client metadata, draft in scopes_supported, default MCP scopes, consent screen note. - BACKGROUND_WORKERS_ENABLED flag so the sidecar runs no workers. - Docs: ADR-075, architecture/mcp.md and updates; CHANGELOG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
1.7 KiB
HTML
49 lines
1.7 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Authorize App - StarPunk{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="login-container authorize">
|
|
{% if request_error %}
|
|
<h2>Cannot authorize this app</h2>
|
|
<p>{{ request_error }}</p>
|
|
<p><a href="/">Return to homepage</a></p>
|
|
{% else %}
|
|
<h2>Authorize app</h2>
|
|
<p>
|
|
<strong>{{ auth_request.client_id }}</strong> wants to sign in as
|
|
<strong>{{ me }}</strong>.
|
|
</p>
|
|
{% if auth_request.resource %}
|
|
<p>This is an AI assistant asking to use your site through MCP
|
|
(<code>{{ auth_request.resource }}</code>). It can read your notes and drafts,
|
|
and do whatever you allow below.</p>
|
|
{% endif %}
|
|
<p><small>After approval you will be sent to {{ auth_request.redirect_uri }}</small></p>
|
|
|
|
<form action="{{ url_for('indieauth.approve') }}" method="POST" class="login-form"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
{% for name, value in fields.items() %}
|
|
<input type="hidden" name="{{ name }}" value="{{ value }}">
|
|
{% endfor %}
|
|
|
|
{% if auth_request.scopes %}
|
|
<fieldset>
|
|
<legend>Permissions requested</legend>
|
|
{% for scope in auth_request.scopes %}
|
|
<label>
|
|
<input type="checkbox" name="scope_granted" value="{{ scope }}" checked>
|
|
{{ scope }}
|
|
</label><br>
|
|
{% endfor %}
|
|
</fieldset>
|
|
{% else %}
|
|
<p>This app only wants to confirm your identity. It cannot post.</p>
|
|
{% endif %}
|
|
|
|
<button type="submit" name="decision" value="approve" class="button button-primary">Approve</button>
|
|
<button type="submit" name="decision" value="deny" class="button button-secondary">Deny</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|